提交 eb438b5f 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

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: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 d3900cb2
......@@ -575,12 +575,12 @@ static void update_scan_rsp_data(struct hci_request *req)
len = create_scan_rsp_data(hdev, cp.data);
if (hdev->adv_data_len == len &&
memcmp(cp.data, hdev->adv_data, len) == 0)
if (hdev->scan_rsp_data_len == len &&
memcmp(cp.data, hdev->scan_rsp_data, len) == 0)
return;
memcpy(hdev->adv_data, cp.data, sizeof(cp.data));
hdev->adv_data_len = len;
memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data));
hdev->scan_rsp_data_len = len;
cp.length = len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册