Skip to content

wifi: mt76: mt7925: track valid BSS txpower#83

Open
Komzpa wants to merge 1 commit into
jetm:masterfrom
Komzpa:fix-mt7927-bt-2g-txpower
Open

wifi: mt76: mt7925: track valid BSS txpower#83
Komzpa wants to merge 1 commit into
jetm:masterfrom
Komzpa:fix-mt7927-bt-2g-txpower

Conversation

@Komzpa
Copy link
Copy Markdown

@Komzpa Komzpa commented Jun 6, 2026

Summary

Add one follow-up Wi-Fi patch for mt7925 TX power reporting before mac80211 has delivered BSS_CHANGED_TXPOWER.

Current patch 18 stores per-BSS TX power in dev->phy.txpower, but there is no validity state for that field. Before the first BSS_CHANGED_TXPOWER event, dev->phy.txpower is just the zero-initialized value. mt7925_mcu_set_rate_txpower() treats that zero as configured power, feeds it into mt76_get_power_bound(), and userspace reports txpower 0.00 dBm after reload/disconnected state.

This patch tracks whether BSS TX power has actually been received:

  1. add txpower_set next to txpower;
  2. set it when handling BSS_CHANGED_TXPOWER;
  3. use dev->phy.txpower only when txpower_set is true, so a legitimate configured 0 dBm remains valid;
  4. before BSS TX power is known, fall back to hw->conf.power_level, then current channel regulatory max power;
  5. continue through mt76_get_power_bound() and mt76_get_rate_power_limits().

Verification

  • patch --dry-run --fuzz=0 passes against the generated mt76 tree after patches 1-19.
  • make sources passes on this branch.
  • Generated source contains the expected txpower_set guard and channel max fallback.
  • Live nucat evidence from the fuller test branch: after DKMS install and module reload without reboot, iw dev wlp8s0 info changed from txpower 0.00 dBm to txpower 23.00 dBm.

Scope and routing

This PR is intentionally minimized to the DKMS/backport txpower reporting fix only. It does not claim to fix Bluetooth/Wi-Fi coexistence and does not include the separate Linux 7.1 ieee80211_mgmt.u.action build-compat patch.

This is not a Linux wireless upstream submission as-is: current wireless-next does not have this repo's patch-18 dev->phy.txpower path, so a real upstream submission would need a separate mt76 patch/series against wireless or wireless-next and should be sent via git send-email to linux-wireless rather than as this GitHub patch-file PR.

@Komzpa Komzpa force-pushed the fix-mt7927-bt-2g-txpower branch from b76f5bf to c9e6f08 Compare June 6, 2026 19:04
@Komzpa Komzpa changed the title wifi: mt76: fix mt7925 txpower reporting on Linux 7.1 wifi: mt76: mt7925: fix txpower before BSS update Jun 6, 2026
@Komzpa Komzpa force-pushed the fix-mt7927-bt-2g-txpower branch from c9e6f08 to cc5dcd3 Compare June 6, 2026 19:11
@Komzpa Komzpa changed the title wifi: mt76: mt7925: fix txpower before BSS update wifi: mt76: mt7925: track valid BSS txpower Jun 6, 2026
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