Commit eaa7b722 authored by Tedd Ho-Jeong An's avatar Tedd Ho-Jeong An Committed by Marcel Holtmann

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: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 4765db37
...@@ -1447,7 +1447,7 @@ void __hci_req_update_scan_rsp_data(struct hci_request *req, u8 instance) ...@@ -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)); memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data));
hdev->scan_rsp_data_len = len; hdev->scan_rsp_data_len = len;
cp.handle = 0; cp.handle = instance;
cp.length = len; cp.length = len;
cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; cp.operation = LE_SET_ADV_DATA_OP_COMPLETE;
cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; 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) ...@@ -1591,7 +1591,7 @@ void __hci_req_update_adv_data(struct hci_request *req, u8 instance)
hdev->adv_data_len = len; hdev->adv_data_len = len;
cp.length = len; cp.length = len;
cp.handle = 0; cp.handle = instance;
cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; cp.operation = LE_SET_ADV_DATA_OP_COMPLETE;
cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; 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) ...@@ -1876,7 +1876,7 @@ int __hci_req_setup_ext_adv_instance(struct hci_request *req, u8 instance)
memset(&cp, 0, sizeof(cp)); memset(&cp, 0, sizeof(cp));
cp.handle = 0; cp.handle = instance;
bacpy(&cp.bdaddr, &random_addr); bacpy(&cp.bdaddr, &random_addr);
hci_req_add(req, hci_req_add(req,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment