diff options
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 9b30587c0de6..276f3ac06089 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -1696,7 +1696,7 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff * | |||
1696 | hci_dev_lock(hdev); | 1696 | hci_dev_lock(hdev); |
1697 | 1697 | ||
1698 | for (; num_rsp; num_rsp--, info++) { | 1698 | for (; num_rsp; num_rsp--, info++) { |
1699 | bool name_known; | 1699 | bool name_known, ssp; |
1700 | 1700 | ||
1701 | bacpy(&data.bdaddr, &info->bdaddr); | 1701 | bacpy(&data.bdaddr, &info->bdaddr); |
1702 | data.pscan_rep_mode = info->pscan_rep_mode; | 1702 | data.pscan_rep_mode = info->pscan_rep_mode; |
@@ -1707,9 +1707,9 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff * | |||
1707 | data.rssi = 0x00; | 1707 | data.rssi = 0x00; |
1708 | data.ssp_mode = 0x00; | 1708 | data.ssp_mode = 0x00; |
1709 | 1709 | ||
1710 | name_known = hci_inquiry_cache_update(hdev, &data, false); | 1710 | name_known = hci_inquiry_cache_update(hdev, &data, false, &ssp); |
1711 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, | 1711 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, |
1712 | info->dev_class, 0, !name_known, | 1712 | info->dev_class, 0, !name_known, ssp, |
1713 | NULL, 0); | 1713 | NULL, 0); |
1714 | } | 1714 | } |
1715 | 1715 | ||
@@ -2783,7 +2783,7 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct | |||
2783 | { | 2783 | { |
2784 | struct inquiry_data data; | 2784 | struct inquiry_data data; |
2785 | int num_rsp = *((__u8 *) skb->data); | 2785 | int num_rsp = *((__u8 *) skb->data); |
2786 | bool name_known; | 2786 | bool name_known, ssp; |
2787 | 2787 | ||
2788 | BT_DBG("%s num_rsp %d", hdev->name, num_rsp); | 2788 | BT_DBG("%s num_rsp %d", hdev->name, num_rsp); |
2789 | 2789 | ||
@@ -2807,10 +2807,10 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct | |||
2807 | data.ssp_mode = 0x00; | 2807 | data.ssp_mode = 0x00; |
2808 | 2808 | ||
2809 | name_known = hci_inquiry_cache_update(hdev, &data, | 2809 | name_known = hci_inquiry_cache_update(hdev, &data, |
2810 | false); | 2810 | false, &ssp); |
2811 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, | 2811 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, |
2812 | info->dev_class, info->rssi, | 2812 | info->dev_class, info->rssi, |
2813 | !name_known, NULL, 0); | 2813 | !name_known, ssp, NULL, 0); |
2814 | } | 2814 | } |
2815 | } else { | 2815 | } else { |
2816 | struct inquiry_info_with_rssi *info = (void *) (skb->data + 1); | 2816 | struct inquiry_info_with_rssi *info = (void *) (skb->data + 1); |
@@ -2825,10 +2825,10 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct | |||
2825 | data.rssi = info->rssi; | 2825 | data.rssi = info->rssi; |
2826 | data.ssp_mode = 0x00; | 2826 | data.ssp_mode = 0x00; |
2827 | name_known = hci_inquiry_cache_update(hdev, &data, | 2827 | name_known = hci_inquiry_cache_update(hdev, &data, |
2828 | false); | 2828 | false, &ssp); |
2829 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, | 2829 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, |
2830 | info->dev_class, info->rssi, | 2830 | info->dev_class, info->rssi, |
2831 | !name_known, NULL, 0); | 2831 | !name_known, ssp, NULL, 0); |
2832 | } | 2832 | } |
2833 | } | 2833 | } |
2834 | 2834 | ||
@@ -2964,7 +2964,7 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct | |||
2964 | hci_dev_lock(hdev); | 2964 | hci_dev_lock(hdev); |
2965 | 2965 | ||
2966 | for (; num_rsp; num_rsp--, info++) { | 2966 | for (; num_rsp; num_rsp--, info++) { |
2967 | bool name_known; | 2967 | bool name_known, ssp; |
2968 | 2968 | ||
2969 | bacpy(&data.bdaddr, &info->bdaddr); | 2969 | bacpy(&data.bdaddr, &info->bdaddr); |
2970 | data.pscan_rep_mode = info->pscan_rep_mode; | 2970 | data.pscan_rep_mode = info->pscan_rep_mode; |
@@ -2982,10 +2982,11 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct | |||
2982 | else | 2982 | else |
2983 | name_known = true; | 2983 | name_known = true; |
2984 | 2984 | ||
2985 | name_known = hci_inquiry_cache_update(hdev, &data, name_known); | 2985 | name_known = hci_inquiry_cache_update(hdev, &data, name_known, |
2986 | &ssp); | ||
2986 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, | 2987 | mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, |
2987 | info->dev_class, info->rssi, | 2988 | info->dev_class, info->rssi, |
2988 | !name_known, info->data, | 2989 | !name_known, ssp, info->data, |
2989 | sizeof(info->data)); | 2990 | sizeof(info->data)); |
2990 | } | 2991 | } |
2991 | 2992 | ||
@@ -3310,7 +3311,8 @@ static inline void hci_le_adv_report_evt(struct hci_dev *hdev, | |||
3310 | 3311 | ||
3311 | rssi = ev->data[ev->length]; | 3312 | rssi = ev->data[ev->length]; |
3312 | mgmt_device_found(hdev, &ev->bdaddr, LE_LINK, ev->bdaddr_type, | 3313 | mgmt_device_found(hdev, &ev->bdaddr, LE_LINK, ev->bdaddr_type, |
3313 | NULL, rssi, 0, ev->data, ev->length); | 3314 | NULL, rssi, 0, 1, ev->data, |
3315 | ev->length); | ||
3314 | 3316 | ||
3315 | ptr += sizeof(*ev) + ev->length + 1; | 3317 | ptr += sizeof(*ev) + ev->length + 1; |
3316 | } | 3318 | } |