aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/bluetooth/l2cap.h10
-rw-r--r--net/bluetooth/l2cap.c7
2 files changed, 8 insertions, 9 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index c819c8bf9b68..217bb91a7345 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -417,11 +417,11 @@ static inline int l2cap_tx_window_full(struct sock *sk)
417 return sub == pi->remote_tx_win; 417 return sub == pi->remote_tx_win;
418} 418}
419 419
420#define __get_txseq(ctrl) ((ctrl) & L2CAP_CTRL_TXSEQ) >> 1 420#define __get_txseq(ctrl) (((ctrl) & L2CAP_CTRL_TXSEQ) >> 1)
421#define __get_reqseq(ctrl) ((ctrl) & L2CAP_CTRL_REQSEQ) >> 8 421#define __get_reqseq(ctrl) (((ctrl) & L2CAP_CTRL_REQSEQ) >> 8)
422#define __is_iframe(ctrl) !((ctrl) & L2CAP_CTRL_FRAME_TYPE) 422#define __is_iframe(ctrl) (!((ctrl) & L2CAP_CTRL_FRAME_TYPE))
423#define __is_sframe(ctrl) (ctrl) & L2CAP_CTRL_FRAME_TYPE 423#define __is_sframe(ctrl) ((ctrl) & L2CAP_CTRL_FRAME_TYPE)
424#define __is_sar_start(ctrl) ((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START 424#define __is_sar_start(ctrl) (((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START)
425 425
426void l2cap_load(void); 426void l2cap_load(void);
427 427
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index a1c7ae88dd1f..c12eccfdfe01 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -57,7 +57,7 @@
57 57
58#define VERSION "2.15" 58#define VERSION "2.15"
59 59
60static int disable_ertm = 0; 60static int disable_ertm;
61 61
62static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN; 62static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN;
63static u8 l2cap_fixed_chan[8] = { 0x02, }; 63static u8 l2cap_fixed_chan[8] = { 0x02, };
@@ -4162,11 +4162,10 @@ static inline void l2cap_data_channel_rrframe(struct sock *sk, u16 rx_control)
4162 __mod_retrans_timer(); 4162 __mod_retrans_timer();
4163 4163
4164 pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY; 4164 pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;
4165 if (pi->conn_state & L2CAP_CONN_SREJ_SENT) { 4165 if (pi->conn_state & L2CAP_CONN_SREJ_SENT)
4166 l2cap_send_ack(pi); 4166 l2cap_send_ack(pi);
4167 } else { 4167 else
4168 l2cap_ertm_send(sk); 4168 l2cap_ertm_send(sk);
4169 }
4170 } 4169 }
4171} 4170}
4172 4171