aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2012-07-24 14:03:48 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-08-06 14:02:56 -0400
commit9a1a1996d54a92cae2affa1de689cb04ebe7bce1 (patch)
tree056aae40b6acf7d18596027215a1fc7e0db29aee /net/bluetooth/mgmt.c
parentc383ddc481a1774702473b4bb0d2927aab3f2d5a (diff)
Bluetooth: Use lmp_ssp_capable where applicable
This patch replaces all LMP_SIMPLE_PAIR bit checking by the helper macro lmp_ssp_capable. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 0351bf27f2bb..a3329cbd3e4d 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -380,7 +380,7 @@ static u32 get_supported_settings(struct hci_dev *hdev)
380 settings |= MGMT_SETTING_DISCOVERABLE; 380 settings |= MGMT_SETTING_DISCOVERABLE;
381 settings |= MGMT_SETTING_PAIRABLE; 381 settings |= MGMT_SETTING_PAIRABLE;
382 382
383 if (hdev->features[6] & LMP_SIMPLE_PAIR) 383 if (lmp_ssp_capable(hdev))
384 settings |= MGMT_SETTING_SSP; 384 settings |= MGMT_SETTING_SSP;
385 385
386 if (lmp_bredr_capable(hdev)) { 386 if (lmp_bredr_capable(hdev)) {
@@ -1121,7 +1121,7 @@ static int set_ssp(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
1121 1121
1122 hci_dev_lock(hdev); 1122 hci_dev_lock(hdev);
1123 1123
1124 if (!(hdev->features[6] & LMP_SIMPLE_PAIR)) { 1124 if (!lmp_ssp_capable(hdev)) {
1125 err = cmd_status(sk, hdev->id, MGMT_OP_SET_SSP, 1125 err = cmd_status(sk, hdev->id, MGMT_OP_SET_SSP,
1126 MGMT_STATUS_NOT_SUPPORTED); 1126 MGMT_STATUS_NOT_SUPPORTED);
1127 goto failed; 1127 goto failed;
@@ -2201,7 +2201,7 @@ static int read_local_oob_data(struct sock *sk, struct hci_dev *hdev,
2201 goto unlock; 2201 goto unlock;
2202 } 2202 }
2203 2203
2204 if (!(hdev->features[6] & LMP_SIMPLE_PAIR)) { 2204 if (!lmp_ssp_capable(hdev)) {
2205 err = cmd_status(sk, hdev->id, MGMT_OP_READ_LOCAL_OOB_DATA, 2205 err = cmd_status(sk, hdev->id, MGMT_OP_READ_LOCAL_OOB_DATA,
2206 MGMT_STATUS_NOT_SUPPORTED); 2206 MGMT_STATUS_NOT_SUPPORTED);
2207 goto unlock; 2207 goto unlock;