diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_event.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 055625b7368f..af181f455f6f 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -3881,8 +3881,25 @@ static u8 bredr_oob_data_present(struct hci_conn *conn) | |||
3881 | !memcmp(data->hash256, ZERO_KEY, 16))) | 3881 | !memcmp(data->hash256, ZERO_KEY, 16))) |
3882 | return 0x00; | 3882 | return 0x00; |
3883 | 3883 | ||
3884 | if (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags)) | 3884 | if (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags)) { |
3885 | /* When Secure Connections has been enabled, then just | ||
3886 | * return the present value stored with the OOB data. It | ||
3887 | * will contain the right information about which data | ||
3888 | * is present. | ||
3889 | */ | ||
3890 | if (bredr_sc_enabled(hdev)) | ||
3891 | return data->present; | ||
3892 | |||
3893 | /* When Secure Connections is not enabled or actually | ||
3894 | * not supported by the hardware, then check that if | ||
3895 | * P-192 data values are present. | ||
3896 | */ | ||
3897 | if (!memcmp(data->rand192, ZERO_KEY, 16) || | ||
3898 | !memcmp(data->hash192, ZERO_KEY, 16)) | ||
3899 | return 0x00; | ||
3900 | |||
3885 | return 0x01; | 3901 | return 0x01; |
3902 | } | ||
3886 | 3903 | ||
3887 | return 0x00; | 3904 | return 0x00; |
3888 | } | 3905 | } |