mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Bluetooth: Fix EIR data generation for mgmt_device_found
The mgmt_device_found function expects to receive only the significant part of the EIR data so it needs to be removed before calling the function. This patch adds a new eir_get_length() helper function to calculate the length of the significant part. Signed-off-by: Vishal Agarwal <[email protected]> Signed-off-by: Johan Hedberg <[email protected]>
This commit is contained in:
parent
a24299e6c8
commit
9d939d9484
2 changed files with 20 additions and 1 deletions
|
|
@ -3001,6 +3001,7 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
|
|||
struct inquiry_data data;
|
||||
struct extended_inquiry_info *info = (void *) (skb->data + 1);
|
||||
int num_rsp = *((__u8 *) skb->data);
|
||||
size_t eir_len;
|
||||
|
||||
BT_DBG("%s num_rsp %d", hdev->name, num_rsp);
|
||||
|
||||
|
|
@ -3033,9 +3034,10 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
|
|||
|
||||
name_known = hci_inquiry_cache_update(hdev, &data, name_known,
|
||||
&ssp);
|
||||
eir_len = eir_get_length(info->data, sizeof(info->data));
|
||||
mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
|
||||
info->dev_class, info->rssi, !name_known,
|
||||
ssp, info->data, sizeof(info->data));
|
||||
ssp, info->data, eir_len);
|
||||
}
|
||||
|
||||
hci_dev_unlock(hdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue