aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 833797e9654b..d04011c06be0 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1228,7 +1228,7 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *
1228 1228
1229 hci_dev_lock(hdev); 1229 hci_dev_lock(hdev);
1230 1230
1231 for (; num_rsp; num_rsp--) { 1231 for (; num_rsp; num_rsp--, info++) {
1232 bacpy(&data.bdaddr, &info->bdaddr); 1232 bacpy(&data.bdaddr, &info->bdaddr);
1233 data.pscan_rep_mode = info->pscan_rep_mode; 1233 data.pscan_rep_mode = info->pscan_rep_mode;
1234 data.pscan_period_mode = info->pscan_period_mode; 1234 data.pscan_period_mode = info->pscan_period_mode;
@@ -1237,8 +1237,9 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *
1237 data.clock_offset = info->clock_offset; 1237 data.clock_offset = info->clock_offset;
1238 data.rssi = 0x00; 1238 data.rssi = 0x00;
1239 data.ssp_mode = 0x00; 1239 data.ssp_mode = 0x00;
1240 info++;
1241 hci_inquiry_cache_update(hdev, &data); 1240 hci_inquiry_cache_update(hdev, &data);
1241 mgmt_device_found(hdev->id, &info->bdaddr, info->dev_class, 0,
1242 NULL);
1242 } 1243 }
1243 1244
1244 hci_dev_unlock(hdev); 1245 hci_dev_unlock(hdev);
@@ -2158,7 +2159,7 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
2158 struct inquiry_info_with_rssi_and_pscan_mode *info; 2159 struct inquiry_info_with_rssi_and_pscan_mode *info;
2159 info = (void *) (skb->data + 1); 2160 info = (void *) (skb->data + 1);
2160 2161
2161 for (; num_rsp; num_rsp--) { 2162 for (; num_rsp; num_rsp--, info++) {
2162 bacpy(&data.bdaddr, &info->bdaddr); 2163 bacpy(&data.bdaddr, &info->bdaddr);
2163 data.pscan_rep_mode = info->pscan_rep_mode; 2164 data.pscan_rep_mode = info->pscan_rep_mode;
2164 data.pscan_period_mode = info->pscan_period_mode; 2165 data.pscan_period_mode = info->pscan_period_mode;
@@ -2167,13 +2168,15 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
2167 data.clock_offset = info->clock_offset; 2168 data.clock_offset = info->clock_offset;
2168 data.rssi = info->rssi; 2169 data.rssi = info->rssi;
2169 data.ssp_mode = 0x00; 2170 data.ssp_mode = 0x00;
2170 info++;
2171 hci_inquiry_cache_update(hdev, &data); 2171 hci_inquiry_cache_update(hdev, &data);
2172 mgmt_device_found(hdev->id, &info->bdaddr,
2173 info->dev_class, info->rssi,
2174 NULL);
2172 } 2175 }
2173 } else { 2176 } else {
2174 struct inquiry_info_with_rssi *info = (void *) (skb->data + 1); 2177 struct inquiry_info_with_rssi *info = (void *) (skb->data + 1);
2175 2178
2176 for (; num_rsp; num_rsp--) { 2179 for (; num_rsp; num_rsp--, info++) {
2177 bacpy(&data.bdaddr, &info->bdaddr); 2180 bacpy(&data.bdaddr, &info->bdaddr);
2178 data.pscan_rep_mode = info->pscan_rep_mode; 2181 data.pscan_rep_mode = info->pscan_rep_mode;
2179 data.pscan_period_mode = info->pscan_period_mode; 2182 data.pscan_period_mode = info->pscan_period_mode;
@@ -2182,8 +2185,10 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
2182 data.clock_offset = info->clock_offset; 2185 data.clock_offset = info->clock_offset;
2183 data.rssi = info->rssi; 2186 data.rssi = info->rssi;
2184 data.ssp_mode = 0x00; 2187 data.ssp_mode = 0x00;
2185 info++;
2186 hci_inquiry_cache_update(hdev, &data); 2188 hci_inquiry_cache_update(hdev, &data);
2189 mgmt_device_found(hdev->id, &info->bdaddr,
2190 info->dev_class, info->rssi,
2191 NULL);
2187 } 2192 }
2188 } 2193 }
2189 2194
@@ -2314,7 +2319,7 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
2314 2319
2315 hci_dev_lock(hdev); 2320 hci_dev_lock(hdev);
2316 2321
2317 for (; num_rsp; num_rsp--) { 2322 for (; num_rsp; num_rsp--, info++) {
2318 bacpy(&data.bdaddr, &info->bdaddr); 2323 bacpy(&data.bdaddr, &info->bdaddr);
2319 data.pscan_rep_mode = info->pscan_rep_mode; 2324 data.pscan_rep_mode = info->pscan_rep_mode;
2320 data.pscan_period_mode = info->pscan_period_mode; 2325 data.pscan_period_mode = info->pscan_period_mode;
@@ -2323,8 +2328,9 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
2323 data.clock_offset = info->clock_offset; 2328 data.clock_offset = info->clock_offset;
2324 data.rssi = info->rssi; 2329 data.rssi = info->rssi;
2325 data.ssp_mode = 0x01; 2330 data.ssp_mode = 0x01;
2326 info++;
2327 hci_inquiry_cache_update(hdev, &data); 2331 hci_inquiry_cache_update(hdev, &data);
2332 mgmt_device_found(hdev->id, &info->bdaddr, info->dev_class,
2333 info->rssi, info->data);
2328 } 2334 }
2329 2335
2330 hci_dev_unlock(hdev); 2336 hci_dev_unlock(hdev);