summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrei Emeltchenko2011-10-11 12:37:49 +0200
committerGustavo F. Padovan2011-10-13 21:45:34 +0200
commit03f6715d463e6ee3e724ac64a9bedf1ad7d2b9b4 (patch)
treea8d0795a578ce0c402ad20160dfdac8e9ee2a8fa /include
parentBluetooth: EWS: rewrite check frame type function (diff)
downloadkernel-qcow2-linux-03f6715d463e6ee3e724ac64a9bedf1ad7d2b9b4.tar.gz
kernel-qcow2-linux-03f6715d463e6ee3e724ac64a9bedf1ad7d2b9b4.tar.xz
kernel-qcow2-linux-03f6715d463e6ee3e724ac64a9bedf1ad7d2b9b4.zip
Bluetooth: EWS: rewrite handling FINAL (F) bit
Handle final (F) bit in L2CAP using information about control field type. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/l2cap.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 9444dceaee19..3110c4301e45 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -612,6 +612,21 @@ static inline __u32 __set_ctrl_super(struct l2cap_chan *chan, __u32 super)
L2CAP_CTRL_SUPERVISE;
}
+static inline __u32 __set_ctrl_final(struct l2cap_chan *chan)
+{
+ if (test_bit(FLAG_EXT_CTRL, &chan->flags))
+ return L2CAP_EXT_CTRL_FINAL;
+ else
+ return L2CAP_CTRL_FINAL;
+}
+
+static inline bool __is_ctrl_final(struct l2cap_chan *chan, __u32 ctrl)
+{
+ if (test_bit(FLAG_EXT_CTRL, &chan->flags))
+ return ctrl & L2CAP_EXT_CTRL_FINAL;
+ else
+ return ctrl & L2CAP_CTRL_FINAL;
+}
extern int disable_ertm;
int l2cap_init_sockets(void);