diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2011-06-30 19:20:56 -0300 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-07-11 11:59:33 -0700 |
commit | a577fe342a17730c19ba53c7d87c8d56956a0554 (patch) | |
tree | 8aef33cb4195af330ad4fab321921294aa696572 /net/bluetooth/smp.c | |
parent | c006aa0c5627e27e6cc422636a4744c43cbd5dc9 (diff) | |
download | kernel_samsung_espresso10-a577fe342a17730c19ba53c7d87c8d56956a0554.zip kernel_samsung_espresso10-a577fe342a17730c19ba53c7d87c8d56956a0554.tar.gz kernel_samsung_espresso10-a577fe342a17730c19ba53c7d87c8d56956a0554.tar.bz2 |
Bluetooth: Remove enable_smp parameter
The enable_smp parameter is no longer needed. It can be replaced by
checking lmp_host_le_capable.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r-- | net/bluetooth/smp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index a36f870..ba55bd4 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -434,6 +434,9 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level) BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level); + if (!lmp_host_le_capable(hcon->hdev)) + return 1; + if (IS_ERR(hcon->hdev->tfm)) return 1; @@ -477,6 +480,12 @@ int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb) __u8 reason; int err = 0; + if (!lmp_host_le_capable(conn->hcon->hdev)) { + err = -ENOTSUPP; + reason = SMP_PAIRING_NOTSUPP; + goto done; + } + if (IS_ERR(conn->hcon->hdev->tfm)) { err = PTR_ERR(conn->hcon->hdev->tfm); reason = SMP_PAIRING_NOTSUPP; |