Bluetooth: Convert hdev->ssp_mode to a flag

The ssp_mode is essentially just a boolean so it's more appropriate to
have it simply as a flag in hdev->dev_flags.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Johan Hedberg
2012-01-25 14:21:06 +02:00
parent 58a681ef14
commit 84bde9d6c0
5 changed files with 18 additions and 11 deletions

View File

@@ -297,7 +297,7 @@ static u32 get_current_settings(struct hci_dev *hdev)
if (test_bit(HCI_AUTH, &hdev->flags))
settings |= MGMT_SETTING_LINK_SECURITY;
if (hdev->ssp_mode > 0)
if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags))
settings |= MGMT_SETTING_SSP;
return settings;
@@ -416,7 +416,7 @@ static int update_eir(struct hci_dev *hdev)
if (!(hdev->features[6] & LMP_EXT_INQ))
return 0;
if (hdev->ssp_mode == 0)
if (!test_bit(HCI_SSP_ENABLED, &hdev->dev_flags))
return 0;
if (test_bit(HCI_SERVICE_CACHE, &hdev->dev_flags))