Lines Matching full:p_ccb
137 void mca_stop_timer(tMCA_CCB* p_ccb) { alarm_cancel(p_ccb->mca_ccb_timer); }
150 void mca_ccb_event(tMCA_CCB* p_ccb, uint8_t event, tMCA_CCB_EVT* p_data) {
154 MCA_TRACE_EVENT("CCB ccb=%d event=%s state=%s", mca_ccb_to_hdl(p_ccb),
155 mca_ccb_evt_str[event], mca_ccb_st_str[p_ccb->state]);
158 state_table = mca_ccb_st_tbl[p_ccb->state - 1];
161 p_ccb->state = state_table[event][MCA_CCB_NEXT_STATE];
166 (*mca_ccb_action[action])(p_ccb, p_data);
182 tMCA_CCB* p_ccb = NULL;
193 p_ccb = p_ccb_tmp;
198 return p_ccb;
213 tMCA_CCB* p_ccb = NULL;
229 p_ccb = p_ccb_tmp;
234 return p_ccb;
246 void mca_ccb_dealloc(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data) {
249 MCA_TRACE_DEBUG("mca_ccb_dealloc ctrl_vpsm:0x%x", p_ccb->ctrl_vpsm);
250 mca_dcb_close_by_mdl_id(p_ccb, MCA_ALL_MDL_ID);
251 if (p_ccb->ctrl_vpsm) {
252 L2CA_Deregister(p_ccb->ctrl_vpsm);
254 if (p_ccb->data_vpsm) {
255 L2CA_Deregister(p_ccb->data_vpsm);
257 osi_free_and_reset((void**)&p_ccb->p_rx_msg);
258 osi_free_and_reset((void**)&p_ccb->p_tx_req);
259 mca_stop_timer(p_ccb);
263 evt_data.disconnect_ind.bd_addr = p_ccb->peer_addr;
265 mca_ccb_report_event(p_ccb, MCA_DISCONNECT_IND_EVT, &evt_data);
267 mca_free_tc_tbl_by_lcid(p_ccb->lcid);
268 alarm_free(p_ccb->mca_ccb_timer);
269 memset(p_ccb, 0, sizeof(tMCA_CCB));
282 tMCA_CL mca_ccb_to_hdl(tMCA_CCB* p_ccb) {
283 return (uint8_t)(p_ccb - mca_cb.ccb + 1);
298 tMCA_CCB* p_ccb = NULL;
300 p_ccb = &mca_cb.ccb[mcl - 1];
301 return p_ccb;
313 bool mca_ccb_uses_mdl_id(tMCA_CCB* p_ccb, uint16_t mdl_id) {
318 i = mca_ccb_to_hdl(p_ccb) - 1;