mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: limit work in set_bitrate_mask
Calls to mt7996_set_bitrate_mask() would propagate work for all stations
on the ieee80211_hw regardless of the vif specified in the call. To
prevent unnecessary work in FW, limit setting the sta_rate to only the
specified vif in mt7996_sta_rate_ctrl_update().
Fixes: afff4325548f0 ("wifi: mt76: mt7996: Use proper link_id in link_sta_rc_update callback")
Signed-off-by: Dylan Eskew <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
c0e41eb57d
commit
e640565e07
+6
-3
@@ -1960,7 +1960,11 @@ static void mt7996_sta_rate_ctrl_update(void *data, struct ieee80211_sta *sta)
|
||||
{
|
||||
struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
|
||||
struct mt7996_sta_link *msta_link;
|
||||
u32 *changed = data;
|
||||
struct mt7996_vif *mvif = data;
|
||||
u32 changed = IEEE80211_RC_SUPP_RATES_CHANGED;
|
||||
|
||||
if (msta->vif != mvif)
|
||||
return;
|
||||
|
||||
msta_link = mt7996_sta_link(msta, msta->deflink_id);
|
||||
if (msta_link)
|
||||
@@ -1973,7 +1977,6 @@ mt7996_set_bitrate_mask(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
{
|
||||
struct mt7996_dev *dev = mt7996_hw_dev(hw);
|
||||
struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
|
||||
u32 changed = IEEE80211_RC_SUPP_RATES_CHANGED;
|
||||
|
||||
mvif->deflink.bitrate_mask = *mask;
|
||||
|
||||
@@ -1986,7 +1989,7 @@ mt7996_set_bitrate_mask(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
* then multiple MCS setting (MCS 4,5,6) is not supported.
|
||||
*/
|
||||
ieee80211_iterate_stations_atomic(hw, mt7996_sta_rate_ctrl_update,
|
||||
&changed);
|
||||
mvif);
|
||||
ieee80211_queue_work(hw, &dev->rc_work);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user