Lines Matching refs:lcb
90 if ( (llcp_cb.lcb.inact_timer.in_use == FALSE) in llcp_link_start_inactivity_timer()
91 &&(llcp_cb.lcb.inact_timeout > 0) ) in llcp_link_start_inactivity_timer()
93 LLCP_TRACE_DEBUG1 ("Start inactivity_timer: %d ms", llcp_cb.lcb.inact_timeout); in llcp_link_start_inactivity_timer()
95 nfc_start_quick_timer (&llcp_cb.lcb.inact_timer, NFC_TTYPE_LLCP_LINK_INACT, in llcp_link_start_inactivity_timer()
96 … ((UINT32) llcp_cb.lcb.inact_timeout) * QUICK_TIMER_TICKS_PER_SEC / 1000); in llcp_link_start_inactivity_timer()
111 if (llcp_cb.lcb.inact_timer.in_use) in llcp_link_stop_inactivity_timer()
115 nfc_stop_quick_timer (&llcp_cb.lcb.inact_timer); in llcp_link_stop_inactivity_timer()
130 if (llcp_cb.lcb.symm_state == LLCP_LINK_SYMM_LOCAL_XMIT_NEXT) in llcp_link_start_link_timer()
133 nfc_start_quick_timer (&llcp_cb.lcb.timer, NFC_TTYPE_LLCP_LINK_MANAGER, in llcp_link_start_link_timer()
134 … (((UINT32) llcp_cb.lcb.symm_delay) * QUICK_TIMER_TICKS_PER_SEC) / 1000); in llcp_link_start_link_timer()
139 nfc_start_quick_timer (&llcp_cb.lcb.timer, NFC_TTYPE_LLCP_LINK_MANAGER, in llcp_link_start_link_timer()
140 ((UINT32) llcp_cb.lcb.peer_lto) * QUICK_TIMER_TICKS_PER_SEC / 1000); in llcp_link_start_link_timer()
155 nfc_stop_quick_timer (&llcp_cb.lcb.timer); in llcp_link_stop_link_timer()
185 (*llcp_cb.lcb.p_link_cback) (LLCP_LINK_ACTIVATION_FAILED_EVT, LLCP_LINK_BAD_GEN_BYTES); in llcp_link_activate()
190 llcp_cb.lcb.link_state = LLCP_LINK_STATE_ACTIVATION_FAILED; in llcp_link_activate()
200 if ((p_config->is_initiator) && (llcp_link_rwt[p_config->waiting_time] > llcp_cb.lcb.peer_lto)) in llcp_link_activate()
205 llcp_cb.lcb.peer_lto); in llcp_link_activate()
209 llcp_cb.lcb.peer_lto += LLCP_INTERNAL_TX_DELAY + LLCP_INTERNAL_RX_DELAY; in llcp_link_activate()
215 (*llcp_cb.lcb.p_link_cback) (LLCP_LINK_ACTIVATION_FAILED_EVT, LLCP_LINK_VERSION_FAILED); in llcp_link_activate()
220 llcp_cb.lcb.link_state = LLCP_LINK_STATE_ACTIVATION_FAILED; in llcp_link_activate()
226 llcp_cb.lcb.received_first_packet = FALSE; in llcp_link_activate()
227 llcp_cb.lcb.is_initiator = p_config->is_initiator; in llcp_link_activate()
230 llcp_cb.lcb.flags = 0x00; in llcp_link_activate()
234 if (llcp_cb.lcb.local_link_miu >= llcp_cb.lcb.peer_miu) in llcp_link_activate()
235 llcp_cb.lcb.effective_miu = llcp_cb.lcb.peer_miu; in llcp_link_activate()
237 llcp_cb.lcb.effective_miu = llcp_cb.lcb.local_link_miu; in llcp_link_activate()
243 if (llcp_cb.lcb.is_initiator) in llcp_link_activate()
247 llcp_cb.lcb.inact_timeout = llcp_cb.lcb.inact_timeout_init; in llcp_link_activate()
248 llcp_cb.lcb.symm_state = LLCP_LINK_SYMM_LOCAL_XMIT_NEXT; in llcp_link_activate()
250 if (llcp_cb.lcb.delay_first_pdu_timeout > 0) in llcp_link_activate()
253 nfc_start_quick_timer (&llcp_cb.lcb.timer, NFC_TTYPE_LLCP_DELAY_FIRST_PDU, in llcp_link_activate()
254 … (((UINT32) llcp_cb.lcb.delay_first_pdu_timeout) * QUICK_TIMER_TICKS_PER_SEC) / 1000); in llcp_link_activate()
264 llcp_cb.lcb.inact_timeout = llcp_cb.lcb.inact_timeout_target; in llcp_link_activate()
265 llcp_cb.lcb.symm_state = LLCP_LINK_SYMM_REMOTE_XMIT_NEXT; in llcp_link_activate()
276 llcp_cb.lcb.link_state = LLCP_LINK_STATE_ACTIVATED; in llcp_link_activate()
279 (*llcp_cb.lcb.p_link_cback) (LLCP_LINK_ACTIVATION_COMPLETE_EVT, LLCP_LINK_SUCCESS); in llcp_link_activate()
307 llcp_cb.lcb.link_state = LLCP_LINK_STATE_DEACTIVATED; in llcp_deactivate_cleanup()
315 (*llcp_cb.lcb.p_link_cback) (LLCP_LINK_DEACTIVATED_EVT, reason); in llcp_deactivate_cleanup()
329 if (llcp_cb.lcb.link_state == LLCP_LINK_STATE_ACTIVATED) in llcp_link_process_link_timeout()
331 … if ((llcp_cb.lcb.symm_delay > 0) && (llcp_cb.lcb.symm_state == LLCP_LINK_SYMM_LOCAL_XMIT_NEXT)) in llcp_link_process_link_timeout()
352 else if (llcp_cb.lcb.link_state == LLCP_LINK_STATE_DEACTIVATING) in llcp_link_process_link_timeout()
354 llcp_deactivate_cleanup (llcp_cb.lcb.link_deact_reason); in llcp_link_process_link_timeout()
378 while (llcp_cb.lcb.sig_xmit_q.p_first) in llcp_link_deactivate()
379 GKI_freebuf (GKI_dequeue (&llcp_cb.lcb.sig_xmit_q)); in llcp_link_deactivate()
429 llcp_cb.lcb.link_state = LLCP_LINK_STATE_DEACTIVATING; in llcp_link_deactivate()
431 if (llcp_cb.lcb.sig_xmit_q.count == 0) in llcp_link_deactivate()
434 nfc_start_quick_timer (&llcp_cb.lcb.timer, NFC_TTYPE_LLCP_LINK_MANAGER, in llcp_link_deactivate()
438 llcp_cb.lcb.link_deact_reason = reason; in llcp_link_deactivate()
442 &&(!llcp_cb.lcb.is_initiator) ) in llcp_link_deactivate()
451 &&(!(llcp_cb.lcb.flags & LLCP_LINK_FLAGS_RX_ANY_LLC_PDU))) in llcp_link_deactivate()
482 llcp_cb.lcb.peer_miu = LLCP_DEFAULT_MIU; in llcp_link_parse_gen_bytes()
483 llcp_cb.lcb.peer_lto = LLCP_DEFAULT_LTO_IN_MS; in llcp_link_parse_gen_bytes()
508 peer_major_version = LLCP_GET_MAJOR_VERSION (llcp_cb.lcb.peer_version); in llcp_link_version_agreement()
509 peer_minor_version = LLCP_GET_MINOR_VERSION (llcp_cb.lcb.peer_version); in llcp_link_version_agreement()
520 llcp_cb.lcb.agreed_major_version = LLCP_VERSION_MAJOR; in llcp_link_version_agreement()
523 llcp_cb.lcb.agreed_minor_version = LLCP_VERSION_MINOR; in llcp_link_version_agreement()
527 llcp_cb.lcb.agreed_minor_version = peer_minor_version; in llcp_link_version_agreement()
533 llcp_cb.lcb.agreed_major_version = peer_major_version; in llcp_link_version_agreement()
534 llcp_cb.lcb.agreed_minor_version = peer_minor_version; in llcp_link_version_agreement()
539 llcp_cb.lcb.agreed_major_version = LLCP_VERSION_MAJOR; in llcp_link_version_agreement()
540 llcp_cb.lcb.agreed_minor_version = LLCP_VERSION_MINOR; in llcp_link_version_agreement()
546 llcp_cb.lcb.agreed_major_version, llcp_cb.lcb.agreed_minor_version); in llcp_link_version_agreement()
569 data.link_status.is_initiator = llcp_cb.lcb.is_initiator; in llcp_link_update_status()
881 if (llcp_cb.lcb.is_sending_data) in llcp_link_check_send_data()
884 llcp_cb.lcb.is_sending_data = TRUE; in llcp_link_check_send_data()
892 if (llcp_cb.lcb.symm_state == LLCP_LINK_SYMM_LOCAL_XMIT_NEXT) in llcp_link_check_send_data()
925 if (llcp_cb.lcb.link_state == LLCP_LINK_STATE_ACTIVATED) in llcp_link_check_send_data()
927 if (llcp_cb.lcb.symm_delay > 0) in llcp_link_check_send_data()
931 llcp_cb.lcb.is_sending_data = FALSE; in llcp_link_check_send_data()
947 llcp_cb.lcb.is_sending_data = FALSE; in llcp_link_check_send_data()
952 if (llcp_cb.lcb.link_state == LLCP_LINK_STATE_DEACTIVATING) in llcp_link_check_send_data()
955 nfc_start_quick_timer (&llcp_cb.lcb.timer, NFC_TTYPE_LLCP_LINK_MANAGER, in llcp_link_check_send_data()
965 llcp_cb.lcb.is_sending_data = FALSE; in llcp_link_check_send_data()
1322 if (llcp_cb.lcb.symm_state == LLCP_LINK_SYMM_REMOTE_XMIT_NEXT) in llcp_link_proc_rx_data()
1326 if (llcp_cb.lcb.received_first_packet == FALSE) in llcp_link_proc_rx_data()
1328 llcp_cb.lcb.received_first_packet = TRUE; in llcp_link_proc_rx_data()
1329 (*llcp_cb.lcb.p_link_cback) (LLCP_LINK_FIRST_PACKET_RECEIVED_EVT, LLCP_LINK_SUCCESS); in llcp_link_proc_rx_data()
1331 if ( (llcp_cb.lcb.link_state == LLCP_LINK_STATE_DEACTIVATING) in llcp_link_proc_rx_data()
1332 &&(llcp_cb.lcb.sig_xmit_q.count == 0) ) in llcp_link_proc_rx_data()
1375 if ((!frame_error) && (info_length > llcp_cb.lcb.local_link_miu)) in llcp_link_proc_rx_data()
1378 llcp_cb.lcb.local_link_miu, info_length); in llcp_link_proc_rx_data()
1408 llcp_cb.lcb.symm_state = LLCP_LINK_SYMM_LOCAL_XMIT_NEXT; in llcp_link_proc_rx_data()
1440 if (llcp_cb.lcb.sig_xmit_q.p_first) in llcp_link_get_next_pdu()
1444 p_msg = (BT_HDR*) llcp_cb.lcb.sig_xmit_q.p_first; in llcp_link_get_next_pdu()
1449 p_msg = (BT_HDR*) GKI_dequeue (&llcp_cb.lcb.sig_xmit_q); in llcp_link_get_next_pdu()
1458 if (!llcp_cb.lcb.ll_served) in llcp_link_get_next_pdu()
1464 p_app_cb = llcp_util_get_app_cb (llcp_cb.lcb.ll_idx); in llcp_link_get_next_pdu()
1480 llcp_cb.lcb.ll_served = !llcp_cb.lcb.ll_served; in llcp_link_get_next_pdu()
1486 llcp_cb.lcb.ll_idx = (llcp_cb.lcb.ll_idx + 1) % LLCP_NUM_SAPS; in llcp_link_get_next_pdu()
1494 llcp_cb.lcb.ll_idx = (llcp_cb.lcb.ll_idx + 1) % LLCP_NUM_SAPS; in llcp_link_get_next_pdu()
1499 llcp_cb.lcb.ll_served = !llcp_cb.lcb.ll_served; in llcp_link_get_next_pdu()
1507 if (llcp_cb.dlcb[llcp_cb.lcb.dl_idx].state != LLCP_DLC_STATE_IDLE) in llcp_link_get_next_pdu()
1511 … *p_next_pdu_length = llcp_dlc_get_next_pdu_length (&llcp_cb.dlcb[llcp_cb.lcb.dl_idx]); in llcp_link_get_next_pdu()
1521 llcp_cb.lcb.dl_idx = (llcp_cb.lcb.dl_idx + 1) % LLCP_MAX_DATA_LINK; in llcp_link_get_next_pdu()
1526 p_msg = llcp_dlc_get_next_pdu (&llcp_cb.dlcb[llcp_cb.lcb.dl_idx]); in llcp_link_get_next_pdu()
1529 llcp_cb.lcb.dl_idx = (llcp_cb.lcb.dl_idx + 1) % LLCP_MAX_DATA_LINK; in llcp_link_get_next_pdu()
1534 llcp_cb.lcb.ll_served = !llcp_cb.lcb.ll_served; in llcp_link_get_next_pdu()
1542 llcp_cb.lcb.dl_idx = (llcp_cb.lcb.dl_idx + 1) % LLCP_MAX_DATA_LINK; in llcp_link_get_next_pdu()
1549 llcp_cb.lcb.ll_served = !llcp_cb.lcb.ll_served; in llcp_link_get_next_pdu()
1618 if (2 + p_msg->len + 2 + next_pdu_length <= llcp_cb.lcb.effective_miu) in llcp_link_build_next_pdu()
1649 if (p_agf->len - LLCP_PDU_HEADER_SIZE + 2 + next_pdu_length <= llcp_cb.lcb.effective_miu) in llcp_link_build_next_pdu()
1693 llcp_cb.lcb.symm_state = LLCP_LINK_SYMM_REMOTE_XMIT_NEXT; in llcp_link_send_to_lower()
1714 if (llcp_cb.lcb.link_state == LLCP_LINK_STATE_DEACTIVATED) in llcp_link_connection_cback()
1720 else if (llcp_cb.lcb.link_state == LLCP_LINK_STATE_ACTIVATION_FAILED) in llcp_link_connection_cback()
1730 llcp_cb.lcb.flags |= LLCP_LINK_FLAGS_RX_ANY_LLC_PDU; in llcp_link_connection_cback()
1741 if ( (llcp_cb.lcb.link_state == LLCP_LINK_STATE_DEACTIVATING) in llcp_link_connection_cback()
1742 &&(!llcp_cb.lcb.is_initiator) ) in llcp_link_connection_cback()
1748 else if (llcp_cb.lcb.link_state == LLCP_LINK_STATE_ACTIVATION_FAILED) in llcp_link_connection_cback()
1752 llcp_cb.lcb.link_state = LLCP_LINK_STATE_DEACTIVATED; in llcp_link_connection_cback()
1754 else if (llcp_cb.lcb.link_state != LLCP_LINK_STATE_DEACTIVATED) in llcp_link_connection_cback()
1763 if (llcp_cb.lcb.symm_state == LLCP_LINK_SYMM_REMOTE_XMIT_NEXT) in llcp_link_connection_cback()