aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/l2cap.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 3ca24af7ebc5..9444dceaee19 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -548,8 +548,22 @@ static inline __u32 __set_txseq(struct l2cap_chan *chan, __u32 txseq)
548 return (txseq << L2CAP_CTRL_TXSEQ_SHIFT) & L2CAP_CTRL_TXSEQ; 548 return (txseq << L2CAP_CTRL_TXSEQ_SHIFT) & L2CAP_CTRL_TXSEQ;
549} 549}
550 550
551#define __is_iframe(ctrl) (!((ctrl) & L2CAP_CTRL_FRAME_TYPE)) 551static inline bool __is_sframe(struct l2cap_chan *chan, __u32 ctrl)
552#define __is_sframe(ctrl) ((ctrl) & L2CAP_CTRL_FRAME_TYPE) 552{
553 if (test_bit(FLAG_EXT_CTRL, &chan->flags))
554 return ctrl & L2CAP_EXT_CTRL_FRAME_TYPE;
555 else
556 return ctrl & L2CAP_CTRL_FRAME_TYPE;
557}
558
559static inline __u32 __set_sframe(struct l2cap_chan *chan)
560{
561 if (test_bit(FLAG_EXT_CTRL, &chan->flags))
562 return L2CAP_EXT_CTRL_FRAME_TYPE;
563 else
564 return L2CAP_CTRL_FRAME_TYPE;
565}
566
553static inline __u8 __get_ctrl_sar(struct l2cap_chan *chan, __u32 ctrl) 567static inline __u8 __get_ctrl_sar(struct l2cap_chan *chan, __u32 ctrl)
554{ 568{
555 if (test_bit(FLAG_EXT_CTRL, &chan->flags)) 569 if (test_bit(FLAG_EXT_CTRL, &chan->flags))