@@ -1270,7 +1270,7 @@ static void l2cap_streaming_send(struct l2cap_chan *chan)
12701270
12711271 while ((skb = skb_dequeue (& chan -> tx_q ))) {
12721272 control = get_unaligned_le16 (skb -> data + L2CAP_HDR_SIZE );
1273- control |= chan -> next_tx_seq << L2CAP_CTRL_TXSEQ_SHIFT ;
1273+ control |= __set_txseq ( chan , chan -> next_tx_seq ) ;
12741274 put_unaligned_le16 (control , skb -> data + L2CAP_HDR_SIZE );
12751275
12761276 if (chan -> fcs == L2CAP_FCS_CRC16 ) {
@@ -1284,7 +1284,7 @@ static void l2cap_streaming_send(struct l2cap_chan *chan)
12841284 }
12851285}
12861286
1287- static void l2cap_retransmit_one_frame (struct l2cap_chan * chan , u8 tx_seq )
1287+ static void l2cap_retransmit_one_frame (struct l2cap_chan * chan , u16 tx_seq )
12881288{
12891289 struct sk_buff * skb , * tx_skb ;
12901290 u16 control , fcs ;
@@ -1317,7 +1317,7 @@ static void l2cap_retransmit_one_frame(struct l2cap_chan *chan, u8 tx_seq)
13171317 control |= L2CAP_CTRL_FINAL ;
13181318
13191319 control |= __set_reqseq (chan , chan -> buffer_seq );
1320- control |= tx_seq << L2CAP_CTRL_TXSEQ_SHIFT ;
1320+ control |= __set_txseq ( chan , tx_seq ) ;
13211321
13221322 put_unaligned_le16 (control , tx_skb -> data + L2CAP_HDR_SIZE );
13231323
@@ -1357,7 +1357,7 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
13571357 control |= L2CAP_CTRL_FINAL ;
13581358
13591359 control |= __set_reqseq (chan , chan -> buffer_seq );
1360- control |= chan -> next_tx_seq << L2CAP_CTRL_TXSEQ_SHIFT ;
1360+ control |= __set_txseq ( chan , chan -> next_tx_seq ) ;
13611361 put_unaligned_le16 (control , tx_skb -> data + L2CAP_HDR_SIZE );
13621362
13631363
@@ -3136,7 +3136,7 @@ static inline void l2cap_send_i_or_rr_or_rnr(struct l2cap_chan *chan)
31363136 }
31373137}
31383138
3139- static int l2cap_add_to_srej_queue (struct l2cap_chan * chan , struct sk_buff * skb , u8 tx_seq , u8 sar )
3139+ static int l2cap_add_to_srej_queue (struct l2cap_chan * chan , struct sk_buff * skb , u16 tx_seq , u8 sar )
31403140{
31413141 struct sk_buff * next_skb ;
31423142 int tx_seq_offset , next_tx_seq_offset ;
@@ -3330,7 +3330,7 @@ void l2cap_chan_busy(struct l2cap_chan *chan, int busy)
33303330 }
33313331}
33323332
3333- static void l2cap_check_srej_gap (struct l2cap_chan * chan , u8 tx_seq )
3333+ static void l2cap_check_srej_gap (struct l2cap_chan * chan , u16 tx_seq )
33343334{
33353335 struct sk_buff * skb ;
33363336 u16 control ;
@@ -3357,7 +3357,7 @@ static void l2cap_check_srej_gap(struct l2cap_chan *chan, u8 tx_seq)
33573357 }
33583358}
33593359
3360- static void l2cap_resend_srejframe (struct l2cap_chan * chan , u8 tx_seq )
3360+ static void l2cap_resend_srejframe (struct l2cap_chan * chan , u16 tx_seq )
33613361{
33623362 struct srej_list * l , * tmp ;
33633363 u16 control ;
@@ -3376,7 +3376,7 @@ static void l2cap_resend_srejframe(struct l2cap_chan *chan, u8 tx_seq)
33763376 }
33773377}
33783378
3379- static void l2cap_send_srejframe (struct l2cap_chan * chan , u8 tx_seq )
3379+ static void l2cap_send_srejframe (struct l2cap_chan * chan , u16 tx_seq )
33803380{
33813381 struct srej_list * new ;
33823382 u16 control ;
@@ -3396,7 +3396,7 @@ static void l2cap_send_srejframe(struct l2cap_chan *chan, u8 tx_seq)
33963396
33973397static inline int l2cap_data_channel_iframe (struct l2cap_chan * chan , u16 rx_control , struct sk_buff * skb )
33983398{
3399- u8 tx_seq = __get_txseq (rx_control );
3399+ u16 tx_seq = __get_txseq (chan , rx_control );
34003400 u16 req_seq = __get_reqseq (chan , rx_control );
34013401 u8 sar = __get_ctrl_sar (chan , rx_control );
34023402 int tx_seq_offset , expected_tx_seq_offset ;
@@ -3763,7 +3763,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
37633763 struct l2cap_chan * chan ;
37643764 struct sock * sk = NULL ;
37653765 u16 control ;
3766- u8 tx_seq ;
3766+ u16 tx_seq ;
37673767 int len ;
37683768
37693769 chan = l2cap_get_chan_by_scid (conn , cid );
@@ -3820,7 +3820,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
38203820 if (len > chan -> mps || len < 0 || __is_sframe (control ))
38213821 goto drop ;
38223822
3823- tx_seq = __get_txseq (control );
3823+ tx_seq = __get_txseq (chan , control );
38243824
38253825 if (chan -> expected_tx_seq != tx_seq ) {
38263826 /* Frame(s) missing - must discard partial SDU */
0 commit comments