* Bluetooth: hci_intel: Give priority to LPM packets
@ 2015-09-09 17:08 Loic Poulain
2015-09-09 17:42 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2015-09-09 17:08 UTC (permalink / raw)
To: marcel; +Cc: linux-bluetooth, Loic Poulain
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>
---
drivers/bluetooth/hci_intel.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index 3314823..21f339f 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");
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Bluetooth: hci_intel: Give priority to LPM packets
2015-09-09 17:08 Bluetooth: hci_intel: Give priority to LPM packets Loic Poulain
@ 2015-09-09 17:42 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2015-09-09 17:42 UTC (permalink / raw)
To: Loic Poulain; +Cc: linux-bluetooth
Hi Loic,
> 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>
> ---
> drivers/bluetooth/hci_intel.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-09 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09 17:08 Bluetooth: hci_intel: Give priority to LPM packets Loic Poulain
2015-09-09 17:42 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).