diff options
author | Sathish Narasimman <sathish.narasimman@intel.com> | 2021-04-05 20:00:23 +0530 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-04-06 10:47:45 +0200 |
commit | abb638b311da86eba61c4b2be8eb13375a56b7be (patch) | |
tree | 5a0267ef21a87da3492b58c50fa39015a7371f6f /net/bluetooth/hci_request.c | |
parent | b6f1b79deabd32f89adbf24ef7b30f82d029808a (diff) | |
download | linux-abb638b311da86eba61c4b2be8eb13375a56b7be.tar.gz linux-abb638b311da86eba61c4b2be8eb13375a56b7be.tar.bz2 linux-abb638b311da86eba61c4b2be8eb13375a56b7be.zip |
Bluetooth: Handle own address type change with HCI_ENABLE_LL_PRIVACY
own_address_type has to changed to 0x02 and 0x03 only when
HCI_ENABLE_LL_PRIVACY flag is set.
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r-- | net/bluetooth/hci_request.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 5b4eb87b19f0..0d78122342d5 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -2043,7 +2043,8 @@ int hci_get_random_address(struct hci_dev *hdev, bool require_privacy, /* If Controller supports LL Privacy use own address type is * 0x03 */ - if (use_ll_privacy(hdev)) + if (use_ll_privacy(hdev) && + hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY)) *own_addr_type = ADDR_LE_DEV_RANDOM_RESOLVED; else *own_addr_type = ADDR_LE_DEV_RANDOM; @@ -2517,7 +2518,8 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy, /* If Controller supports LL Privacy use own address type is * 0x03 */ - if (use_ll_privacy(hdev)) + if (use_ll_privacy(hdev) && + hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY)) *own_addr_type = ADDR_LE_DEV_RANDOM_RESOLVED; else *own_addr_type = ADDR_LE_DEV_RANDOM; |