summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2011-10-11 10:37:50 (GMT)
committerGustavo F. Padovan <padovan@profusion.mobi>2011-10-13 19:45:39 (GMT)
commite37817353bf94a4e00faad78ffb8cc07f8556252 (patch)
tree7208edac29fabd8456c6dec8ef7ff605dd10536f /include/net
parent03f6715d463e6ee3e724ac64a9bedf1ad7d2b9b4 (diff)
downloadlinux-fsl-qoriq-e37817353bf94a4e00faad78ffb8cc07f8556252.tar.xz
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/net')
-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 3110c43..67a2fdb 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);