summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-06-19 15:21:21 +0300
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-06-30 12:15:32 -0300
commitd300fa9b14549c64e63691356c68483bcfeb0f04 (patch)
treef0e42db5229fbe7e9bd7ed5eb28f89b0418fc4b2 /net/bluetooth
parent510df2515f6b0afdd7604aee21b02b8f339e9344 (diff)
downloadop-kernel-dev-d300fa9b14549c64e63691356c68483bcfeb0f04.zip
op-kernel-dev-d300fa9b14549c64e63691356c68483bcfeb0f04.tar.gz
Bluetooth: Route traffic only through BR/EDR controller
If AMP controller is first in the list then Bluetooth traffic might be routed through it (if source is not specified). The patch prevents this case and also checks that source is BR/EDR. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_conn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 9bbef6e..5ad7da2 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -442,7 +442,8 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
list_for_each_entry(d, &hci_dev_list, list) {
if (!test_bit(HCI_UP, &d->flags) ||
- test_bit(HCI_RAW, &d->flags))
+ test_bit(HCI_RAW, &d->flags) ||
+ d->dev_type != HCI_BREDR)
continue;
/* Simple routing:
OpenPOWER on IntegriCloud