wifi: mt76: fix rate reporting / throughput regression on mt7915 and newer
Subsystems (2)
Felix Fietkau
maintainerPATCH 1/1 wifi: mt76: fix rate reporting / throughput regression on mt7915 and newer
mt7915 and newer need to report the rate_info that's stored in wcid->rate, since they don't fill info->status.rates.
Cc Jonas Jelonek <[email protected]>
Reported-by Mikhail Gavrilov <[email protected]>
Link https://lore.kernel.org/all/CABXGCsP0znm9pS-MiKtyxTXR7XiyFVqen0qzNpicGHDZKCzbwg@mail.gmail.com/ open here
Fixes 44fa75f207d8 ("mac80211: extend current rate control tx status API")
Signed-off-by Felix Fietkau <[email protected]>
--- drivers/net/wireless/mediatek/mt76/tx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/tx.c +8 -2
@@ -60,14 +60,20 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list) .skb = skb, .info = IEEE80211_SKB_CB(skb), }; +struct ieee80211_rate_status rs = {};struct mt76_tx_cb *cb =mt76_tx_skb_cb (skb);struct mt76_wcid *wcid; wcid =rcu_dereference (dev->wcid[cb->wcid]);if (wcid) { status.sta =wcid_to_sta (wcid); - status.rates =NULL ; - status.n_rates =0 ; +if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) { + rs.rate_idx = wcid->rate; + status.rates = &rs; + status.n_rates =1 ; + }else { + status.n_rates =0 ; + } } hw =mt76_tx_status_get_hw (dev, skb);
Signature · 1 line
2.36.1
Quoted 41 lines · Felix Fietkau
mt7915 and newer need to report the
rate_infothat's stored inwcid->rate, since they don't fillinfo->status.rates.Cc Jonas Jelonek <[email protected]>Reported-by Mikhail Gavrilov <[email protected]>Link https://lore.kernel.org/all/CABXGCsP0znm9pS-MiKtyxTXR7XiyFVqen0qzNpicGHDZKCzbwg@mail.gmail.com/ open hereFixes 44fa75f207d8 ("mac80211: extend current rate control tx status API")Signed-off-by Felix Fietkau <[email protected]>--- drivers/net/wireless/mediatek/mt76/tx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/net/wireless/mediatek/mt76/tx.c +8
-3@@ -60,14 +60,20 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list) .skb = skb, .info = IEEE80211_SKB_CB(skb), }; +struct ieee80211_rate_status rs = {};struct mt76_tx_cb *cb =mt76_tx_skb_cb (skb);struct mt76_wcid *wcid; wcid =rcu_dereference (dev->wcid[cb->wcid]);if (wcid) { status.sta =wcid_to_sta (wcid); - status.rates =NULL ; - status.n_rates =0 ; +if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) { + rs.rate_idx = wcid->rate; + status.rates = &rs; + status.n_rates =1 ; + }else { + status.n_rates =0 ; + } } hw =mt76_tx_status_get_hw (dev, skb); --
Quoted 2 lines
2.36.1
Thanks, the issue is solved.
Tested-by Mikhail Gavrilov <[email protected]>
Signature · 2 lines
Best Regards, Mike Gavrilov.
Quoted 9 lines · Felix Fietkau
mt7915 and newer need to report the
rate_infothat's stored inwcid->rate, since they don't fillinfo->status.rates.Cc Jonas Jelonek <[email protected]>Reported-by Mikhail Gavrilov <[email protected]>Link https://lore.kernel.org/all/CABXGCsP0znm9pS-MiKtyxTXR7XiyFVqen0qzNpicGHDZKCzbwg@mail.gmail.com/ open hereFixes 44fa75f207d8 ("mac80211: extend current rate control tx status API")Signed-off-by Felix Fietkau <[email protected]>Tested-by Mikhail Gavrilov <[email protected]>
Patch applied to wireless.git, thanks.
6b430f72b2bc wifi: mt76: fix rate reporting / throughput regression on mt7915 and newer
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches