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>
This commit is contained in:
parent
793c2f1cb9
commit
03f6715d46
2 changed files with 25 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue