linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net,
	rwbugreport@lost-in-the-void.net, ryder.lee@mediatek.com
Subject: Re: [PATCH 5.16] mac80211: fix rate control for retransmitted frames
Date: Mon, 22 Nov 2021 23:04:15 +0200	[thread overview]
Message-ID: <20211122210415.GB576751@darkstar.musicnaut.iki.fi> (raw)
In-Reply-To: <20211122204323.9787-1-nbd@nbd.name>

Hi,

On Mon, Nov 22, 2021 at 09:43:23PM +0100, Felix Fietkau wrote:
> Since retransmission clears info->control, rate control needs to be called
> again, otherwise the driver might crash due to invalid rates.
> 
> Cc: stable@vger.kernel.org # 5.14+
> Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> Reported-by: Robert W <rwbugreport@lost-in-the-void.net>
> Fixes: 03c3911d2d67 ("mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue")
> Signed-off-by: Felix Fietkau <nbd@nbd.name>

Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>

A.

> ---
>  net/mac80211/tx.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 278945e3e08a..e19f6e246642 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1822,15 +1822,15 @@ static int invoke_tx_handlers_late(struct ieee80211_tx_data *tx)
>  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
>  	ieee80211_tx_result res = TX_CONTINUE;
>  
> +	if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
> +		CALL_TXH(ieee80211_tx_h_rate_ctrl);
> +
>  	if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION)) {
>  		__skb_queue_tail(&tx->skbs, tx->skb);
>  		tx->skb = NULL;
>  		goto txh_done;
>  	}
>  
> -	if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
> -		CALL_TXH(ieee80211_tx_h_rate_ctrl);
> -
>  	CALL_TXH(ieee80211_tx_h_michael_mic_add);
>  	CALL_TXH(ieee80211_tx_h_sequence);
>  	CALL_TXH(ieee80211_tx_h_fragment);
> -- 
> 2.30.1
> 

  reply	other threads:[~2021-11-22 21:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 20:43 Felix Fietkau
2021-11-22 21:04 ` Aaro Koskinen [this message]
2021-11-23 14:36 ` Thorsten Leemhuis
2021-12-12 11:45 ` Thorsten Leemhuis
2021-12-13  9:21   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211122210415.GB576751@darkstar.musicnaut.iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=rwbugreport@lost-in-the-void.net \
    --cc=ryder.lee@mediatek.com \
    --subject='Re: [PATCH 5.16] mac80211: fix rate control for retransmitted frames' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).