Lines Matching refs:p_fcrb
208 tL2C_FCRB* p_fcrb = &p_ccb->fcrb; in l2c_fcr_cleanup() local
210 alarm_free(p_fcrb->mon_retrans_timer); in l2c_fcr_cleanup()
211 p_fcrb->mon_retrans_timer = NULL; in l2c_fcr_cleanup()
212 alarm_free(p_fcrb->ack_timer); in l2c_fcr_cleanup()
213 p_fcrb->ack_timer = NULL; in l2c_fcr_cleanup()
215 osi_free_and_reset((void**)&p_fcrb->p_rx_sdu); in l2c_fcr_cleanup()
217 fixed_queue_free(p_fcrb->waiting_for_ack_q, osi_free); in l2c_fcr_cleanup()
218 p_fcrb->waiting_for_ack_q = NULL; in l2c_fcr_cleanup()
220 fixed_queue_free(p_fcrb->srej_rcv_hold_q, osi_free); in l2c_fcr_cleanup()
221 p_fcrb->srej_rcv_hold_q = NULL; in l2c_fcr_cleanup()
223 fixed_queue_free(p_fcrb->retrans_q, osi_free); in l2c_fcr_cleanup()
224 p_fcrb->retrans_q = NULL; in l2c_fcr_cleanup()
226 memset(p_fcrb, 0, sizeof(tL2C_FCRB)); in l2c_fcr_cleanup()
294 tL2C_FCRB* p_fcrb = &p_ccb->fcrb; in prepare_I_frame() local
298 bool set_f_bit = p_fcrb->send_f_rsp; in prepare_I_frame()
300 p_fcrb->send_f_rsp = false; in prepare_I_frame()
312 (p_fcrb->next_tx_seq << L2CAP_FCR_TX_SEQ_BITS_SHIFT); /* Tx Seq */ in prepare_I_frame()
314 p_fcrb->next_tx_seq = (p_fcrb->next_tx_seq + 1) & L2CAP_FCR_SEQ_MODULO; in prepare_I_frame()
321 ctrl_word |= (p_fcrb->next_seq_expected) << L2CAP_FCR_REQ_SEQ_BITS_SHIFT; in prepare_I_frame()
323 p_fcrb->last_ack_sent = p_ccb->fcrb.next_seq_expected; in prepare_I_frame()
828 tL2C_FCRB* p_fcrb = &p_ccb->fcrb; in process_reqseq() local
840 if (!fixed_queue_is_empty(p_fcrb->waiting_for_ack_q)) in process_reqseq()
850 num_bufs_acked = (req_seq - p_fcrb->last_rx_ack) & L2CAP_FCR_SEQ_MODULO; in process_reqseq()
853 if (num_bufs_acked > fixed_queue_length(p_fcrb->waiting_for_ack_q)) { in process_reqseq()
858 ctrl_word, req_seq, p_fcrb->last_rx_ack, in process_reqseq()
859 fixed_queue_length(p_fcrb->waiting_for_ack_q)); in process_reqseq()
865 p_fcrb->last_rx_ack = req_seq; in process_reqseq()
870 p_fcrb->num_tries = 0; in process_reqseq()
875 (BT_HDR*)fixed_queue_try_dequeue(p_fcrb->waiting_for_ack_q); in process_reqseq()
891 if (fixed_queue_is_empty(p_fcrb->waiting_for_ack_q) && in process_reqseq()
902 if (!fixed_queue_is_empty(p_fcrb->waiting_for_ack_q)) in process_reqseq()
921 tL2C_FCRB* p_fcrb = &p_ccb->fcrb; in process_s_frame() local
932 ctrl_word, p_fcrb->remote_busy); in process_s_frame()
935 p_fcrb->rej_sent = false; /* After checkpoint, we can send anoher REJ */ in process_s_frame()
936 p_fcrb->send_f_rsp = true; /* Set a flag in case an I-frame is pending */ in process_s_frame()
941 remote_was_busy = p_fcrb->remote_busy; in process_s_frame()
942 p_fcrb->remote_busy = false; in process_s_frame()
949 p_fcrb->remote_busy = false; in process_s_frame()
954 p_fcrb->remote_busy = true; in process_s_frame()
959 p_fcrb->remote_busy = false; in process_s_frame()
969 if (p_fcrb->send_f_rsp) { in process_s_frame()
970 if (p_fcrb->srej_sent) in process_s_frame()
975 p_fcrb->send_f_rsp = false; in process_s_frame()
998 tL2C_FCRB* p_fcrb = &p_ccb->fcrb; in process_i_frame() local
1014 if (tx_seq != p_fcrb->next_seq_expected) { in process_i_frame()
1015 num_lost = (tx_seq - p_fcrb->next_seq_expected) & L2CAP_FCR_SEQ_MODULO; in process_i_frame()
1023 tx_seq, p_fcrb->next_seq_expected); in process_i_frame()
1029 p_ccb->local_cid, num_lost, tx_seq, p_fcrb->next_seq_expected, in process_i_frame()
1030 p_fcrb->rej_sent, p_fcrb->srej_sent); in process_i_frame()
1032 if (p_fcrb->srej_sent) { in process_i_frame()
1036 (((BT_HDR*)fixed_queue_try_peek_last(p_fcrb->srej_rcv_hold_q)) in process_i_frame()
1042 (fixed_queue_length(p_fcrb->srej_rcv_hold_q) < in process_i_frame()
1047 num_lost, tx_seq, p_fcrb->next_seq_expected, p_fcrb->rej_sent); in process_i_frame()
1050 fixed_queue_enqueue(p_fcrb->srej_rcv_hold_q, p_buf); in process_i_frame()
1056 fixed_queue_length(p_fcrb->srej_rcv_hold_q), in process_i_frame()
1059 p_fcrb->rej_after_srej = true; in process_i_frame()
1062 } else if (p_fcrb->rej_sent) { in process_i_frame()
1066 p_ccb->local_cid, num_lost, tx_seq, p_fcrb->next_seq_expected, in process_i_frame()
1067 p_fcrb->srej_sent); in process_i_frame()
1074 p_ccb->local_cid, tx_seq, p_fcrb->next_seq_expected, in process_i_frame()
1075 p_fcrb->rej_sent); in process_i_frame()
1080 p_fcrb->rej_sent = true; in process_i_frame()
1083 if (!fixed_queue_is_empty(p_fcrb->srej_rcv_hold_q)) { in process_i_frame()
1088 fixed_queue_length(p_fcrb->srej_rcv_hold_q)); in process_i_frame()
1091 fixed_queue_enqueue(p_fcrb->srej_rcv_hold_q, p_buf); in process_i_frame()
1092 p_fcrb->srej_sent = true; in process_i_frame()
1103 p_fcrb->rej_sent = p_fcrb->srej_sent = false; in process_i_frame()
1108 p_fcrb->next_seq_expected = (tx_seq + 1) & L2CAP_FCR_SEQ_MODULO; in process_i_frame()
1120 num_to_ack = (p_fcrb->next_seq_expected - p_fcrb->last_ack_sent) & in process_i_frame()
1157 tL2C_FCRB* p_fcrb = &p_ccb->fcrb; in do_sar_reassembly() local
1164 if (p_fcrb->p_rx_sdu != NULL) { in do_sar_reassembly()
1168 p_fcrb->rx_sdu_len, p_fcrb->p_rx_sdu->len); in do_sar_reassembly()
1179 if (p_fcrb->p_rx_sdu == NULL) { in do_sar_reassembly()
1191 STREAM_TO_UINT16(p_fcrb->rx_sdu_len, p); in do_sar_reassembly()
1195 if (p_fcrb->rx_sdu_len > p_ccb->max_rx_mtu) { in do_sar_reassembly()
1197 p_fcrb->rx_sdu_len, p_ccb->max_rx_mtu); in do_sar_reassembly()
1200 p_fcrb->p_rx_sdu = (BT_HDR*)osi_malloc( in do_sar_reassembly()
1201 BT_HDR_SIZE + OBX_BUF_MIN_OFFSET + p_fcrb->rx_sdu_len); in do_sar_reassembly()
1202 p_fcrb->p_rx_sdu->offset = OBX_BUF_MIN_OFFSET; in do_sar_reassembly()
1203 p_fcrb->p_rx_sdu->len = 0; in do_sar_reassembly()
1208 if ((p_fcrb->p_rx_sdu->len + p_buf->len) > p_fcrb->rx_sdu_len) { in do_sar_reassembly()
1211 p_fcrb->p_rx_sdu->len, p_buf->len, p_fcrb->rx_sdu_len); in do_sar_reassembly()
1214 ((p_fcrb->p_rx_sdu->len + p_buf->len) != p_fcrb->rx_sdu_len)) { in do_sar_reassembly()
1216 p_fcrb->p_rx_sdu->len, p_buf->len, in do_sar_reassembly()
1217 p_fcrb->rx_sdu_len); in do_sar_reassembly()
1220 memcpy(((uint8_t*)(p_fcrb->p_rx_sdu + 1)) + p_fcrb->p_rx_sdu->offset + in do_sar_reassembly()
1221 p_fcrb->p_rx_sdu->len, in do_sar_reassembly()
1224 p_fcrb->p_rx_sdu->len += p_buf->len; in do_sar_reassembly()
1230 p_buf = p_fcrb->p_rx_sdu; in do_sar_reassembly()
1231 p_fcrb->p_rx_sdu = NULL; in do_sar_reassembly()