2020-12-05 10:40:30

by Lorenzo Bianconi

[permalink] [raw]
Subject: [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue

Similar to mmio/usb code path, remove wake logic in mt76s_process_tx_queue
routine

Signed-off-by: Lorenzo Bianconi <[email protected]>
---
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


2020-12-17 19:10:01

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: [PATCH 2/2] mt76: sdio: remove wake logic in mt76s_process_tx_queue

> 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 <[email protected]>
> ---
> 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
>


Attachments:
(No filename) (1.63 kB)
signature.asc (235.00 B)
Download all attachments