Lines Matching refs:ctrl_word

95 static BOOLEAN process_reqseq (tL2C_CCB *p_ccb, UINT16 ctrl_word);
96 static void process_s_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word);
97 static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, BOOLEAN delay_ack…
101 static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word);
403 UINT16 ctrl_word; in prepare_I_frame() local
413 STREAM_TO_UINT16 (ctrl_word, p); in prepare_I_frame()
415 ctrl_word &= ~(L2CAP_FCR_REQ_SEQ_BITS + L2CAP_FCR_F_BIT); in prepare_I_frame()
419 ctrl_word = p_buf->layer_specific & L2CAP_FCR_SEG_BITS; /* SAR bits */ in prepare_I_frame()
420 ctrl_word |= (p_fcrb->next_tx_seq << L2CAP_FCR_TX_SEQ_BITS_SHIFT); /* Tx Seq */ in prepare_I_frame()
429 ctrl_word |= L2CAP_FCR_F_BIT; in prepare_I_frame()
431 ctrl_word |= (p_fcrb->next_seq_expected) << L2CAP_FCR_REQ_SEQ_BITS_SHIFT; in prepare_I_frame()
441 UINT16_TO_STREAM (p, ctrl_word); in prepare_I_frame()
470 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in prepare_I_frame()
471 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in prepare_I_frame()
472 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in prepare_I_frame()
473 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); 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()
504 UINT16 ctrl_word; in l2c_fcr_send_S_frame() local
523 ctrl_word = (function_code << L2CAP_FCR_SUP_SHIFT) | L2CAP_FCR_S_FRAME_BIT; in l2c_fcr_send_S_frame()
524 ctrl_word |= (p_ccb->fcrb.next_seq_expected << L2CAP_FCR_REQ_SEQ_BITS_SHIFT); in l2c_fcr_send_S_frame()
525 ctrl_word |= pf_bit; in l2c_fcr_send_S_frame()
537 UINT16_TO_STREAM(p, ctrl_word); in l2c_fcr_send_S_frame()
556 if ((((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 1) in l2c_fcr_send_S_frame()
557 || (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3)) { in l2c_fcr_send_S_frame()
559 p_ccb->local_cid, ctrl_word, in l2c_fcr_send_S_frame()
560 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_send_S_frame()
561 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_send_S_frame()
562 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_send_S_frame()
563 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_send_S_frame()
567 p_ccb->local_cid, ctrl_word, in l2c_fcr_send_S_frame()
568 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_send_S_frame()
569 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_send_S_frame()
570 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_send_S_frame()
571 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_send_S_frame()
601 UINT16 ctrl_word; in l2c_fcr_proc_pdu() local
623 STREAM_TO_UINT16 (ctrl_word, p); in l2c_fcr_proc_pdu()
625 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) in l2c_fcr_proc_pdu()
627 if ((((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 1) in l2c_fcr_proc_pdu()
628 || (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3)) in l2c_fcr_proc_pdu()
633 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_proc_pdu()
634 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
635 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_proc_pdu()
636 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
642 SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT], in l2c_fcr_proc_pdu()
643 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
644 (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT, in l2c_fcr_proc_pdu()
645 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
652 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in l2c_fcr_proc_pdu()
653 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
654 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
655 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in l2c_fcr_proc_pdu()
687 STREAM_TO_UINT16 (ctrl_word, p); in l2c_fcr_proc_pdu()
696 if ( !(ctrl_word & L2CAP_FCR_F_BIT) ) in l2c_fcr_proc_pdu()
698 if ( (ctrl_word & L2CAP_FCR_P_BIT) && (ctrl_word & L2CAP_FCR_S_FRAME_BIT) ) in l2c_fcr_proc_pdu()
723 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) in l2c_fcr_proc_pdu()
724 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()
745 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) in l2c_fcr_proc_pdu()
746 process_s_frame (p_ccb, p_buf, ctrl_word); in l2c_fcr_proc_pdu()
748 process_i_frame (p_ccb, p_buf, ctrl_word, FALSE); in l2c_fcr_proc_pdu()
768 STREAM_TO_UINT16 (ctrl_word, p); in l2c_fcr_proc_pdu()
771 … p_ccb->local_cid, (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in l2c_fcr_proc_pdu()
775 process_i_frame (p_ccb, p_buf, ctrl_word, TRUE); in l2c_fcr_proc_pdu()
971 static BOOLEAN process_reqseq (tL2C_CCB *p_ccb, UINT16 ctrl_word) in process_reqseq() argument
980 if ( (ctrl_word & L2CAP_FCR_S_FRAME_BIT) in process_reqseq()
981 && ((ctrl_word & L2CAP_FCR_SUP_BITS) == (L2CAP_FCR_SUP_SREJ << L2CAP_FCR_SUP_SHIFT)) in process_reqseq()
982 && ((ctrl_word & L2CAP_FCR_P_BIT) == 0) ) in process_reqseq()
992 req_seq = (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT; in process_reqseq()
1001 ctrl_word, req_seq, p_fcrb->last_rx_ack, in process_reqseq()
1064 static void process_s_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word) in process_s_frame() argument
1070 UINT16 s_frame_type = (ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT; in process_s_frame()
1079 …L2CAP_TRACE_DEBUG ("process_s_frame ctrl_word 0x%04x fcrb_remote_busy:%d", ctrl_word, p_fcrb->remo… in process_s_frame()
1085 if (ctrl_word & L2CAP_FCR_P_BIT) in process_s_frame()
1097 if ( (ctrl_word & L2CAP_FCR_F_BIT) || (remote_was_busy) ) in process_s_frame()
1113 …all_ok = retransmit_i_frames (p_ccb, (UINT8)((ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ… in process_s_frame()
1150 static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, BOOLEAN delay_ack) in process_i_frame() argument
1159 if (ctrl_word & L2CAP_FCR_F_BIT) in process_i_frame()
1174 tx_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in process_i_frame()
1290 if (!do_sar_reassembly (p_ccb, p_buf, ctrl_word)) in process_i_frame()
1344 UINT16 ctrl_word; in process_stream_frame() local
1369 STREAM_TO_UINT16 (ctrl_word, p); in process_stream_frame()
1375 if (ctrl_word & L2CAP_FCR_S_FRAME_BIT) in process_stream_frame()
1377 … PDU: CID: 0x%04x BAD S-frame in streaming mode ctrl_word: 0x%04x", p_ccb->local_cid, ctrl_word); in process_stream_frame()
1385 SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT], in process_stream_frame()
1386 (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT, in process_stream_frame()
1387 (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT, in process_stream_frame()
1388 (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT); in process_stream_frame()
1392 tx_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in process_stream_frame()
1406 if (!do_sar_reassembly (p_ccb, p_buf, ctrl_word)) in process_stream_frame()
1423 static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word) in do_sar_reassembly() argument
1429 UINT16 sar_type = ctrl_word & L2CAP_FCR_SEG_BITS; in do_sar_reassembly()
1553 UINT16 ctrl_word; in retransmit_i_frames() local
1584 STREAM_TO_UINT16 (ctrl_word, p); in retransmit_i_frames()
1586 buf_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT; in retransmit_i_frames()