* [PATCH 0/2] remove wake queue tx logic for usb/sdio
@ 2020-12-05 10:35 Lorenzo Bianconi
2020-12-05 10:35 ` [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker Lorenzo Bianconi
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-12-05 10:35 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless
Similar to mmio, remove queue wake logic for sdio and usb code path
Lorenzo Bianconi (2):
mt76: usb: remove wake logic in mt76u_status_worker
mt76: sdio: remove wake logic in mt76s_process_tx_queue
drivers/net/wireless/mediatek/mt76/sdio.c | 15 +++------------
drivers/net/wireless/mediatek/mt76/usb.c | 7 -------
2 files changed, 3 insertions(+), 19 deletions(-)
--
2.28.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker
2020-12-05 10:35 [PATCH 0/2] remove wake queue tx logic for usb/sdio Lorenzo Bianconi
@ 2020-12-05 10:35 ` Lorenzo Bianconi
2020-12-17 19:10 ` Lorenzo Bianconi
2020-12-20 12:04 ` [1/2] " Kalle Valo
2020-12-05 10:35 ` [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue Lorenzo Bianconi
2020-12-17 12:03 ` [PATCH 0/2] remove wake queue tx logic for usb/sdio Lorenzo Bianconi
2 siblings, 2 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-12-05 10:35 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless
Similar to mmio code path, remove wake logic in mt76u_status_worker
handler
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/usb.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 81393788f98e..658b36a2281d 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -811,7 +811,6 @@ static void mt76u_status_worker(struct mt76_worker *w)
struct mt76_dev *dev = container_of(usb, struct mt76_dev, usb);
struct mt76_queue_entry entry;
struct mt76_queue *q;
- bool wake;
int i;
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
@@ -827,10 +826,6 @@ static void mt76u_status_worker(struct mt76_worker *w)
mt76_queue_tx_complete(dev, q, &entry);
}
- wake = q->stopped && q->queued < q->ndesc - 8;
- if (wake)
- q->stopped = false;
-
if (!q->queued)
wake_up(&dev->tx_wait);
@@ -839,8 +834,6 @@ static void mt76u_status_worker(struct mt76_worker *w)
if (dev->drv->tx_status_data &&
!test_and_set_bit(MT76_READING_STATS, &dev->phy.state))
queue_work(dev->wq, &dev->usb.stat_work);
- if (wake)
- ieee80211_wake_queue(dev->hw, i);
}
}
--
2.28.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue
2020-12-05 10:35 [PATCH 0/2] remove wake queue tx logic for usb/sdio Lorenzo Bianconi
2020-12-05 10:35 ` [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker Lorenzo Bianconi
@ 2020-12-05 10:35 ` Lorenzo Bianconi
2020-12-17 19:07 ` Lorenzo Bianconi
2020-12-17 12:03 ` [PATCH 0/2] remove wake queue tx logic for usb/sdio Lorenzo Bianconi
2 siblings, 1 reply; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-12-05 10:35 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless
Similar to mmio/usb code path, remove wake logic in mt76s_process_tx_queue
routine
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/sdio.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c
index 62b5b912818f..7cd995118257 100644
--- a/drivers/net/wireless/mediatek/mt76/sdio.c
+++ b/drivers/net/wireless/mediatek/mt76/sdio.c
@@ -157,7 +157,7 @@ static void mt76s_net_worker(struct mt76_worker *w)
static int mt76s_process_tx_queue(struct mt76_dev *dev, struct mt76_queue *q)
{
- bool wake, mcu = q == dev->q_mcu[MT_MCUQ_WM];
+ bool mcu = q == dev->q_mcu[MT_MCUQ_WM];
struct mt76_queue_entry entry;
int nframes = 0;
@@ -177,21 +177,12 @@ static int mt76s_process_tx_queue(struct mt76_dev *dev, struct mt76_queue *q)
nframes++;
}
- wake = q->stopped && q->queued < q->ndesc - 8;
- if (wake)
- q->stopped = false;
-
if (!q->queued)
wake_up(&dev->tx_wait);
- if (mcu)
- goto out;
-
- mt76_txq_schedule(&dev->phy, q->qid);
+ if (!mcu)
+ mt76_txq_schedule(&dev->phy, q->qid);
- if (wake)
- ieee80211_wake_queue(dev->hw, q->qid);
-out:
return nframes;
}
--
2.28.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] remove wake queue tx logic for usb/sdio
2020-12-05 10:35 [PATCH 0/2] remove wake queue tx logic for usb/sdio Lorenzo Bianconi
2020-12-05 10:35 ` [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker Lorenzo Bianconi
2020-12-05 10:35 ` [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue Lorenzo Bianconi
@ 2020-12-17 12:03 ` Lorenzo Bianconi
2 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-12-17 12:03 UTC (permalink / raw)
To: nbd, kvalo; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 567 bytes --]
> Similar to mmio, remove queue wake logic for sdio and usb code path
>
> Lorenzo Bianconi (2):
> mt76: usb: remove wake logic in mt76u_status_worker
> mt76: sdio: remove wake logic in mt76s_process_tx_queue
>
> drivers/net/wireless/mediatek/mt76/sdio.c | 15 +++------------
> drivers/net/wireless/mediatek/mt76/usb.c | 7 -------
> 2 files changed, 3 insertions(+), 19 deletions(-)
>
Hi Felix,
do you think we can take this series in wireless-driver or do you prefer it
goes through your tree?
Regards,
Lorenzo
> --
> 2.28.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue
2020-12-05 10:35 ` [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue Lorenzo Bianconi
@ 2020-12-17 19:07 ` Lorenzo Bianconi
0 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-12-17 19:07 UTC (permalink / raw)
To: kvalo; +Cc: nbd, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]
> Similar to mmio/usb code path, remove wake logic in mt76s_process_tx_queue
> routine
Starting from commit '90d494c99a99fa2eb858754345c4a9c851b409a0
("mt76: improve tx queue stop/wake")', the wake queue logic on
the sdio status path is no longer necessary since the hw queues
are no longer stopped on the mt76 tx path.
Regards,
Lorenzo
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/wireless/mediatek/mt76/sdio.c | 15 +++------------
> 1 file changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c
> index 62b5b912818f..7cd995118257 100644
> --- a/drivers/net/wireless/mediatek/mt76/sdio.c
> +++ b/drivers/net/wireless/mediatek/mt76/sdio.c
> @@ -157,7 +157,7 @@ static void mt76s_net_worker(struct mt76_worker *w)
>
> static int mt76s_process_tx_queue(struct mt76_dev *dev, struct mt76_queue *q)
> {
> - bool wake, mcu = q == dev->q_mcu[MT_MCUQ_WM];
> + bool mcu = q == dev->q_mcu[MT_MCUQ_WM];
> struct mt76_queue_entry entry;
> int nframes = 0;
>
> @@ -177,21 +177,12 @@ static int mt76s_process_tx_queue(struct mt76_dev *dev, struct mt76_queue *q)
> nframes++;
> }
>
> - wake = q->stopped && q->queued < q->ndesc - 8;
> - if (wake)
> - q->stopped = false;
> -
> if (!q->queued)
> wake_up(&dev->tx_wait);
>
> - if (mcu)
> - goto out;
> -
> - mt76_txq_schedule(&dev->phy, q->qid);
> + if (!mcu)
> + mt76_txq_schedule(&dev->phy, q->qid);
>
> - if (wake)
> - ieee80211_wake_queue(dev->hw, q->qid);
> -out:
> return nframes;
> }
>
> --
> 2.28.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker
2020-12-05 10:35 ` [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker Lorenzo Bianconi
@ 2020-12-17 19:10 ` Lorenzo Bianconi
2020-12-18 5:26 ` Kalle Valo
2020-12-20 12:04 ` [1/2] " Kalle Valo
1 sibling, 1 reply; 8+ messages in thread
From: Lorenzo Bianconi @ 2020-12-17 19:10 UTC (permalink / raw)
To: kvalo; +Cc: nbd, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]
> Similar to mmio code path, remove wake logic in mt76u_status_worker
> handler
Starting from commit '90d494c99a99fa2eb858754345c4a9c851b409a0
("mt76: improve tx queue stop/wake")', the wake queue logic on
the usb status path is no longer necessary since the hw queues
are no longer stopped on the mt76 tx path.
Regards,
Lorenzo
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/wireless/mediatek/mt76/usb.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
> index 81393788f98e..658b36a2281d 100644
> --- a/drivers/net/wireless/mediatek/mt76/usb.c
> +++ b/drivers/net/wireless/mediatek/mt76/usb.c
> @@ -811,7 +811,6 @@ static void mt76u_status_worker(struct mt76_worker *w)
> struct mt76_dev *dev = container_of(usb, struct mt76_dev, usb);
> struct mt76_queue_entry entry;
> struct mt76_queue *q;
> - bool wake;
> int i;
>
> for (i = 0; i < IEEE80211_NUM_ACS; i++) {
> @@ -827,10 +826,6 @@ static void mt76u_status_worker(struct mt76_worker *w)
> mt76_queue_tx_complete(dev, q, &entry);
> }
>
> - wake = q->stopped && q->queued < q->ndesc - 8;
> - if (wake)
> - q->stopped = false;
> -
> if (!q->queued)
> wake_up(&dev->tx_wait);
>
> @@ -839,8 +834,6 @@ static void mt76u_status_worker(struct mt76_worker *w)
> if (dev->drv->tx_status_data &&
> !test_and_set_bit(MT76_READING_STATS, &dev->phy.state))
> queue_work(dev->wq, &dev->usb.stat_work);
> - if (wake)
> - ieee80211_wake_queue(dev->hw, i);
> }
> }
>
> --
> 2.28.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker
2020-12-17 19:10 ` Lorenzo Bianconi
@ 2020-12-18 5:26 ` Kalle Valo
0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2020-12-18 5:26 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, linux-wireless
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>> Similar to mmio code path, remove wake logic in mt76u_status_worker
>> handler
>
> Starting from commit '90d494c99a99fa2eb858754345c4a9c851b409a0
> ("mt76: improve tx queue stop/wake")', the wake queue logic on
> the usb status path is no longer necessary since the hw queues
> are no longer stopped on the mt76 tx path.
Thanks, I'll update the commit logs based on the info you provided.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [1/2] mt76: usb: remove wake logic in mt76u_status_worker
2020-12-05 10:35 ` [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker Lorenzo Bianconi
2020-12-17 19:10 ` Lorenzo Bianconi
@ 2020-12-20 12:04 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2020-12-20 12:04 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless
Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> Similar to mmio code path, remove wake logic in mt76u_status_worker handler.
> Starting from commit 90d494c99a99 ("mt76: improve tx queue stop/wake")', the
> wake queue logic on the usb status path is no longer necessary since the hw
> queues are no longer stopped on the mt76 tx path.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
2 patches applied to wireless-drivers.git, thanks.
e16ab3db87b3 mt76: usb: remove wake logic in mt76u_status_worker
123bb2b73788 mt76: sdio: remove wake logic in mt76s_process_tx_queue
--
https://patchwork.kernel.org/project/linux-wireless/patch/00009bf0cfdc9565e4432cad3ed51888c667c25d.1607164041.git.lorenzo@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-20 12:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 10:35 [PATCH 0/2] remove wake queue tx logic for usb/sdio Lorenzo Bianconi
2020-12-05 10:35 ` [PATCH 1/2] mt76: usb: remove wake logic in mt76u_status_worker Lorenzo Bianconi
2020-12-17 19:10 ` Lorenzo Bianconi
2020-12-18 5:26 ` Kalle Valo
2020-12-20 12:04 ` [1/2] " Kalle Valo
2020-12-05 10:35 ` [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue Lorenzo Bianconi
2020-12-17 19:07 ` Lorenzo Bianconi
2020-12-17 12:03 ` [PATCH 0/2] remove wake queue tx logic for usb/sdio Lorenzo Bianconi
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).