Skip to content

Commit

Permalink
Bluetooth: Fix Out Of Band pairing when mgmt interface is disabled
Browse files Browse the repository at this point in the history
Use kernel stored remote Out Of Band data only if management interface
is enabled. Otherwise HCI_OP_REMOTE_OOB_DATA_NEG_REPLY was sent to
controller even if remote Out Of Band data was present in bluetoothd.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Szymon Janc authored and Gustavo F. Padovan committed Apr 13, 2011
1 parent 9f69bda commit e1ba1f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2497,6 +2497,9 @@ static inline void hci_remote_oob_data_request_evt(struct hci_dev *hdev,

hci_dev_lock(hdev);

if (!test_bit(HCI_MGMT, &hdev->flags))
goto unlock;

data = hci_find_remote_oob_data(hdev, &ev->bdaddr);
if (data) {
struct hci_cp_remote_oob_data_reply cp;
Expand All @@ -2515,6 +2518,7 @@ static inline void hci_remote_oob_data_request_evt(struct hci_dev *hdev,
&cp);
}

unlock:
hci_dev_unlock(hdev);
}

Expand Down

0 comments on commit e1ba1f1

Please sign in to comment.