Lines Matching refs:p_dlcb
34 static tLLCP_STATUS llcp_dlsm_idle (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_data);
35 static tLLCP_STATUS llcp_dlsm_w4_remote_resp (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_da…
36 static tLLCP_STATUS llcp_dlsm_w4_local_resp (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_dat…
37 static tLLCP_STATUS llcp_dlsm_connected (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_data);
38 static tLLCP_STATUS llcp_dlsm_w4_remote_dm (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_data…
54 tLLCP_STATUS llcp_dlsm_execute (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_data) in llcp_dlsm_execute() argument
60 p_dlcb->local_sap, in llcp_dlsm_execute()
61 llcp_dlsm_get_state_name (p_dlcb->state), in llcp_dlsm_execute()
64 … LLCP_TRACE_EVENT3 ("DLC (0x%02X) - state: %d, evt: %d", p_dlcb->local_sap, p_dlcb->state, event); in llcp_dlsm_execute()
67 switch (p_dlcb->state) in llcp_dlsm_execute()
70 status = llcp_dlsm_idle (p_dlcb, event, p_data); in llcp_dlsm_execute()
74 status = llcp_dlsm_w4_remote_resp (p_dlcb, event, p_data); in llcp_dlsm_execute()
78 status = llcp_dlsm_w4_local_resp (p_dlcb, event, p_data); in llcp_dlsm_execute()
82 status = llcp_dlsm_connected (p_dlcb, event, p_data); in llcp_dlsm_execute()
86 status = llcp_dlsm_w4_remote_dm (p_dlcb, event, p_data); in llcp_dlsm_execute()
106 static tLLCP_STATUS llcp_dlsm_idle (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_data) in llcp_dlsm_idle() argument
119 status = llcp_util_send_connect (p_dlcb, p_params); in llcp_dlsm_idle()
123 p_dlcb->local_miu = p_params->miu; in llcp_dlsm_idle()
124 p_dlcb->local_rw = p_params->rw; in llcp_dlsm_idle()
127 p_dlcb->state = LLCP_DLC_STATE_W4_REMOTE_RESP; in llcp_dlsm_idle()
129 nfc_start_quick_timer (&p_dlcb->timer, NFC_TTYPE_LLCP_DATA_LINK, in llcp_dlsm_idle()
146 data.connect_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_idle()
147 data.connect_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_idle()
151 data.connect_ind.server_sap = p_dlcb->local_sap; in llcp_dlsm_idle()
153 p_dlcb->remote_miu = p_params->miu; in llcp_dlsm_idle()
154 p_dlcb->remote_rw = p_params->rw; in llcp_dlsm_idle()
156 …LLCP_TRACE_DEBUG2 ("llcp_dlsm_idle (): Remote MIU:%d, RW:%d", p_dlcb->remote_miu, p_dlcb->remote_r… in llcp_dlsm_idle()
159 p_dlcb->state = LLCP_DLC_STATE_W4_LOCAL_RESP; in llcp_dlsm_idle()
161 nfc_start_quick_timer (&p_dlcb->timer, NFC_TTYPE_LLCP_DATA_LINK, in llcp_dlsm_idle()
164 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_idle()
186 static tLLCP_STATUS llcp_dlsm_w4_remote_resp (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_da… in llcp_dlsm_w4_remote_resp() argument
197 nfc_stop_quick_timer (&p_dlcb->timer); in llcp_dlsm_w4_remote_resp()
208 p_dlcb->remote_miu = p_params->miu; in llcp_dlsm_w4_remote_resp()
209 p_dlcb->remote_rw = p_params->rw; in llcp_dlsm_w4_remote_resp()
211 …E_DEBUG2 ("llcp_dlsm_w4_remote_resp (): Remote MIU:%d, RW:%d", p_dlcb->remote_miu, p_dlcb->remote_… in llcp_dlsm_w4_remote_resp()
213 p_dlcb->state = LLCP_DLC_STATE_CONNECTED; in llcp_dlsm_w4_remote_resp()
217 data.connect_resp.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_w4_remote_resp()
218 data.connect_resp.local_sap = p_dlcb->local_sap; in llcp_dlsm_w4_remote_resp()
222 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_w4_remote_resp()
226 p_dlcb->flags |= LLCP_DATA_LINK_FLAG_PENDING_RR_RNR; in llcp_dlsm_w4_remote_resp()
235 data.disconnect_resp.local_sap = p_dlcb->local_sap; in llcp_dlsm_w4_remote_resp()
236 data.disconnect_resp.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_w4_remote_resp()
238 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_w4_remote_resp()
241 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_w4_remote_resp()
251 data.disconnect_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_w4_remote_resp()
252 data.disconnect_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_w4_remote_resp()
253 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_w4_remote_resp()
255 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_w4_remote_resp()
277 static tLLCP_STATUS llcp_dlsm_w4_local_resp (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_dat… in llcp_dlsm_w4_local_resp() argument
289 nfc_stop_quick_timer (&p_dlcb->timer); in llcp_dlsm_w4_local_resp()
293 p_dlcb->local_miu = p_params->miu; in llcp_dlsm_w4_local_resp()
294 p_dlcb->local_rw = p_params->rw; in llcp_dlsm_w4_local_resp()
296 p_dlcb->state = LLCP_DLC_STATE_CONNECTED; in llcp_dlsm_w4_local_resp()
300 p_dlcb->flags |= LLCP_DATA_LINK_FLAG_PENDING_RR_RNR; in llcp_dlsm_w4_local_resp()
303 status = llcp_util_send_cc (p_dlcb, p_params); in llcp_dlsm_w4_local_resp()
312 data.disconnect_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_w4_local_resp()
313 data.disconnect_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_w4_local_resp()
314 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_w4_local_resp()
316 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_w4_local_resp()
329 llcp_util_send_dm (p_dlcb->remote_sap, p_dlcb->local_sap, reason); in llcp_dlsm_w4_local_resp()
332 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_w4_local_resp()
341 data.disconnect_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_w4_local_resp()
342 data.disconnect_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_w4_local_resp()
343 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_w4_local_resp()
345 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_w4_local_resp()
367 static tLLCP_STATUS llcp_dlsm_connected (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_data) in llcp_dlsm_connected() argument
385 ||( (p_dlcb->i_xmit_q.count == 0) in llcp_dlsm_connected()
386 &&(p_dlcb->next_rx_seq == p_dlcb->sent_ack_seq) in llcp_dlsm_connected()
387 &&(p_dlcb->next_tx_seq == p_dlcb->rcvd_ack_seq) ) ) in llcp_dlsm_connected()
390 p_dlcb->state = LLCP_DLC_STATE_W4_REMOTE_DM; in llcp_dlsm_connected()
392 llcp_util_send_disc (p_dlcb->remote_sap, p_dlcb->local_sap ); in llcp_dlsm_connected()
394 nfc_start_quick_timer (&p_dlcb->timer, NFC_TTYPE_LLCP_DATA_LINK, in llcp_dlsm_connected()
400 p_dlcb->flags |= LLCP_DATA_LINK_FLAG_PENDING_DISC; in llcp_dlsm_connected()
409 llcp_util_send_dm (p_dlcb->remote_sap, p_dlcb->local_sap, LLCP_SAP_DM_REASON_RESP_DISC ); in llcp_dlsm_connected()
412 data.disconnect_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_connected()
413 data.disconnect_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_connected()
414 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_connected()
416 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_connected()
425 if (p_dlcb->remote_rw) in llcp_dlsm_connected()
428 GKI_enqueue (&p_dlcb->i_xmit_q, p_data); in llcp_dlsm_connected()
433 if ( (p_dlcb->is_tx_congested) in llcp_dlsm_connected()
435 ||(p_dlcb->remote_busy) in llcp_dlsm_connected()
436 … ||(p_dlcb->i_xmit_q.count >= p_dlcb->remote_rw) ) /*if enough data to send next round */ in llcp_dlsm_connected()
439 p_dlcb->local_sap, p_dlcb->remote_sap, p_dlcb->i_xmit_q.count); in llcp_dlsm_connected()
442 p_dlcb->is_tx_congested = TRUE; in llcp_dlsm_connected()
458 data.data_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_connected()
460 data.data_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_connected()
462 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_connected()
470 data.disconnect_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_connected()
471 data.disconnect_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_connected()
472 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_connected()
474 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_connected()
496 static tLLCP_STATUS llcp_dlsm_w4_remote_dm (tLLCP_DLCB *p_dlcb, tLLCP_DLC_EVENT event, void *p_data) in llcp_dlsm_w4_remote_dm() argument
508 data.disconnect_resp.local_sap = p_dlcb->local_sap; in llcp_dlsm_w4_remote_dm()
509 data.disconnect_resp.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_w4_remote_dm()
511 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_w4_remote_dm()
513 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_w4_remote_dm()
522 data.disconnect_ind.local_sap = p_dlcb->local_sap; in llcp_dlsm_w4_remote_dm()
523 data.disconnect_ind.remote_sap = p_dlcb->remote_sap; in llcp_dlsm_w4_remote_dm()
524 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlsm_w4_remote_dm()
526 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlsm_w4_remote_dm()
535 llcp_util_send_dm (p_dlcb->remote_sap, p_dlcb->local_sap, LLCP_SAP_DM_REASON_RESP_DISC ); in llcp_dlsm_w4_remote_dm()
590 void llcp_dlc_flush_q (tLLCP_DLCB *p_dlcb) in llcp_dlc_flush_q() argument
592 if (p_dlcb) in llcp_dlc_flush_q()
594 LLCP_TRACE_DEBUG1 ("llcp_dlc_flush_q (): local SAP:0x%02X", p_dlcb->local_sap); in llcp_dlc_flush_q()
597 while (p_dlcb->i_xmit_q.p_first) in llcp_dlc_flush_q()
599 GKI_freebuf (GKI_dequeue (&p_dlcb->i_xmit_q)); in llcp_dlc_flush_q()
604 LLCP_FlushDataLinkRxData (p_dlcb->local_sap, p_dlcb->remote_sap); in llcp_dlc_flush_q()
623 tLLCP_DLCB *p_dlcb; in llcp_dlc_proc_connect_pdu() local
702 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, ssap); in llcp_dlc_proc_connect_pdu()
703 if (p_dlcb) in llcp_dlc_proc_connect_pdu()
711 p_dlcb = llcp_util_allocate_data_link (dsap, ssap); in llcp_dlc_proc_connect_pdu()
713 if (p_dlcb) in llcp_dlc_proc_connect_pdu()
715 status = llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_PEER_CONNECT_IND, ¶ms); in llcp_dlc_proc_connect_pdu()
719 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlc_proc_connect_pdu()
741 tLLCP_DLCB *p_dlcb; in llcp_dlc_proc_disc_pdu() local
745 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, ssap); in llcp_dlc_proc_disc_pdu()
746 if (p_dlcb) in llcp_dlc_proc_disc_pdu()
752 …llcp_util_send_frmr (p_dlcb, LLCP_FRMR_W_ERROR_FLAG|LLCP_FRMR_I_ERROR_FLAG, LLCP_PDU_DISC_TYPE, 0); in llcp_dlc_proc_disc_pdu()
753 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_FRAME_ERROR, NULL); in llcp_dlc_proc_disc_pdu()
757 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_PEER_DISCONNECT_IND, NULL); in llcp_dlc_proc_disc_pdu()
777 tLLCP_DLCB *p_dlcb; in llcp_dlc_proc_cc_pdu() local
784 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, LLCP_INVALID_SAP); in llcp_dlc_proc_cc_pdu()
785 if (p_dlcb) in llcp_dlc_proc_cc_pdu()
788 p_dlcb->remote_sap = ssap; in llcp_dlc_proc_cc_pdu()
792 status = llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_PEER_CONNECT_CFM, ¶ms); in llcp_dlc_proc_cc_pdu()
796 llcp_util_deallocate_data_link (p_dlcb); in llcp_dlc_proc_cc_pdu()
801 …llcp_util_send_frmr (p_dlcb, LLCP_FRMR_W_ERROR_FLAG|LLCP_FRMR_I_ERROR_FLAG, LLCP_PDU_DISC_TYPE, 0); in llcp_dlc_proc_cc_pdu()
802 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_FRAME_ERROR, NULL); in llcp_dlc_proc_cc_pdu()
822 tLLCP_DLCB *p_dlcb; in llcp_dlc_proc_dm_pdu() local
835 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, ssap); in llcp_dlc_proc_dm_pdu()
841 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, LLCP_INVALID_SAP); in llcp_dlc_proc_dm_pdu()
844 if (p_dlcb) in llcp_dlc_proc_dm_pdu()
846 … llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_PEER_DISCONNECT_RESP, p_data); /* passing reason */ in llcp_dlc_proc_dm_pdu()
868 tLLCP_DLCB *p_dlcb; in llcp_dlc_proc_i_pdu() local
874 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, ssap); in llcp_dlc_proc_i_pdu()
876 if ((p_dlcb)&&(p_dlcb->state == LLCP_DLC_STATE_CONNECTED)) in llcp_dlc_proc_i_pdu()
888 if (info_len > p_dlcb->local_miu) in llcp_dlc_proc_i_pdu()
891 p_dlcb->local_miu, info_len); in llcp_dlc_proc_i_pdu()
905 p_dlcb->next_tx_seq, p_dlcb->rcvd_ack_seq, in llcp_dlc_proc_i_pdu()
906 p_dlcb->next_rx_seq, p_dlcb->sent_ack_seq); in llcp_dlc_proc_i_pdu()
910 if (p_dlcb->next_rx_seq != send_seq) in llcp_dlc_proc_i_pdu()
913 send_seq, p_dlcb->next_rx_seq); in llcp_dlc_proc_i_pdu()
920 if ((UINT8) (send_seq - p_dlcb->sent_ack_seq) % LLCP_SEQ_MODULO >= p_dlcb->local_rw) in llcp_dlc_proc_i_pdu()
923 send_seq, p_dlcb->sent_ack_seq, p_dlcb->local_rw); in llcp_dlc_proc_i_pdu()
930 …if ((UINT8) (rcv_seq - p_dlcb->rcvd_ack_seq) % LLCP_SEQ_MODULO + (UINT8) (p_dlcb->next_tx_seq - rc… in llcp_dlc_proc_i_pdu()
931 != (UINT8) (p_dlcb->next_tx_seq - p_dlcb->rcvd_ack_seq) % LLCP_SEQ_MODULO) in llcp_dlc_proc_i_pdu()
935 rcv_seq, p_dlcb->rcvd_ack_seq, p_dlcb->next_tx_seq); in llcp_dlc_proc_i_pdu()
941 llcp_util_send_frmr (p_dlcb, error_flags, LLCP_PDU_I_TYPE, *p); in llcp_dlc_proc_i_pdu()
942 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_FRAME_ERROR, NULL); in llcp_dlc_proc_i_pdu()
947 p_dlcb->next_rx_seq = (p_dlcb->next_rx_seq + 1) % LLCP_SEQ_MODULO; in llcp_dlc_proc_i_pdu()
948 p_dlcb->rcvd_ack_seq = rcv_seq; in llcp_dlc_proc_i_pdu()
953 p_last_buf = (BT_HDR *) GKI_getlast (&p_dlcb->i_rx_q); in llcp_dlc_proc_i_pdu()
1026 GKI_enqueue (&p_dlcb->i_rx_q, p_msg); in llcp_dlc_proc_i_pdu()
1034 p_dlcb->num_rx_i_pdu++; in llcp_dlc_proc_i_pdu()
1036 if ( (!p_dlcb->local_busy) in llcp_dlc_proc_i_pdu()
1037 &&(p_dlcb->num_rx_i_pdu == 1) ) in llcp_dlc_proc_i_pdu()
1040 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_PEER_DATA_IND, NULL); in llcp_dlc_proc_i_pdu()
1043 if ( (!p_dlcb->is_rx_congested) in llcp_dlc_proc_i_pdu()
1044 &&(p_dlcb->num_rx_i_pdu >= p_dlcb->rx_congest_threshold) ) in llcp_dlc_proc_i_pdu()
1047 p_dlcb->num_rx_i_pdu, p_dlcb->rx_congest_threshold); in llcp_dlc_proc_i_pdu()
1050 p_dlcb->is_rx_congested = TRUE; in llcp_dlc_proc_i_pdu()
1051 p_dlcb->flags |= LLCP_DATA_LINK_FLAG_PENDING_RR_RNR; in llcp_dlc_proc_i_pdu()
1079 tLLCP_DLCB *p_dlcb; in llcp_dlc_proc_rr_rnr_pdu() local
1086 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, ssap); in llcp_dlc_proc_rr_rnr_pdu()
1087 if (p_dlcb != NULL) in llcp_dlc_proc_rr_rnr_pdu()
1099 …if ((UINT8) (rcv_seq - p_dlcb->rcvd_ack_seq) % LLCP_SEQ_MODULO + (UINT8) (p_dlcb->next_tx_seq - rc… in llcp_dlc_proc_rr_rnr_pdu()
1100 != (UINT8) (p_dlcb->next_tx_seq - p_dlcb->rcvd_ack_seq) % LLCP_SEQ_MODULO ) in llcp_dlc_proc_rr_rnr_pdu()
1104 rcv_seq, p_dlcb->rcvd_ack_seq, p_dlcb->next_tx_seq); in llcp_dlc_proc_rr_rnr_pdu()
1109 llcp_util_send_frmr (p_dlcb, error_flags, ptype, *p_data); in llcp_dlc_proc_rr_rnr_pdu()
1110 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_FRAME_ERROR, NULL); in llcp_dlc_proc_rr_rnr_pdu()
1114 p_dlcb->rcvd_ack_seq = rcv_seq; in llcp_dlc_proc_rr_rnr_pdu()
1119 p_dlcb->next_tx_seq, p_dlcb->rcvd_ack_seq, in llcp_dlc_proc_rr_rnr_pdu()
1120 p_dlcb->next_rx_seq, p_dlcb->sent_ack_seq); in llcp_dlc_proc_rr_rnr_pdu()
1122 old_remote_busy = p_dlcb->remote_busy; in llcp_dlc_proc_rr_rnr_pdu()
1125 p_dlcb->remote_busy = TRUE; in llcp_dlc_proc_rr_rnr_pdu()
1128 &&(!p_dlcb->is_tx_congested) ) in llcp_dlc_proc_rr_rnr_pdu()
1131 p_dlcb->local_sap, p_dlcb->remote_sap, in llcp_dlc_proc_rr_rnr_pdu()
1132 p_dlcb->i_xmit_q.count); in llcp_dlc_proc_rr_rnr_pdu()
1135 cback_data.congest.local_sap = p_dlcb->local_sap; in llcp_dlc_proc_rr_rnr_pdu()
1136 cback_data.congest.remote_sap = p_dlcb->remote_sap; in llcp_dlc_proc_rr_rnr_pdu()
1140 (*p_dlcb->p_app_cb->p_app_cback) (&cback_data); in llcp_dlc_proc_rr_rnr_pdu()
1145 p_dlcb->remote_busy = FALSE; in llcp_dlc_proc_rr_rnr_pdu()
1148 &&(!p_dlcb->is_tx_congested) ) in llcp_dlc_proc_rr_rnr_pdu()
1151 p_dlcb->local_sap, p_dlcb->remote_sap, in llcp_dlc_proc_rr_rnr_pdu()
1152 p_dlcb->i_xmit_q.count); in llcp_dlc_proc_rr_rnr_pdu()
1155 cback_data.congest.local_sap = p_dlcb->local_sap; in llcp_dlc_proc_rr_rnr_pdu()
1156 cback_data.congest.remote_sap = p_dlcb->remote_sap; in llcp_dlc_proc_rr_rnr_pdu()
1160 (*p_dlcb->p_app_cb->p_app_cback) (&cback_data); in llcp_dlc_proc_rr_rnr_pdu()
1165 if (p_dlcb->flags & LLCP_DATA_LINK_FLAG_PENDING_DISC) in llcp_dlc_proc_rr_rnr_pdu()
1168 if ( (p_dlcb->i_xmit_q.count == 0) in llcp_dlc_proc_rr_rnr_pdu()
1169 &&(p_dlcb->next_rx_seq == p_dlcb->sent_ack_seq) in llcp_dlc_proc_rr_rnr_pdu()
1170 &&(p_dlcb->next_tx_seq == p_dlcb->rcvd_ack_seq) ) in llcp_dlc_proc_rr_rnr_pdu()
1172 p_dlcb->flags &= ~LLCP_DATA_LINK_FLAG_PENDING_DISC; in llcp_dlc_proc_rr_rnr_pdu()
1173 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_API_DISCONNECT_REQ, &flush); in llcp_dlc_proc_rr_rnr_pdu()
1195 tLLCP_DLCB *p_dlcb; in llcp_dlc_proc_rx_pdu() local
1225 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, ssap); in llcp_dlc_proc_rx_pdu()
1226 if (p_dlcb) in llcp_dlc_proc_rx_pdu()
1228 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_FRAME_ERROR, NULL); in llcp_dlc_proc_rx_pdu()
1240 p_dlcb = llcp_dlc_find_dlcb_by_sap (dsap, ssap); in llcp_dlc_proc_rx_pdu()
1241 if (p_dlcb) in llcp_dlc_proc_rx_pdu()
1243 llcp_util_send_frmr (p_dlcb, LLCP_FRMR_W_ERROR_FLAG, ptype, 0); in llcp_dlc_proc_rx_pdu()
1244 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_FRAME_ERROR, NULL); in llcp_dlc_proc_rx_pdu()
1305 BOOLEAN llcp_dlc_is_rw_open (tLLCP_DLCB *p_dlcb) in llcp_dlc_is_rw_open() argument
1307 if ((UINT8) (p_dlcb->next_tx_seq - p_dlcb->rcvd_ack_seq) % LLCP_SEQ_MODULO < p_dlcb->remote_rw) in llcp_dlc_is_rw_open()
1314 p_dlcb->next_tx_seq, p_dlcb->rcvd_ack_seq, p_dlcb->remote_rw); in llcp_dlc_is_rw_open()
1328 BT_HDR* llcp_dlc_get_next_pdu (tLLCP_DLCB *p_dlcb) in llcp_dlc_get_next_pdu() argument
1335 UINT8 send_seq = p_dlcb->next_tx_seq; in llcp_dlc_get_next_pdu()
1339 if ( (p_dlcb->i_xmit_q.count) in llcp_dlc_get_next_pdu()
1340 &&(!p_dlcb->remote_busy) in llcp_dlc_get_next_pdu()
1341 &&(llcp_dlc_is_rw_open (p_dlcb)) ) in llcp_dlc_get_next_pdu()
1343 p_msg = (BT_HDR *) GKI_dequeue (&p_dlcb->i_xmit_q); in llcp_dlc_get_next_pdu()
1349 llcp_util_build_info_pdu (p_dlcb, p_msg); in llcp_dlc_get_next_pdu()
1351 p_dlcb->next_tx_seq = (p_dlcb->next_tx_seq + 1) % LLCP_SEQ_MODULO; in llcp_dlc_get_next_pdu()
1355 send_seq, p_dlcb->next_rx_seq, in llcp_dlc_get_next_pdu()
1356 p_dlcb->next_tx_seq, p_dlcb->rcvd_ack_seq, in llcp_dlc_get_next_pdu()
1357 p_dlcb->next_rx_seq, p_dlcb->sent_ack_seq); in llcp_dlc_get_next_pdu()
1370 if ( (p_dlcb->i_xmit_q.count == 0) in llcp_dlc_get_next_pdu()
1371 &&(p_dlcb->next_rx_seq == p_dlcb->sent_ack_seq) in llcp_dlc_get_next_pdu()
1372 &&(p_dlcb->next_tx_seq == p_dlcb->rcvd_ack_seq) ) in llcp_dlc_get_next_pdu()
1375 if (p_dlcb->flags & LLCP_DATA_LINK_FLAG_PENDING_DISC) in llcp_dlc_get_next_pdu()
1377 p_dlcb->flags &= ~LLCP_DATA_LINK_FLAG_PENDING_DISC; in llcp_dlc_get_next_pdu()
1378 llcp_dlsm_execute (p_dlcb, LLCP_DLC_EVENT_API_DISCONNECT_REQ, &flush); in llcp_dlc_get_next_pdu()
1382 if (p_dlcb->flags & LLCP_DATA_LINK_FLAG_NOTIFY_TX_DONE) in llcp_dlc_get_next_pdu()
1384 p_dlcb->flags &= ~LLCP_DATA_LINK_FLAG_NOTIFY_TX_DONE; in llcp_dlc_get_next_pdu()
1387 data.tx_complete.local_sap = p_dlcb->local_sap; in llcp_dlc_get_next_pdu()
1388 data.tx_complete.remote_sap = p_dlcb->remote_sap; in llcp_dlc_get_next_pdu()
1390 (*p_dlcb->p_app_cb->p_app_cback) (&data); in llcp_dlc_get_next_pdu()
1406 UINT16 llcp_dlc_get_next_pdu_length (tLLCP_DLCB *p_dlcb) in llcp_dlc_get_next_pdu_length() argument
1411 if ( (p_dlcb->i_xmit_q.count) in llcp_dlc_get_next_pdu_length()
1412 &&(!p_dlcb->remote_busy) in llcp_dlc_get_next_pdu_length()
1413 &&(llcp_dlc_is_rw_open (p_dlcb)) ) in llcp_dlc_get_next_pdu_length()
1415 p_msg = (BT_HDR *) p_dlcb->i_xmit_q.p_first; in llcp_dlc_get_next_pdu_length()