Skip to content

Commit

Permalink
Bluetooth: Fix advertising handle is set to 0 [STREAMEIGHT-4746]
Browse files Browse the repository at this point in the history
commit eaa7b72 upstream.

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 <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Michal Dzik <[email protected]>
  • Loading branch information
tedd-an authored and dasty committed Jun 9, 2021
1 parent 3ea0803 commit 3be0902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/bluetooth/hci_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,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;
Expand Down Expand Up @@ -1371,7 +1371,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;

Expand Down Expand Up @@ -1656,7 +1656,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,
Expand Down

0 comments on commit 3be0902

Please sign in to comment.