diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-07 15:56:45 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-08-14 02:49:13 -0400 |
commit | 191eb398c677444bc08cb4497467ca9e2b8696bc (patch) | |
tree | 274364445e994cd60a5e000be4aceeed8956cb8f /net/bluetooth/l2cap_core.c | |
parent | d52deb17489b8155e031fb1a9f116c602d719e11 (diff) |
Bluetooth: Remove special handling of ATT in l2cap_security_cfm()
With the update to sk->resume() and __l2cap_no_conn_pending() we
no-longer need to have special handling of ATT channels in the
l2cap_security_cfm() function. The chan->sec_level update when
encryption has been enabled is safe to do for any kind of channel, and
the loop takes later care of calling chan->ready() or chan->resume() if
necessary.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index a0a910eb897b..54cbfcd4da44 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -7341,15 +7341,8 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) | |||
7341 | continue; | 7341 | continue; |
7342 | } | 7342 | } |
7343 | 7343 | ||
7344 | if (chan->scid == L2CAP_CID_ATT) { | 7344 | if (!status && encrypt) |
7345 | if (!status && encrypt) { | 7345 | chan->sec_level = hcon->sec_level; |
7346 | chan->sec_level = hcon->sec_level; | ||
7347 | l2cap_chan_ready(chan); | ||
7348 | } | ||
7349 | |||
7350 | l2cap_chan_unlock(chan); | ||
7351 | continue; | ||
7352 | } | ||
7353 | 7346 | ||
7354 | if (!__l2cap_no_conn_pending(chan)) { | 7347 | if (!__l2cap_no_conn_pending(chan)) { |
7355 | l2cap_chan_unlock(chan); | 7348 | l2cap_chan_unlock(chan); |