diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2011-10-11 13:37:49 +0300 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-10-13 16:45:34 -0300 |
commit | 03f6715d463e6ee3e724ac64a9bedf1ad7d2b9b4 (patch) | |
tree | a8d0795a578ce0c402ad20160dfdac8e9ee2a8fa /include/net | |
parent | 793c2f1cb9d722231290daf1744e6c5b7269f445 (diff) |
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/net')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 15 |
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); |