OSDN Git Service

Bluetooth: Fix controller list for AMP discover response
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 5 Oct 2013 18:47:40 +0000 (11:47 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 6 Oct 2013 08:19:53 +0000 (10:19 +0200)
The AMP discover response should list exactly one BR/EDR controller
and ignore all other BR/EDR controller.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/a2mp.c

index 17f33a6..eb0f05e 100644 (file)
@@ -92,7 +92,7 @@ static void __a2mp_add_cl(struct amp_mgr *mgr, struct a2mp_cl *cl, u8 num_ctrl)
 
        list_for_each_entry(hdev, &hci_dev_list, list) {
                /* Iterate through AMP controllers */
-               if (hdev->id == HCI_BREDR_ID)
+               if (hdev->dev_type != HCI_AMP)
                        continue;
 
                /* Starting from second entry */