[PATCH v4] wifi: mac80211: introduce EHT rate support in AQL airtime

Johannes Berg johannes at sipsolutions.net
Wed Sep 4 02:29:55 PDT 2024


On Wed, 2024-09-04 at 17:17 +0800, Mingyen Hsieh wrote:
> 
> @@ -443,13 +549,18 @@ static u32 ieee80211_get_rate_duration(struct ieee80211_hw *hw,
>  		idx = status->rate_idx;
>  		group = HE_GROUP_IDX(streams, status->he_gi, bw);
>  		break;
> +	case RX_ENC_EHT:
> +		streams = status->nss;
> +		idx = status->rate_idx;
> +		group = EHT_GROUP_IDX(streams, status->eht.gi, bw);
> +		break;
>  	default:
>  		WARN_ON_ONCE(1);
>  		return 0;
>  	}
>  
> -	if (WARN_ON_ONCE((status->encoding != RX_ENC_HE && streams > 4) ||
> -			 (status->encoding == RX_ENC_HE && streams > 8)))
> +	if (WARN_ON_ONCE((status->encoding > RX_ENC_HE && streams > 8) ||

That should've been >=, but I feel like it might be better to move the
warning as multiple warnings into the switch statement now? The > and <
here also makes it vulnerable to reordering, which is probably not going
to happen, but why put the trap here?

johannes



More information about the Linux-mediatek mailing list