Bluetooth: Use lmp_ssp_capable() macro
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 24 May 2012 06:36:37 +0000 (03:36 -0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 5 Jun 2012 03:34:09 +0000 (06:34 +0300)
Make the check more user friendly.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index 5e24a57a4613d5939117e2726f3c625cb035c779..80f209b01b9efbbf19e237067e206107a0f1f349 100644 (file)
@@ -557,7 +557,7 @@ static void hci_setup(struct hci_dev *hdev)
        if (hdev->hci_ver > BLUETOOTH_VER_1_1)
                hci_send_cmd(hdev, HCI_OP_READ_LOCAL_COMMANDS, 0, NULL);
 
-       if (hdev->features[6] & LMP_SIMPLE_PAIR) {
+       if (lmp_ssp_capable(hdev)) {
                if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) {
                        u8 mode = 0x01;
                        hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE,