[PATCH v2] mac80211: reject/clear user rate mask if not usable

Johannes Berg johannes at sipsolutions.net
Fri Nov 13 03:35:57 EST 2020


On Fri, 2020-11-13 at 16:35 +0800, Wen Gong wrote:
> 
> > I guess if we really want to redefine the user rate mask to not apply 
> > to
> > control frames, then we can relax this?
> > 
> Yes, for AP mode, it is hard to calculate the usable rates over all 
> stations.
> But for STATION mode, it can set 54M because AP support it, so it should 
> not reject it.
> If add a check for nl80211_iftype of ieee80211_vif in 
> ieee80211_set_bitrate_mask, it can
> solve this like this:
> if (sdata->vif.type != NL80211_IFTYPE_STATION && 
> !(mask->control[band].legacy & basic_rates))


That would forgo the check completely - we'd still need to check against
the *supported* rates.

johannes




More information about the ath11k mailing list