• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

50 void mca_ccb_rsp_tout(tMCA_CCB* p_ccb, UNUSED_ATTR tMCA_CCB_EVT* p_data) {  in mca_ccb_rsp_tout()  argument
53 mca_ccb_report_event(p_ccb, MCA_RSP_TOUT_IND_EVT, &evt_data); in mca_ccb_rsp_tout()
65 void mca_ccb_report_event(tMCA_CCB* p_ccb, uint8_t event, tMCA_CTRL* p_data) { in mca_ccb_report_event() argument
66 if (p_ccb && p_ccb->p_rcb && p_ccb->p_rcb->p_cback) in mca_ccb_report_event()
67 (*p_ccb->p_rcb->p_cback)(mca_rcb_to_handle(p_ccb->p_rcb), in mca_ccb_report_event()
68 mca_ccb_to_hdl(p_ccb), event, p_data); in mca_ccb_report_event()
80 void mca_ccb_free_msg(UNUSED_ATTR tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) { in mca_ccb_free_msg() argument
93 void mca_ccb_snd_req(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) { in mca_ccb_snd_req() argument
99 MCA_TRACE_DEBUG("mca_ccb_snd_req cong=%d req=%d", p_ccb->cong, in mca_ccb_snd_req()
102 if ((p_ccb->status == MCA_CCB_STAT_PENDING) && in mca_ccb_snd_req()
104 p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx); in mca_ccb_snd_req()
109 osi_free_and_reset((void**)&p_ccb->p_tx_req); in mca_ccb_snd_req()
110 p_ccb->status = MCA_CCB_STAT_NORM; in mca_ccb_snd_req()
116 if ((!p_ccb->p_tx_req) || is_abort) { in mca_ccb_snd_req()
117 p_ccb->p_tx_req = p_msg; in mca_ccb_snd_req()
118 if (!p_ccb->cong) { in mca_ccb_snd_req()
131 L2CA_DataWrite(p_ccb->lcid, p_pkt); in mca_ccb_snd_req()
132 uint64_t interval_ms = p_ccb->p_rcb->reg.rsp_tout * 1000; in mca_ccb_snd_req()
133 alarm_set_on_mloop(p_ccb->mca_ccb_timer, interval_ms, in mca_ccb_snd_req()
134 mca_ccb_timer_timeout, p_ccb); in mca_ccb_snd_req()
153 void mca_ccb_snd_rsp(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) { in mca_ccb_snd_rsp() argument
158 MCA_TRACE_DEBUG("%s cong=%d req=%d", __func__, p_ccb->cong, p_msg->op_code); in mca_ccb_snd_rsp()
177 p_ccb->sec_mask, p_ccb->p_rcb->reg.data_psm, in mca_ccb_snd_rsp()
179 p_ccb->status = MCA_CCB_STAT_PENDING; in mca_ccb_snd_rsp()
181 osi_free_and_reset((void**)&p_ccb->p_tx_req); in mca_ccb_snd_rsp()
182 p_ccb->p_tx_req = p_ccb->p_rx_msg; in mca_ccb_snd_rsp()
183 p_ccb->p_rx_msg = NULL; in mca_ccb_snd_rsp()
184 p_ccb->p_tx_req->dcb_idx = p_msg->dcb_idx; in mca_ccb_snd_rsp()
188 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in mca_ccb_snd_rsp()
190 L2CA_DataWrite(p_ccb->lcid, p_pkt); in mca_ccb_snd_rsp()
202 void mca_ccb_do_disconn(tMCA_CCB* p_ccb, UNUSED_ATTR tMCA_CCB_EVT* p_data) { in mca_ccb_do_disconn() argument
203 mca_dcb_close_by_mdl_id(p_ccb, MCA_ALL_MDL_ID); in mca_ccb_do_disconn()
204 L2CA_DisconnectReq(p_ccb->lcid); in mca_ccb_do_disconn()
216 void mca_ccb_cong(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) { in mca_ccb_cong() argument
217 MCA_TRACE_DEBUG("mca_ccb_cong cong=%d/%d", p_ccb->cong, p_data->llcong); in mca_ccb_cong()
218 p_ccb->cong = p_data->llcong; in mca_ccb_cong()
219 if (!p_ccb->cong) { in mca_ccb_cong()
221 if (p_ccb->p_tx_req && !p_ccb->p_tx_req->hdr.layer_specific) { in mca_ccb_cong()
222 p_data = (tMCA_CCB_EVT*)p_ccb->p_tx_req; in mca_ccb_cong()
223 p_ccb->p_tx_req = NULL; in mca_ccb_cong()
224 mca_ccb_snd_req(p_ccb, p_data); in mca_ccb_cong()
240 void mca_ccb_hdl_req(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) { in mca_ccb_hdl_req() argument
251 MCA_TRACE_DEBUG("mca_ccb_hdl_req status:%d", p_ccb->status); in mca_ccb_hdl_req()
265 if (p_ccb->status == MCA_CCB_STAT_PENDING) { in mca_ccb_hdl_req()
268 if ((p_ccb->status == MCA_CCB_STAT_PENDING) && in mca_ccb_hdl_req()
273 p_ccb->status = MCA_CCB_STAT_NORM; in mca_ccb_hdl_req()
274 if (p_ccb->p_tx_req && in mca_ccb_hdl_req()
275 ((p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx)) != NULL)) { in mca_ccb_hdl_req()
277 osi_free_and_reset((void**)&p_ccb->p_tx_req); in mca_ccb_hdl_req()
281 } else if (p_ccb->p_rx_msg) { in mca_ccb_hdl_req()
285 } else if (p_ccb->p_tx_req) { in mca_ccb_hdl_req()
287 p_ccb->ctrl_vpsm); in mca_ccb_hdl_req()
289 if (p_ccb->ctrl_vpsm == 0) { in mca_ccb_hdl_req()
295 if ((p_ccb->p_tx_req->op_code == MCA_OP_MDL_CREATE_REQ) && in mca_ccb_hdl_req()
296 ((p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx)) != NULL)) { in mca_ccb_hdl_req()
299 osi_free_and_reset((void**)&p_ccb->p_tx_req); in mca_ccb_hdl_req()
300 mca_stop_timer(p_ccb); in mca_ccb_hdl_req()
333 if (!mca_is_valid_dep_id(p_ccb->p_rcb, p_rx_msg->mdep_id)) { in mca_ccb_hdl_req()
337 } else if (mca_ccb_uses_mdl_id(p_ccb, evt_data.hdr.mdl_id)) { in mca_ccb_hdl_req()
339 mca_dcb_close_by_mdl_id(p_ccb, evt_data.hdr.mdl_id); in mca_ccb_hdl_req()
342 if (mca_dep_free_mdl(p_ccb, evt_data.create_ind.dep_id) == 0) { in mca_ccb_hdl_req()
351 if (mca_ccb_uses_mdl_id(p_ccb, evt_data.hdr.mdl_id)) { in mca_ccb_hdl_req()
364 mca_dcb_close_by_mdl_id(p_ccb, evt_data.hdr.mdl_id); in mca_ccb_hdl_req()
411 L2CA_DataWrite(p_ccb->lcid, p_buf); in mca_ccb_hdl_req()
422 p_ccb->p_rx_msg = p_rx_msg; in mca_ccb_hdl_req()
425 p_ccb->p_rx_msg = NULL; in mca_ccb_hdl_req()
427 mca_ccb_report_event(p_ccb, evt_data.hdr.op_code, &evt_data); in mca_ccb_hdl_req()
443 void mca_ccb_hdl_rsp(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) { in mca_ccb_hdl_rsp() argument
457 } else if (p_ccb->p_tx_req) { in mca_ccb_hdl_rsp()
468 ((p_ccb->p_tx_req->op_code + 1) == evt_data.hdr.op_code)) { in mca_ccb_hdl_rsp()
470 mca_stop_timer(p_ccb); in mca_ccb_hdl_rsp()
479 p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx); in mca_ccb_hdl_rsp()
488 p_ccb->status = MCA_CCB_STAT_PENDING; in mca_ccb_hdl_rsp()
489 MCA_Abort(mca_ccb_to_hdl(p_ccb)); in mca_ccb_hdl_rsp()
495 p_ccb->sec_mask, p_ccb->data_vpsm, in mca_ccb_hdl_rsp()
496 BTM_SEC_PROTO_MCA, p_ccb->p_tx_req->dcb_idx); in mca_ccb_hdl_rsp()
497 p_dcb->lcid = mca_l2c_open_req(p_ccb->peer_addr, p_ccb->data_vpsm, in mca_ccb_hdl_rsp()
503 p_ccb->status = MCA_CCB_STAT_PENDING; in mca_ccb_hdl_rsp()
509 p_ccb->status = MCA_CCB_STAT_PENDING; in mca_ccb_hdl_rsp()
519 if (p_ccb->status != MCA_CCB_STAT_PENDING) in mca_ccb_hdl_rsp()
520 osi_free_and_reset((void**)&p_ccb->p_tx_req); in mca_ccb_hdl_rsp()
521 mca_ccb_report_event(p_ccb, evt_data.hdr.op_code, &evt_data); in mca_ccb_hdl_rsp()
541 void mca_ccb_ll_open(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) { in mca_ccb_ll_open() argument
543 p_ccb->cong = false; in mca_ccb_ll_open()
545 evt_data.connect_ind.bd_addr = p_ccb->peer_addr; in mca_ccb_ll_open()
546 mca_ccb_report_event(p_ccb, MCA_CONNECT_IND_EVT, &evt_data); in mca_ccb_ll_open()
559 void mca_ccb_dl_open(tMCA_CCB* p_ccb, UNUSED_ATTR tMCA_CCB_EVT* p_data) { in mca_ccb_dl_open() argument
560 osi_free_and_reset((void**)&p_ccb->p_tx_req); in mca_ccb_dl_open()
561 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in mca_ccb_dl_open()
562 p_ccb->status = MCA_CCB_STAT_NORM; in mca_ccb_dl_open()