Lines Matching refs:ctrl_word
88 static bool process_reqseq(tL2C_CCB* p_ccb, uint16_t ctrl_word);
89 static void process_s_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word);
90 static void process_i_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word,
97 uint16_t ctrl_word);
415 uint16_t ctrl_word; in prepare_I_frame() local
424 STREAM_TO_UINT16(ctrl_word, p); in prepare_I_frame()
426 ctrl_word &= ~(L2CAP_FCR_REQ_SEQ_BITS + L2CAP_FCR_F_BIT); in prepare_I_frame()
428 ctrl_word = p_buf->layer_specific & L2CAP_FCR_SEG_BITS; /* SAR bits */ in prepare_I_frame()
429 ctrl_word |= in prepare_I_frame()
437 if (set_f_bit) ctrl_word |= L2CAP_FCR_F_BIT; in prepare_I_frame()
439 ctrl_word |= (p_fcrb->next_seq_expected) << L2CAP_FCR_REQ_SEQ_BITS_SHIFT; in prepare_I_frame()
449 UINT16_TO_STREAM(p, ctrl_word); in prepare_I_frame()
477 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in prepare_I_frame()
478 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in prepare_I_frame()
479 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in prepare_I_frame()
480 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in prepare_I_frame()
486 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in prepare_I_frame()
487 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in prepare_I_frame()
488 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in prepare_I_frame()
489 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in prepare_I_frame()
510 uint16_t ctrl_word; in l2c_fcr_send_S_frame() local
527 ctrl_word = (function_code << L2CAP_FCR_SUP_SHIFT) | L2CAP_FCR_S_FRAME_BIT; in l2c_fcr_send_S_frame()
528 ctrl_word |= (p_ccb->fcrb.next_seq_expected << L2CAP_FCR_REQ_SEQ_BITS_SHIFT); in l2c_fcr_send_S_frame()
529 ctrl_word |= pf_bit; in l2c_fcr_send_S_frame()
541 UINT16_TO_STREAM(p, ctrl_word); in l2c_fcr_send_S_frame()
559 if ((((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 1) || in l2c_fcr_send_S_frame()
560 (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3)) { in l2c_fcr_send_S_frame()
564 p_ccb->local_cid, ctrl_word, in l2c_fcr_send_S_frame()
565 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_send_S_frame()
566 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_send_S_frame()
567 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_send_S_frame()
568 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_send_S_frame()
574 p_ccb->local_cid, ctrl_word, in l2c_fcr_send_S_frame()
575 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_send_S_frame()
576 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_send_S_frame()
577 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_send_S_frame()
578 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_send_S_frame()
606 uint16_t ctrl_word; in l2c_fcr_proc_pdu() local
627 STREAM_TO_UINT16(ctrl_word, p); in l2c_fcr_proc_pdu()
629 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) { in l2c_fcr_proc_pdu()
630 if ((((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 1) || in l2c_fcr_proc_pdu()
631 (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3)) { in l2c_fcr_proc_pdu()
637 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_proc_pdu()
638 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
639 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_proc_pdu()
640 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
646 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_proc_pdu()
647 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
648 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_proc_pdu()
649 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
656 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in l2c_fcr_proc_pdu()
657 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
658 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
659 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
688 STREAM_TO_UINT16(ctrl_word, p); in l2c_fcr_proc_pdu()
696 if (!(ctrl_word & L2CAP_FCR_F_BIT)) { in l2c_fcr_proc_pdu()
697 if ((ctrl_word & L2CAP_FCR_P_BIT) && in l2c_fcr_proc_pdu()
698 (ctrl_word & L2CAP_FCR_S_FRAME_BIT)) { in l2c_fcr_proc_pdu()
722 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) ctrl_word &= ~L2CAP_FCR_P_BIT; in l2c_fcr_proc_pdu()
730 ctrl_word &= ~L2CAP_FCR_F_BIT; in l2c_fcr_proc_pdu()
734 if (!process_reqseq(p_ccb, ctrl_word)) { in l2c_fcr_proc_pdu()
740 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) in l2c_fcr_proc_pdu()
741 process_s_frame(p_ccb, p_buf, ctrl_word); in l2c_fcr_proc_pdu()
743 process_i_frame(p_ccb, p_buf, ctrl_word, false); in l2c_fcr_proc_pdu()
761 STREAM_TO_UINT16(ctrl_word, p); in l2c_fcr_proc_pdu()
767 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
772 process_i_frame(p_ccb, p_buf, ctrl_word, true); in l2c_fcr_proc_pdu()
973 static bool process_reqseq(tL2C_CCB* p_ccb, uint16_t ctrl_word) { in process_reqseq() argument
982 if ((ctrl_word & L2CAP_FCR_S_FRAME_BIT) && in process_reqseq()
983 ((ctrl_word & L2CAP_FCR_SUP_BITS) == in process_reqseq()
985 ((ctrl_word & L2CAP_FCR_P_BIT) == 0)) { in process_reqseq()
995 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT; in process_reqseq()
1005 ctrl_word, req_seq, p_fcrb->last_rx_ack, in process_reqseq()
1068 uint16_t ctrl_word) { in process_s_frame() argument
1074 (ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT; in process_s_frame()
1083 ctrl_word, p_fcrb->remote_busy); in process_s_frame()
1089 if (ctrl_word & L2CAP_FCR_P_BIT) { in process_s_frame()
1099 if ((ctrl_word & L2CAP_FCR_F_BIT) || (remote_was_busy)) in process_s_frame()
1116 p_ccb, (uint8_t)((ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> in process_s_frame()
1148 static void process_i_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word, in process_i_frame() argument
1158 if (ctrl_word & L2CAP_FCR_F_BIT) { in process_i_frame()
1171 tx_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in process_i_frame()
1289 if (!do_sar_reassembly(p_ccb, p_buf, ctrl_word)) { in process_i_frame()
1334 uint16_t ctrl_word; in process_stream_frame() local
1358 STREAM_TO_UINT16(ctrl_word, p); in process_stream_frame()
1364 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) { in process_stream_frame()
1368 p_ccb->local_cid, ctrl_word); in process_stream_frame()
1377 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in process_stream_frame()
1378 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in process_stream_frame()
1379 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in process_stream_frame()
1380 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in process_stream_frame()
1383 tx_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in process_stream_frame()
1399 if (!do_sar_reassembly(p_ccb, p_buf, ctrl_word)) { in process_stream_frame()
1415 uint16_t ctrl_word) { in do_sar_reassembly() argument
1420 uint16_t sar_type = ctrl_word & L2CAP_FCR_SEG_BITS; in do_sar_reassembly()
1534 uint16_t ctrl_word; in retransmit_i_frames() local
1567 STREAM_TO_UINT16(ctrl_word, p); in retransmit_i_frames()
1570 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in retransmit_i_frames()