diff mbox series

[1/2] mt76: usb: remove wake logic in mt76u_status_worker

Message ID 00009bf0cfdc9565e4432cad3ed51888c667c25d.1607164041.git.lorenzo@kernel.org (mailing list archive)
State Accepted
Commit e16ab3db87b3d5d4118dfb68e955f62c4e09573a
Delegated to: Kalle Valo
Headers show
Series remove wake queue tx logic for usb/sdio | expand

Commit Message

Lorenzo Bianconi Dec. 5, 2020, 10:35 a.m. UTC
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(-)

Comments

Lorenzo Bianconi Dec. 17, 2020, 7:10 p.m. UTC | #1
> 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
>
Kalle Valo Dec. 18, 2020, 5:26 a.m. UTC | #2
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.
Kalle Valo Dec. 20, 2020, 12:04 p.m. UTC | #3
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
diff mbox series

Patch

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);
 	}
 }