Search Linux Wireless

Re: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-05-18 13:07, Philipp Borgers wrote:
> Data Frames with no ack flag set should be handle by the rate controler.
> Make sure we reach the rate controler by returning early from
> rate_control_send_low if the frame is a data frame with no ack flag.
> 
> Signed-off-by: Philipp Borgers <borgers@xxxxxxxxxxxxxxx>
> ---
>  net/mac80211/rate.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
> index 63652c39c8e0..4f5b35a0ea28 100644
> --- a/net/mac80211/rate.c
> +++ b/net/mac80211/rate.c
> @@ -391,11 +391,16 @@ static bool rate_control_send_low(struct ieee80211_sta *pubsta,
>  				  struct ieee80211_tx_rate_control *txrc)
>  {
>  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb);
> +	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) txrc->skb->data;
>  	struct ieee80211_supported_band *sband = txrc->sband;
>  	struct sta_info *sta;
>  	int mcast_rate;
>  	bool use_basicrate = false;
>  
> +	if (ieee80211_is_data(hdr->frame_control) &&
> +			(info->flags & IEEE80211_TX_CTL_NO_ACK))
> +		return false;
Frames with IEEE80211_TX_CTL_HW_80211_ENCAP set have no 802.11 header,
so please change the check something like this:

	if ((info->flags & IEEE80211_TX_CTL_NO_ACK) &&
	    ((info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) ||
	     ieee80211_is_data(hdr->frame_control)))

Same applies to the other patch.
There are other places in the code where this kind of change needs to be
done, but it would be good if at least newly added code handles it properly.

- Felix



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux