Bluetooth: Fix updating the right variable in update_scan_rsp_data()
This function should be operating on scan_rsp_data_len and scan_rsp_data and not the advertising data variables. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Marcel Holtmann
parent
d3900cb25d
commit
eb438b5f30
@@ -575,12 +575,12 @@ static void update_scan_rsp_data(struct hci_request *req)
|
|||||||
|
|
||||||
len = create_scan_rsp_data(hdev, cp.data);
|
len = create_scan_rsp_data(hdev, cp.data);
|
||||||
|
|
||||||
if (hdev->adv_data_len == len &&
|
if (hdev->scan_rsp_data_len == len &&
|
||||||
memcmp(cp.data, hdev->adv_data, len) == 0)
|
memcmp(cp.data, hdev->scan_rsp_data, len) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memcpy(hdev->adv_data, cp.data, sizeof(cp.data));
|
memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data));
|
||||||
hdev->adv_data_len = len;
|
hdev->scan_rsp_data_len = len;
|
||||||
|
|
||||||
cp.length = len;
|
cp.length = len;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user