Skip to content

[DRAFT] wifi: mt76: mt7925: MT7927 txpower and scan retry fixes#1089

Draft
Komzpa wants to merge 2 commits into
openwrt:masterfrom
Komzpa:mt7927-wifi-bt-fixes
Draft

[DRAFT] wifi: mt76: mt7925: MT7927 txpower and scan retry fixes#1089
Komzpa wants to merge 2 commits into
openwrt:masterfrom
Komzpa:mt7927-wifi-bt-fixes

Conversation

@Komzpa

@Komzpa Komzpa commented Jun 7, 2026

Copy link
Copy Markdown

Draft only / not for merge yet. This branch mirrors the MT7927 packet for maintainer-visible GitHub review before any canonical linux-wireless submission.

DCO state: these commits intentionally do not carry Signed-off-by yet. Darafei must review and certify DCO before this can become a ready-for-merge PR or an email submission.

Attribution: draft commits carry Assisted-by: OpenAI-Codex:gpt-5.

Scope in this standalone mt76 branch:

  • Report configured/current TX power instead of transient 0 dBm before BSS txpower exists.
  • Retry MT7927 2.4 GHz scans when firmware reports scan-done with complete_channel_num == 0 during Bluetooth Inquiry.
  • DBDC is not included here because this openwrt/mt76 branch already enables MT7927 DBDC in mt7925 init/USB paths.

Local live evidence from the DKMS build installed on nucat:

  • Loaded mt7925e module from /lib/modules/7.1-amd64/updates/dkms/mt7925e.ko.xz.
  • iw dev wlp8s0 info reported txpower 23.00 dBm.
  • Active BlueZ discovery reached Discovering: yes.
  • Directed 2.4 GHz scan during discovery returned rc=0 and BSS_COUNT=2.

Checks on this GitHub branch:

  • git diff --check HEAD~2..HEAD: clean.
  • git mailinfo parses the generated patch stream.
  • External module build against local 7.1-amd64 headers does not reach mt7925-specific compilation: standalone mt76 currently stops earlier in tx.c because ieee80211_txq_aql_pending is unavailable in the local header set.

Open question for the scan retry: maintainer feedback is requested on whether host-side delayed retry is acceptable, or whether this should become a firmware/coexistence-state fix instead.

Canonical submission note: Linux wireless still normally wants the DCO-reviewed email series routed through the mt76/wireless maintainers and lists; this draft PR is a staging artifact, not a substitute for that.

Komzpa added 2 commits June 8, 2026 00:16
mt76_get_txpower() reports phy->txpower_cur. mt7925 updates firmware rate power limits, but txpower_cur can remain unset before a later BSS txpower change. That makes userspace observe 0 dBm even when the device has a valid configured/channel power limit.

Track whether mac80211 has provided BSS txpower and use it once available. Before that, derive txpower_cur from the configured hw power level, falling back to the current channel max power when the configured level is unset.

This keeps TX power reporting grounded before association/BSS setup without changing the scan path.

Assisted-by: OpenAI-Codex:gpt-5
On MT7927/MT6639 the firmware can report a successful scan-done event with complete_channel_num == 0 while Bluetooth BR/EDR Inquiry is active. The host scan path then completes normally and userspace observes a successful 2.4 GHz scan with no BSS entries, even though the same networks are visible before and after the Inquiry window.

Keep the mac80211 scan pending for this MT7927 case and retry the firmware scan a small number of times after a delay. Limit the workaround to scan requests that include 2.4 GHz channels, since the observed failure is tied to Bluetooth Inquiry coexistence on the 2.4 GHz path. If the retry can be submitted, the original scan completes from the later scan-done event. If retry submission fails or the retry budget is exhausted, complete the scan through the normal path instead of looping indefinitely.

Cancel, suspend, and unregister paths abort or cancel the saved scan state so a delayed retry cannot outlive the mac80211 scan and device it belongs to.

Assisted-by: OpenAI-Codex:gpt-5
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