Commit e890c3cf authored by Peter Chiu's avatar Peter Chiu Committed by Felix Fietkau

wifi: mt76: report non-binding skb tx rate when WED is active

AQL relies on accurate tx rate reporting, so add this patch for
non-binding skb rate when WED is enabled.
Co-developed-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarPeter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent f39d4993
...@@ -270,8 +270,15 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff * ...@@ -270,8 +270,15 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
#endif #endif
if (cb->pktid < MT_PACKET_ID_FIRST) { if (cb->pktid < MT_PACKET_ID_FIRST) {
struct ieee80211_rate_status rs = {};
hw = mt76_tx_status_get_hw(dev, skb); hw = mt76_tx_status_get_hw(dev, skb);
status.sta = wcid_to_sta(wcid); status.sta = wcid_to_sta(wcid);
if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
rs.rate_idx = wcid->rate;
status.rates = &rs;
status.n_rates = 1;
}
spin_lock_bh(&dev->rx_lock); spin_lock_bh(&dev->rx_lock);
ieee80211_tx_status_ext(hw, &status); ieee80211_tx_status_ext(hw, &status);
spin_unlock_bh(&dev->rx_lock); spin_unlock_bh(&dev->rx_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment