summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrei Emeltchenko2011-10-11 12:37:50 +0200
committerGustavo F. Padovan2011-10-13 21:45:39 +0200
commite37817353bf94a4e00faad78ffb8cc07f8556252 (patch)
tree7208edac29fabd8456c6dec8ef7ff605dd10536f /include
parentBluetooth: EWS: rewrite handling FINAL (F) bit (diff)
downloadkernel-qcow2-linux-e37817353bf94a4e00faad78ffb8cc07f8556252.tar.gz
kernel-qcow2-linux-e37817353bf94a4e00faad78ffb8cc07f8556252.tar.xz
kernel-qcow2-linux-e37817353bf94a4e00faad78ffb8cc07f8556252.zip
Bluetooth: EWS: rewrite handling POLL (P) bit
Handle POLL (P) bit in L2CAP ERTM 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.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 3110c4301e45..67a2fdba9d8c 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -627,6 +627,22 @@ static inline bool __is_ctrl_final(struct l2cap_chan *chan, __u32 ctrl)
else
return ctrl & L2CAP_CTRL_FINAL;
}
+
+static inline __u32 __set_ctrl_poll(struct l2cap_chan *chan)
+{
+ if (test_bit(FLAG_EXT_CTRL, &chan->flags))
+ return L2CAP_EXT_CTRL_POLL;
+ else
+ return L2CAP_CTRL_POLL;
+}
+
+static inline bool __is_ctrl_poll(struct l2cap_chan *chan, __u32 ctrl)
+{
+ if (test_bit(FLAG_EXT_CTRL, &chan->flags))
+ return ctrl & L2CAP_EXT_CTRL_POLL;
+ else
+ return ctrl & L2CAP_CTRL_POLL;
+}
extern int disable_ertm;
int l2cap_init_sockets(void);