diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2011-06-30 18:20:56 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-07-06 18:10:45 -0400 |
commit | 2e65c9d2c5206eb24439f2dd2daa2f6702df358e (patch) | |
tree | 99616f3fc5479315ed288eb17841053d9277f572 /net/bluetooth/smp.c | |
parent | eead27da60df80a112d1ac3ea482226e9794c26b (diff) |
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 a36f8707d964..ba55bd4b5dda 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) | |||
434 | 434 | ||
435 | BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level); | 435 | BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level); |
436 | 436 | ||
437 | if (!lmp_host_le_capable(hcon->hdev)) | ||
438 | return 1; | ||
439 | |||
437 | if (IS_ERR(hcon->hdev->tfm)) | 440 | if (IS_ERR(hcon->hdev->tfm)) |
438 | return 1; | 441 | return 1; |
439 | 442 | ||
@@ -477,6 +480,12 @@ int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb) | |||
477 | __u8 reason; | 480 | __u8 reason; |
478 | int err = 0; | 481 | int err = 0; |
479 | 482 | ||
483 | if (!lmp_host_le_capable(conn->hcon->hdev)) { | ||
484 | err = -ENOTSUPP; | ||
485 | reason = SMP_PAIRING_NOTSUPP; | ||
486 | goto done; | ||
487 | } | ||
488 | |||
480 | if (IS_ERR(conn->hcon->hdev->tfm)) { | 489 | if (IS_ERR(conn->hcon->hdev->tfm)) { |
481 | err = PTR_ERR(conn->hcon->hdev->tfm); | 490 | err = PTR_ERR(conn->hcon->hdev->tfm); |
482 | reason = SMP_PAIRING_NOTSUPP; | 491 | reason = SMP_PAIRING_NOTSUPP; |