summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2011-04-06 13:01:59 +0200
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-13 17:20:02 +0200
commite1ba1f15469903b6f443fbf00f069d169e3fba6d (patch)
tree15ab7596925597ed149f2e1d5f462e1905fcc078 /net/bluetooth/hci_event.c
parentBluetooth: Add proper handling of received LE data (diff)
downloadlinux-e1ba1f15469903b6f443fbf00f069d169e3fba6d.tar.xz
linux-e1ba1f15469903b6f443fbf00f069d169e3fba6d.zip
Bluetooth: Fix Out Of Band pairing when mgmt interface is disabled
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>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 7a3398d9cd65..c7eb073fe633 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -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;
@@ -2515,6 +2518,7 @@ static inline void hci_remote_oob_data_request_evt(struct hci_dev *hdev,
&cp);
}
+unlock:
hci_dev_unlock(hdev);
}