Skip to content

mt76: mt7996: fix station tx rate reported to mac80211 - #1328

Open
hehuimin-cybertan wants to merge 1 commit into
mainfrom
staging-WIFI-15762-RAP736C-2.4G-performance-is-relatively-low
Open

hehuimin-cybertan wants to merge 1 commit into
mainfrom
staging-WIFI-15762-RAP736C-2.4G-performance-is-relatively-low

Conversation

@hehuimin-cybertan

Copy link
Copy Markdown
Contributor

wcid->rate is taken from the last TXS and passed to mac80211 with every tx status. Only frames that request a tx status get a TXS, and most of those (mgmt, EAPOL, nullfunc) are sent at the fixed basic rate, so on 2.4 GHz wcid->rate often becomes OFDM 6 Mbps for an HE station.

mac80211 stores it in last_rate_info and uses it to estimate the airtime of every queued frame for AQL. With a legacy rate the estimate is the full non-aggregated 6 Mbps airtime, so AQL allows only a few frames in flight and downlink TCP drops from ~200 Mbps to ~50-80 Mbps until a data frame TXS happens to restore an HE rate.

  • Skip legacy-rate TXS when updating the rate of an HT/HE/EHT station.
  • Take the whole TX rate (mode, bw, mcs, nss, gi) from the periodic UNI_ALL_STA_TXRX_RATE firmware report instead of only the GI, so wcid->rate follows the firmware rate control. The rate conversion is taken from mt7996_mcu_update_rate() in the MediaTek SDK patch "mtk: mt76: rework statistics report for mt7996" (0044), TX part only, with HE MCS limited to 11 as in the TXS path.

Fixes: WIFI-15762

wcid->rate is taken from the last TXS and passed to mac80211 with every
tx status. Only frames that request a tx status get a TXS, and most of
those (mgmt, EAPOL, nullfunc) are sent at the fixed basic rate, so on
2.4 GHz wcid->rate often becomes OFDM 6 Mbps for an HE station.

mac80211 stores it in last_rate_info and uses it to estimate the airtime
of every queued frame for AQL. With a legacy rate the estimate is the
full non-aggregated 6 Mbps airtime, so AQL allows only a few frames in
flight and downlink TCP drops from ~200 Mbps to ~50-80 Mbps until a
data frame TXS happens to restore an HE rate.

- Skip legacy-rate TXS when updating the rate of an HT/HE/EHT station.
- Take the whole TX rate (mode, bw, mcs, nss, gi) from the periodic
  UNI_ALL_STA_TXRX_RATE firmware report instead of only the GI, so
  wcid->rate follows the firmware rate control. The rate conversion is
  taken from mt7996_mcu_update_rate() in the MediaTek SDK patch
  "mtk: mt76: rework statistics report for mt7996" (0044), TX part
  only, with HE MCS limited to 11 as in the TXS path.

Fixes: WIFI-15762
Signed-off-by: huimin.he <huimin.he@cybertan.com.tw>
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ PR & Commit Guidelines — all checks passed

Commits, PR description, C style, and milestone all look good. Thanks!

Commit hygiene

No issues found.

C style

No issues found.

PR description (ticket link)

No issues found.

Milestone

No issues found.

See OPENWIFI_PR_GUIDELINES.md and OPENWIFI_CODING_GUIDELINES.md. Items marked ⚠️ are advisory and do not fail the check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant