mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
Bluetooth: hci_core: Fix using ll_privacy_capable for current settings
ll_privacy_capable only indicates that the controller supports the
feature but it doesnt' check that LE is enabled so it end up being
marked as active in the current settings when it shouldn't.
Fixes: ad383c2c65
("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
709788b154
commit
3dcf7175f2
@ -1934,6 +1934,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
|
|||||||
((dev)->le_rx_def_phys & HCI_LE_SET_PHY_CODED))
|
((dev)->le_rx_def_phys & HCI_LE_SET_PHY_CODED))
|
||||||
|
|
||||||
#define ll_privacy_capable(dev) ((dev)->le_features[0] & HCI_LE_LL_PRIVACY)
|
#define ll_privacy_capable(dev) ((dev)->le_features[0] & HCI_LE_LL_PRIVACY)
|
||||||
|
#define ll_privacy_enabled(dev) (le_enabled(dev) && ll_privacy_capable(dev))
|
||||||
|
|
||||||
#define privacy_mode_capable(dev) (ll_privacy_capable(dev) && \
|
#define privacy_mode_capable(dev) (ll_privacy_capable(dev) && \
|
||||||
((dev)->commands[39] & 0x04))
|
((dev)->commands[39] & 0x04))
|
||||||
|
@ -934,7 +934,7 @@ static u32 get_current_settings(struct hci_dev *hdev)
|
|||||||
if (sync_recv_enabled(hdev))
|
if (sync_recv_enabled(hdev))
|
||||||
settings |= MGMT_SETTING_ISO_SYNC_RECEIVER;
|
settings |= MGMT_SETTING_ISO_SYNC_RECEIVER;
|
||||||
|
|
||||||
if (ll_privacy_capable(hdev))
|
if (ll_privacy_enabled(hdev))
|
||||||
settings |= MGMT_SETTING_LL_PRIVACY;
|
settings |= MGMT_SETTING_LL_PRIVACY;
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
|
Loading…
Reference in New Issue
Block a user