diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2012-07-24 14:03:47 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-06 14:02:56 -0400 |
commit | c383ddc481a1774702473b4bb0d2927aab3f2d5a (patch) | |
tree | de4d37fd9a2a61aa6a8ff4323adffc6bf5b79d6b | |
parent | ed3fa31f35896b42c54333edabf0a9e986fa952c (diff) |
Bluetooth: Use lmp_le_capable where applicable
This patch replaces all LMP_LE bit checking by the helper macro
lmp_le_capable.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r-- | net/bluetooth/hci_event.c | 4 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 41ff978a33f9..498d55edcbc3 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -541,7 +541,7 @@ static void hci_setup_event_mask(struct hci_dev *hdev) | |||
541 | * Features Notification */ | 541 | * Features Notification */ |
542 | } | 542 | } |
543 | 543 | ||
544 | if (hdev->features[4] & LMP_LE) | 544 | if (lmp_le_capable(hdev)) |
545 | events[7] |= 0x20; /* LE Meta-Event */ | 545 | events[7] |= 0x20; /* LE Meta-Event */ |
546 | 546 | ||
547 | hci_send_cmd(hdev, HCI_OP_SET_EVENT_MASK, sizeof(events), events); | 547 | hci_send_cmd(hdev, HCI_OP_SET_EVENT_MASK, sizeof(events), events); |
@@ -746,7 +746,7 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev, | |||
746 | break; | 746 | break; |
747 | } | 747 | } |
748 | 748 | ||
749 | if (test_bit(HCI_INIT, &hdev->flags) && hdev->features[4] & LMP_LE) | 749 | if (test_bit(HCI_INIT, &hdev->flags) && lmp_le_capable(hdev)) |
750 | hci_set_le_support(hdev); | 750 | hci_set_le_support(hdev); |
751 | 751 | ||
752 | done: | 752 | done: |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 990ec6affca5..0351bf27f2bb 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -391,7 +391,7 @@ static u32 get_supported_settings(struct hci_dev *hdev) | |||
391 | if (enable_hs) | 391 | if (enable_hs) |
392 | settings |= MGMT_SETTING_HS; | 392 | settings |= MGMT_SETTING_HS; |
393 | 393 | ||
394 | if (hdev->features[4] & LMP_LE) | 394 | if (lmp_le_capable(hdev)) |
395 | settings |= MGMT_SETTING_LE; | 395 | settings |= MGMT_SETTING_LE; |
396 | 396 | ||
397 | return settings; | 397 | return settings; |
@@ -1205,7 +1205,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) | |||
1205 | 1205 | ||
1206 | hci_dev_lock(hdev); | 1206 | hci_dev_lock(hdev); |
1207 | 1207 | ||
1208 | if (!(hdev->features[4] & LMP_LE)) { | 1208 | if (!lmp_le_capable(hdev)) { |
1209 | err = cmd_status(sk, hdev->id, MGMT_OP_SET_LE, | 1209 | err = cmd_status(sk, hdev->id, MGMT_OP_SET_LE, |
1210 | MGMT_STATUS_NOT_SUPPORTED); | 1210 | MGMT_STATUS_NOT_SUPPORTED); |
1211 | goto unlock; | 1211 | goto unlock; |