Commit c383ddc4 authored by Andre Guedes's avatar Andre Guedes Committed by Gustavo Padovan

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: default avatarAndre Guedes <andre.guedes@openbossa.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent ed3fa31f
...@@ -541,7 +541,7 @@ static void hci_setup_event_mask(struct hci_dev *hdev) ...@@ -541,7 +541,7 @@ static void hci_setup_event_mask(struct hci_dev *hdev)
* Features Notification */ * Features Notification */
} }
if (hdev->features[4] & LMP_LE) if (lmp_le_capable(hdev))
events[7] |= 0x20; /* LE Meta-Event */ events[7] |= 0x20; /* LE Meta-Event */
hci_send_cmd(hdev, HCI_OP_SET_EVENT_MASK, sizeof(events), events); 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,7 +746,7 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
break; break;
} }
if (test_bit(HCI_INIT, &hdev->flags) && hdev->features[4] & LMP_LE) if (test_bit(HCI_INIT, &hdev->flags) && lmp_le_capable(hdev))
hci_set_le_support(hdev); hci_set_le_support(hdev);
done: done:
......
...@@ -391,7 +391,7 @@ static u32 get_supported_settings(struct hci_dev *hdev) ...@@ -391,7 +391,7 @@ static u32 get_supported_settings(struct hci_dev *hdev)
if (enable_hs) if (enable_hs)
settings |= MGMT_SETTING_HS; settings |= MGMT_SETTING_HS;
if (hdev->features[4] & LMP_LE) if (lmp_le_capable(hdev))
settings |= MGMT_SETTING_LE; settings |= MGMT_SETTING_LE;
return settings; return settings;
...@@ -1205,7 +1205,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) ...@@ -1205,7 +1205,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
hci_dev_lock(hdev); hci_dev_lock(hdev);
if (!(hdev->features[4] & LMP_LE)) { if (!lmp_le_capable(hdev)) {
err = cmd_status(sk, hdev->id, MGMT_OP_SET_LE, err = cmd_status(sk, hdev->id, MGMT_OP_SET_LE,
MGMT_STATUS_NOT_SUPPORTED); MGMT_STATUS_NOT_SUPPORTED);
goto unlock; goto unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment