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

Bluetooth: Remove redundant IRK lookup in mgmt_device_found()

Now that we have the process_adv_report() function doing the IRK lookup
and updating the bdaddr we don't need to do this anymore in mgmt.c in
the mgmt_device_found() function.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 1c1abcab
......@@ -6717,7 +6717,6 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
{
char buf[512];
struct mgmt_ev_device_found *ev = (void *) buf;
struct smp_irk *irk;
size_t ev_size;
/* Don't send events for a non-kernel initiated discovery. With
......@@ -6739,15 +6738,8 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
memset(buf, 0, sizeof(buf));
irk = hci_get_irk(hdev, bdaddr, addr_type);
if (irk) {
bacpy(&ev->addr.bdaddr, &irk->bdaddr);
ev->addr.type = link_to_bdaddr(link_type, irk->addr_type);
} else {
bacpy(&ev->addr.bdaddr, bdaddr);
ev->addr.type = link_to_bdaddr(link_type, addr_type);
}
bacpy(&ev->addr.bdaddr, bdaddr);
ev->addr.type = link_to_bdaddr(link_type, addr_type);
ev->rssi = rssi;
ev->flags = cpu_to_le32(flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册