aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 45b7a4e5aa42..5a94eec06caa 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2324,12 +2324,14 @@ int mgmt_device_found(u16 index, bdaddr_t *bdaddr, u8 *dev_class, s8 rssi,
2324 memset(&ev, 0, sizeof(ev)); 2324 memset(&ev, 0, sizeof(ev));
2325 2325
2326 bacpy(&ev.bdaddr, bdaddr); 2326 bacpy(&ev.bdaddr, bdaddr);
2327 memcpy(ev.dev_class, dev_class, sizeof(ev.dev_class));
2328 ev.rssi = rssi; 2327 ev.rssi = rssi;
2329 2328
2330 if (eir) 2329 if (eir)
2331 memcpy(ev.eir, eir, sizeof(ev.eir)); 2330 memcpy(ev.eir, eir, sizeof(ev.eir));
2332 2331
2332 if (dev_class)
2333 memcpy(ev.dev_class, dev_class, sizeof(ev.dev_class));
2334
2333 return mgmt_event(MGMT_EV_DEVICE_FOUND, index, &ev, sizeof(ev), NULL); 2335 return mgmt_event(MGMT_EV_DEVICE_FOUND, index, &ev, sizeof(ev), NULL);
2334} 2336}
2335 2337