aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/hci_ll.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 8c3e62a17b4a..b91d45a41b2f 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -204,6 +204,19 @@ static void ll_device_want_to_wakeup(struct hci_uart *hu)
204 spin_lock_irqsave(&ll->hcill_lock, flags); 204 spin_lock_irqsave(&ll->hcill_lock, flags);
205 205
206 switch (ll->hcill_state) { 206 switch (ll->hcill_state) {
207 case HCILL_ASLEEP_TO_AWAKE:
208 /*
209 * This state means that both the host and the BRF chip
210 * have simultaneously sent a wake-up-indication packet.
211 * Traditionaly, in this case, receiving a wake-up-indication
212 * was enough and an additional wake-up-ack wasn't needed.
213 * This has changed with the BRF6350, which does require an
214 * explicit wake-up-ack. Other BRF versions, which do not
215 * require an explicit ack here, do accept it, thus it is
216 * perfectly safe to always send one.
217 */
218 BT_DBG("dual wake-up-indication");
219 /* deliberate fall-through - do not add break */
207 case HCILL_ASLEEP: 220 case HCILL_ASLEEP:
208 /* acknowledge device wake up */ 221 /* acknowledge device wake up */
209 if (send_hcill_cmd(HCILL_WAKE_UP_ACK, hu) < 0) { 222 if (send_hcill_cmd(HCILL_WAKE_UP_ACK, hu) < 0) {
@@ -211,16 +224,8 @@ static void ll_device_want_to_wakeup(struct hci_uart *hu)
211 goto out; 224 goto out;
212 } 225 }
213 break; 226 break;
214 case HCILL_ASLEEP_TO_AWAKE:
215 /*
216 * this state means that a wake-up-indication
217 * is already on its way to the device,
218 * and will serve as the required wake-up-ack
219 */
220 BT_DBG("dual wake-up-indication");
221 break;
222 default: 227 default:
223 /* any other state are illegal */ 228 /* any other state is illegal */
224 BT_ERR("received HCILL_WAKE_UP_IND in state %ld", ll->hcill_state); 229 BT_ERR("received HCILL_WAKE_UP_IND in state %ld", ll->hcill_state);
225 break; 230 break;
226 } 231 }