Skip to content

Commit

Permalink
Bluetooth: hci_intel: Give priority to LPM packets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Loic Poulain authored and Marcel Holtmann committed Sep 17, 2015
1 parent 9def9af commit 30e945f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/bluetooth/hci_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 30e945f

Please sign in to comment.