summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorTedd Ho-Jeong An <tedd.an@intel.com>2020-05-01 10:00:50 -0700
committerMarcel Holtmann <marcel@holtmann.org>2020-05-11 12:13:38 +0200
commiteaa7b7228ff7f8688623120bb0cd75d1490d5d04 (patch)
tree0af69cfc1facf77d1a84929613cff52b5c01f9cd /net/bluetooth
parent4765db373ea34c7262e3467f8aaf4167dd1cdafa (diff)
downloadlinux-eaa7b7228ff7f8688623120bb0cd75d1490d5d04.tar.gz
linux-eaa7b7228ff7f8688623120bb0cd75d1490d5d04.tar.bz2
linux-eaa7b7228ff7f8688623120bb0cd75d1490d5d04.zip
Bluetooth: Fix advertising handle is set to 0
This patch fix the advertising handle is set to 0 regardless of actual instance value. The affected commands are LE Set Advertising Set Random Address, LE Set Extended Advertising Data, and LE Set Extended Scan Response Data commands. Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_request.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 9ea40106ef17..3f470f0e432c 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -1447,7 +1447,7 @@ void __hci_req_update_scan_rsp_data(struct hci_request *req, u8 instance)
memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data));
hdev->scan_rsp_data_len = len;
- cp.handle = 0;
+ cp.handle = instance;
cp.length = len;
cp.operation = LE_SET_ADV_DATA_OP_COMPLETE;
cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG;
@@ -1591,7 +1591,7 @@ void __hci_req_update_adv_data(struct hci_request *req, u8 instance)
hdev->adv_data_len = len;
cp.length = len;
- cp.handle = 0;
+ cp.handle = instance;
cp.operation = LE_SET_ADV_DATA_OP_COMPLETE;
cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG;
@@ -1876,7 +1876,7 @@ int __hci_req_setup_ext_adv_instance(struct hci_request *req, u8 instance)
memset(&cp, 0, sizeof(cp));
- cp.handle = 0;
+ cp.handle = instance;
bacpy(&cp.bdaddr, &random_addr);
hci_req_add(req,