diff options
-rw-r--r-- | net/bluetooth/hci_event.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index c43cee4fcffd..be35598984d9 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -3671,13 +3671,18 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
3671 | if (conn->io_capability != HCI_IO_NO_INPUT_OUTPUT && | 3671 | if (conn->io_capability != HCI_IO_NO_INPUT_OUTPUT && |
3672 | conn->auth_type != HCI_AT_NO_BONDING) | 3672 | conn->auth_type != HCI_AT_NO_BONDING) |
3673 | conn->auth_type |= 0x01; | 3673 | conn->auth_type |= 0x01; |
3674 | |||
3675 | cp.authentication = conn->auth_type; | ||
3676 | } else { | 3674 | } else { |
3677 | conn->auth_type = hci_get_auth_req(conn); | 3675 | conn->auth_type = hci_get_auth_req(conn); |
3678 | cp.authentication = conn->auth_type; | ||
3679 | } | 3676 | } |
3680 | 3677 | ||
3678 | /* If we're not bondable, force one of the non-bondable | ||
3679 | * authentication requirement values. | ||
3680 | */ | ||
3681 | if (!test_bit(HCI_BONDABLE, &hdev->dev_flags)) | ||
3682 | conn->auth_type &= HCI_AT_NO_BONDING_MITM; | ||
3683 | |||
3684 | cp.authentication = conn->auth_type; | ||
3685 | |||
3681 | if (hci_find_remote_oob_data(hdev, &conn->dst) && | 3686 | if (hci_find_remote_oob_data(hdev, &conn->dst) && |
3682 | (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags))) | 3687 | (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags))) |
3683 | cp.oob_data = 0x01; | 3688 | cp.oob_data = 0x01; |