From: Andrei Emeltchenko Date: Tue, 19 Jun 2012 12:21:21 +0000 (+0300) Subject: Bluetooth: Route traffic only through BR/EDR controller X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d300fa9b14549c64e63691356c68483bcfeb0f04;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 9bbef6e95d2c..5ad7da217474 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: