Skip to content

Commit cd0a85c

Browse files
holtmannjhedberg
authored andcommitted
Bluetooth: List powered down AMP controllers correctly
Within the AMP discover response, list powered down AMP controllers as powered down. No point in trying to make them look any different. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
1 parent 93c311a commit cd0a85c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎net/bluetooth/a2mp.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ static void __a2mp_add_cl(struct amp_mgr *mgr, struct a2mp_cl *cl)
8989
if (hdev->dev_type == HCI_AMP) {
9090
cl[i].id = hdev->id;
9191
cl[i].type = hdev->amp_type;
92-
cl[i].status = hdev->amp_status;
92+
if (test_bit(HCI_UP, &hdev->flags))
93+
cl[i].status = hdev->amp_status;
94+
else
95+
cl[i].status = AMP_STATUS_POWERED_DOWN;
9396
i++;
9497
}
9598
}

0 commit comments

Comments
 (0)