summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_intel.c
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@intel.com>2015-09-09 19:08:02 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-09-17 13:20:06 +0200
commit30e945fb28a66bbbc00859540f79d08e76dec2e2 (patch)
treeaf1c528c585f63d63c3ad3d92e57fdf2db2699f6 /drivers/bluetooth/hci_intel.c
parent9def9afde77a298bfc6ad84a6c5a9e9523aa8bab (diff)
Bluetooth: hci_intel: Give priority to LPM packets
Change the way to insert LPM packets into the txq. Use skb_queue_head instead of skb_queue_tail to always prioritise LPM packets over potential tx queue content. Signed-off-by: Loic Poulain <loic.poulain@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_intel.c')
-rw-r--r--drivers/bluetooth/hci_intel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index b17386b5792c..249e0963170d 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -190,7 +190,8 @@ static int intel_lpm_suspend(struct hci_uart *hu)
set_bit(STATE_LPM_TRANSACTION, &intel->flags);
- skb_queue_tail(&intel->txq, skb);
+ /* LPM flow is a priority, enqueue packet at list head */
+ skb_queue_head(&intel->txq, skb);
hci_uart_tx_wakeup(hu);
intel_wait_lpm_transaction(hu);
@@ -233,7 +234,8 @@ static int intel_lpm_resume(struct hci_uart *hu)
set_bit(STATE_LPM_TRANSACTION, &intel->flags);
- skb_queue_tail(&intel->txq, skb);
+ /* LPM flow is a priority, enqueue packet at list head */
+ skb_queue_head(&intel->txq, skb);
hci_uart_tx_wakeup(hu);
intel_wait_lpm_transaction(hu);
@@ -272,7 +274,8 @@ static int intel_lpm_host_wake(struct hci_uart *hu)
sizeof(lpm_resume_ack));
bt_cb(skb)->pkt_type = HCI_LPM_PKT;
- skb_queue_tail(&intel->txq, skb);
+ /* LPM flow is a priority, enqueue packet at list head */
+ skb_queue_head(&intel->txq, skb);
hci_uart_tx_wakeup(hu);
bt_dev_dbg(hu->hdev, "Resumed by controller");