Bluetooth: Use HCI_MGMT instead of HCI_LINK_KEYS flag
Use HCI_MGMT flag instead of HCI_LINK_KEYS flag. There is a problem with HCI_LINK_KEYS flag since it is set only when link keys are loaded. Otherwise kernel assumes that old interface is used. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
Родитель
12602d0cc0
Коммит
034cbea093
|
@ -2611,7 +2611,7 @@ static void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
|
|
||||||
BT_DBG("%s", hdev->name);
|
BT_DBG("%s", hdev->name);
|
||||||
|
|
||||||
if (!test_bit(HCI_LINK_KEYS, &hdev->dev_flags))
|
if (!test_bit(HCI_MGMT, &hdev->dev_flags))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hci_dev_lock(hdev);
|
hci_dev_lock(hdev);
|
||||||
|
@ -2687,7 +2687,7 @@ static void hci_link_key_notify_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
hci_conn_drop(conn);
|
hci_conn_drop(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test_bit(HCI_LINK_KEYS, &hdev->dev_flags))
|
if (test_bit(HCI_MGMT, &hdev->dev_flags))
|
||||||
hci_add_link_key(hdev, conn, 1, &ev->bdaddr, ev->link_key,
|
hci_add_link_key(hdev, conn, 1, &ev->bdaddr, ev->link_key,
|
||||||
ev->key_type, pin_len);
|
ev->key_type, pin_len);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче