From: Marcel Holtmann Date: Mon, 7 Oct 2013 07:58:34 +0000 (-0700) Subject: Bluetooth: List powered down AMP controllers correctly X-Git-Tag: v3.13-rc1~105^2~23^2^2~61^2~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd0a85c22cd39f040ef4cff07a6c249bf1023137;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index 9410e27..b38d074 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c @@ -89,7 +89,10 @@ static void __a2mp_add_cl(struct amp_mgr *mgr, struct a2mp_cl *cl) if (hdev->dev_type == HCI_AMP) { cl[i].id = hdev->id; cl[i].type = hdev->amp_type; - cl[i].status = hdev->amp_status; + if (test_bit(HCI_UP, &hdev->flags)) + cl[i].status = hdev->amp_status; + else + cl[i].status = AMP_STATUS_POWERED_DOWN; i++; } }