Bluetooth: Introduce L2CAP channel flag for defer setup
The L2CAP core should not look into the socket flags to figure out the setting of defer setup. So introduce a L2CAP channel flag that mirrors the socket flag. Since the defer setup option is only set in one place this becomes a really easy thing to do. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:

committed by
Johan Hedberg

parent
c560575576
commit
bdc2578307
@@ -672,10 +672,13 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
|
||||
break;
|
||||
}
|
||||
|
||||
if (opt)
|
||||
if (opt) {
|
||||
set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
|
||||
else
|
||||
set_bit(FLAG_DEFER_SETUP, &chan->flags);
|
||||
} else {
|
||||
clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
|
||||
clear_bit(FLAG_DEFER_SETUP, &chan->flags);
|
||||
}
|
||||
break;
|
||||
|
||||
case BT_FLUSHABLE:
|
||||
|
Reference in New Issue
Block a user