diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-08 08:37:18 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-08-14 08:49:19 +0200 |
commit | 5d88cc73dded31a93fcc4821f33a8c3d755bf454 (patch) | |
tree | c6599506929f335c954e40b2fbcf13dc7af98a88 /include/net/bluetooth | |
parent | Bluetooth: Make AES crypto context private to SMP (diff) | |
download | linux-5d88cc73dded31a93fcc4821f33a8c3d755bf454.tar.xz linux-5d88cc73dded31a93fcc4821f33a8c3d755bf454.zip |
Bluetooth: Convert SMP to use l2cap_chan infrastructure
Now that we have all the necessary pieces in place we can fully convert
SMP to use the L2CAP channel infrastructure. This patch adds the
necessary callbacks and removes the now unneeded conn->smp_chan pointer.
One notable behavioral change in this patch comes from the following
code snippet:
- case L2CAP_CID_SMP:
- if (smp_sig_channel(conn, skb))
- l2cap_conn_del(conn->hcon, EACCES);
This piece of code was essentially forcing a disconnection if garbage
SMP data was received. The l2cap_conn_del() function is private to
l2cap_conn.c so we don't have access to it anymore when using the L2CAP
channel callbacks. Therefore, the behavior of the new code is simply to
return errors in the recv() callback (which is simply the old
smp_sig_channel()), but no disconnection will occur.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 1a037ba4b6f4..bda6252e3722 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -636,7 +636,6 @@ struct l2cap_conn { __u8 disc_reason; struct delayed_work security_timer; - struct smp_chan *smp_chan; struct l2cap_chan *smp; struct list_head chan_l; |