Skip to content

Commit

Permalink
Bluetooth: Use LMP_HOST_SSP define instead of magic values
Browse files Browse the repository at this point in the history
This patch fixes the code to use the proper LMP_HOST_SSP define instead
of magic values and thereby makes the code more readable.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Feb 28, 2012
1 parent cc2c04e commit 02b7cc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2869,9 +2869,9 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b

ie = hci_inquiry_cache_lookup(hdev, &conn->dst);
if (ie)
ie->data.ssp_mode = (ev->features[0] & 0x01);
ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP);

if (ev->features[0] & 0x01)
if (ev->features[0] & LMP_HOST_SSP)
set_bit(HCI_CONN_SSP_ENABLED, &conn->flags);
}

Expand Down Expand Up @@ -3224,7 +3224,7 @@ static inline void hci_remote_host_features_evt(struct hci_dev *hdev, struct sk_

ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr);
if (ie)
ie->data.ssp_mode = (ev->features[0] & 0x01);
ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP);

hci_dev_unlock(hdev);
}
Expand Down

0 comments on commit 02b7cc6

Please sign in to comment.