diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-08 09:37:18 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-08-14 08:49:19 +0200 |
commit | 5d88cc73dded31a93fcc4821f33a8c3d755bf454 (patch) | |
tree | c6599506929f335c954e40b2fbcf13dc7af98a88 /net/bluetooth/smp.h | |
parent | defce9e83666658d4420d65e45ab1ad190992f72 (diff) | |
download | op-kernel-dev-5d88cc73dded31a93fcc4821f33a8c3d755bf454.zip op-kernel-dev-5d88cc73dded31a93fcc4821f33a8c3d755bf454.tar.gz |
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 'net/bluetooth/smp.h')
-rw-r--r-- | net/bluetooth/smp.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/bluetooth/smp.h b/net/bluetooth/smp.h index d3f6bd6..161ace3 100644 --- a/net/bluetooth/smp.h +++ b/net/bluetooth/smp.h @@ -126,7 +126,6 @@ enum { /* SMP Commands */ bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level); int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); -int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); int smp_distribute_keys(struct l2cap_conn *conn); int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); |