diff options
Diffstat (limited to 'drivers/bluetooth/hci_qca.c')
| -rw-r--r-- | drivers/bluetooth/hci_qca.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index d33828fef89f..e3164c200eac 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c | |||
| @@ -309,13 +309,14 @@ static void qca_wq_awake_device(struct work_struct *work) | |||
| 309 | ws_awake_device); | 309 | ws_awake_device); |
| 310 | struct hci_uart *hu = qca->hu; | 310 | struct hci_uart *hu = qca->hu; |
| 311 | unsigned long retrans_delay; | 311 | unsigned long retrans_delay; |
| 312 | unsigned long flags; | ||
| 312 | 313 | ||
| 313 | BT_DBG("hu %p wq awake device", hu); | 314 | BT_DBG("hu %p wq awake device", hu); |
| 314 | 315 | ||
| 315 | /* Vote for serial clock */ | 316 | /* Vote for serial clock */ |
| 316 | serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_ON, hu); | 317 | serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_ON, hu); |
| 317 | 318 | ||
| 318 | spin_lock(&qca->hci_ibs_lock); | 319 | spin_lock_irqsave(&qca->hci_ibs_lock, flags); |
| 319 | 320 | ||
| 320 | /* Send wake indication to device */ | 321 | /* Send wake indication to device */ |
| 321 | if (send_hci_ibs_cmd(HCI_IBS_WAKE_IND, hu) < 0) | 322 | if (send_hci_ibs_cmd(HCI_IBS_WAKE_IND, hu) < 0) |
| @@ -327,7 +328,7 @@ static void qca_wq_awake_device(struct work_struct *work) | |||
| 327 | retrans_delay = msecs_to_jiffies(qca->wake_retrans); | 328 | retrans_delay = msecs_to_jiffies(qca->wake_retrans); |
| 328 | mod_timer(&qca->wake_retrans_timer, jiffies + retrans_delay); | 329 | mod_timer(&qca->wake_retrans_timer, jiffies + retrans_delay); |
| 329 | 330 | ||
| 330 | spin_unlock(&qca->hci_ibs_lock); | 331 | spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); |
| 331 | 332 | ||
| 332 | /* Actually send the packets */ | 333 | /* Actually send the packets */ |
| 333 | hci_uart_tx_wakeup(hu); | 334 | hci_uart_tx_wakeup(hu); |
| @@ -338,12 +339,13 @@ static void qca_wq_awake_rx(struct work_struct *work) | |||
| 338 | struct qca_data *qca = container_of(work, struct qca_data, | 339 | struct qca_data *qca = container_of(work, struct qca_data, |
| 339 | ws_awake_rx); | 340 | ws_awake_rx); |
| 340 | struct hci_uart *hu = qca->hu; | 341 | struct hci_uart *hu = qca->hu; |
| 342 | unsigned long flags; | ||
| 341 | 343 | ||
| 342 | BT_DBG("hu %p wq awake rx", hu); | 344 | BT_DBG("hu %p wq awake rx", hu); |
| 343 | 345 | ||
| 344 | serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_ON, hu); | 346 | serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_ON, hu); |
| 345 | 347 | ||
| 346 | spin_lock(&qca->hci_ibs_lock); | 348 | spin_lock_irqsave(&qca->hci_ibs_lock, flags); |
| 347 | qca->rx_ibs_state = HCI_IBS_RX_AWAKE; | 349 | qca->rx_ibs_state = HCI_IBS_RX_AWAKE; |
| 348 | 350 | ||
| 349 | /* Always acknowledge device wake up, | 351 | /* Always acknowledge device wake up, |
| @@ -354,7 +356,7 @@ static void qca_wq_awake_rx(struct work_struct *work) | |||
| 354 | 356 | ||
| 355 | qca->ibs_sent_wacks++; | 357 | qca->ibs_sent_wacks++; |
| 356 | 358 | ||
| 357 | spin_unlock(&qca->hci_ibs_lock); | 359 | spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); |
| 358 | 360 | ||
| 359 | /* Actually send the packets */ | 361 | /* Actually send the packets */ |
| 360 | hci_uart_tx_wakeup(hu); | 362 | hci_uart_tx_wakeup(hu); |
