Lines Matching refs:ctrl_word
90 static bool process_reqseq(tL2C_CCB* p_ccb, uint16_t ctrl_word);
91 static void process_s_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word);
92 static void process_i_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word,
99 uint16_t ctrl_word);
417 uint16_t ctrl_word; in prepare_I_frame() local
426 STREAM_TO_UINT16(ctrl_word, p); in prepare_I_frame()
428 ctrl_word &= ~(L2CAP_FCR_REQ_SEQ_BITS + L2CAP_FCR_F_BIT); in prepare_I_frame()
430 ctrl_word = p_buf->layer_specific & L2CAP_FCR_SEG_BITS; /* SAR bits */ in prepare_I_frame()
431 ctrl_word |= in prepare_I_frame()
439 if (set_f_bit) ctrl_word |= L2CAP_FCR_F_BIT; in prepare_I_frame()
441 ctrl_word |= (p_fcrb->next_seq_expected) << L2CAP_FCR_REQ_SEQ_BITS_SHIFT; in prepare_I_frame()
451 UINT16_TO_STREAM(p, ctrl_word); in prepare_I_frame()
479 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in prepare_I_frame()
480 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in prepare_I_frame()
481 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in prepare_I_frame()
482 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in prepare_I_frame()
488 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in prepare_I_frame()
489 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in prepare_I_frame()
490 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in prepare_I_frame()
491 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in prepare_I_frame()
512 uint16_t ctrl_word; in l2c_fcr_send_S_frame() local
529 ctrl_word = (function_code << L2CAP_FCR_SUP_SHIFT) | L2CAP_FCR_S_FRAME_BIT; in l2c_fcr_send_S_frame()
530 ctrl_word |= (p_ccb->fcrb.next_seq_expected << L2CAP_FCR_REQ_SEQ_BITS_SHIFT); in l2c_fcr_send_S_frame()
531 ctrl_word |= pf_bit; in l2c_fcr_send_S_frame()
543 UINT16_TO_STREAM(p, ctrl_word); in l2c_fcr_send_S_frame()
561 if ((((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 1) || in l2c_fcr_send_S_frame()
562 (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3)) { in l2c_fcr_send_S_frame()
566 p_ccb->local_cid, ctrl_word, in l2c_fcr_send_S_frame()
567 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_send_S_frame()
568 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_send_S_frame()
569 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_send_S_frame()
570 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_send_S_frame()
576 p_ccb->local_cid, ctrl_word, in l2c_fcr_send_S_frame()
577 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_send_S_frame()
578 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_send_S_frame()
579 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_send_S_frame()
580 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_send_S_frame()
608 uint16_t ctrl_word; in l2c_fcr_proc_pdu() local
629 STREAM_TO_UINT16(ctrl_word, p); in l2c_fcr_proc_pdu()
631 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) { in l2c_fcr_proc_pdu()
632 if ((((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 1) || in l2c_fcr_proc_pdu()
633 (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3)) { in l2c_fcr_proc_pdu()
639 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_proc_pdu()
640 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
641 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_proc_pdu()
642 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
648 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_proc_pdu()
649 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
650 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_proc_pdu()
651 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
658 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in l2c_fcr_proc_pdu()
659 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
660 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
661 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
690 STREAM_TO_UINT16(ctrl_word, p); in l2c_fcr_proc_pdu()
698 if (!(ctrl_word & L2CAP_FCR_F_BIT)) { in l2c_fcr_proc_pdu()
699 if ((ctrl_word & L2CAP_FCR_P_BIT) && in l2c_fcr_proc_pdu()
700 (ctrl_word & L2CAP_FCR_S_FRAME_BIT)) { in l2c_fcr_proc_pdu()
726 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) ctrl_word &= ~L2CAP_FCR_P_BIT; in l2c_fcr_proc_pdu()
734 ctrl_word &= ~L2CAP_FCR_F_BIT; in l2c_fcr_proc_pdu()
738 if (!process_reqseq(p_ccb, ctrl_word)) { in l2c_fcr_proc_pdu()
744 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) in l2c_fcr_proc_pdu()
745 process_s_frame(p_ccb, p_buf, ctrl_word); in l2c_fcr_proc_pdu()
747 process_i_frame(p_ccb, p_buf, ctrl_word, false); in l2c_fcr_proc_pdu()
765 STREAM_TO_UINT16(ctrl_word, p); in l2c_fcr_proc_pdu()
771 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
776 process_i_frame(p_ccb, p_buf, ctrl_word, true); in l2c_fcr_proc_pdu()
985 static bool process_reqseq(tL2C_CCB* p_ccb, uint16_t ctrl_word) { in process_reqseq() argument
994 if ((ctrl_word & L2CAP_FCR_S_FRAME_BIT) && in process_reqseq()
995 ((ctrl_word & L2CAP_FCR_SUP_BITS) == in process_reqseq()
997 ((ctrl_word & L2CAP_FCR_P_BIT) == 0)) { in process_reqseq()
1007 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT; in process_reqseq()
1017 ctrl_word, req_seq, p_fcrb->last_rx_ack, in process_reqseq()
1080 uint16_t ctrl_word) { in process_s_frame() argument
1086 (ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT; in process_s_frame()
1095 ctrl_word, p_fcrb->remote_busy); in process_s_frame()
1101 if (ctrl_word & L2CAP_FCR_P_BIT) { in process_s_frame()
1111 if ((ctrl_word & L2CAP_FCR_F_BIT) || (remote_was_busy)) in process_s_frame()
1128 p_ccb, (uint8_t)((ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> in process_s_frame()
1162 static void process_i_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word, in process_i_frame() argument
1172 if (ctrl_word & L2CAP_FCR_F_BIT) { in process_i_frame()
1185 tx_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in process_i_frame()
1312 if (!do_sar_reassembly(p_ccb, p_buf, ctrl_word)) { in process_i_frame()
1361 uint16_t ctrl_word; in process_stream_frame() local
1385 STREAM_TO_UINT16(ctrl_word, p); in process_stream_frame()
1391 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) { in process_stream_frame()
1395 p_ccb->local_cid, ctrl_word); in process_stream_frame()
1404 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in process_stream_frame()
1405 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in process_stream_frame()
1406 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in process_stream_frame()
1407 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in process_stream_frame()
1410 tx_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in process_stream_frame()
1426 if (!do_sar_reassembly(p_ccb, p_buf, ctrl_word)) { in process_stream_frame()
1442 uint16_t ctrl_word) { in do_sar_reassembly() argument
1447 uint16_t sar_type = ctrl_word & L2CAP_FCR_SEG_BITS; in do_sar_reassembly()
1561 uint16_t ctrl_word; in retransmit_i_frames() local
1594 STREAM_TO_UINT16(ctrl_word, p); in retransmit_i_frames()
1597 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in retransmit_i_frames()