Skip to content

wifi: mt76: mt7925: configure group header translation on each link - #680

Open
maizensh wants to merge 1 commit into
NVIDIA:26.04_linux-nvidiafrom
maizensh:dev/maizenstein/mt7925_header_translation
Open

maizensh wants to merge 1 commit into
NVIDIA:26.04_linux-nvidiafrom
maizensh:dev/maizenstein/mt7925_header_translation

Conversation

@maizensh

@maizensh maizensh commented Oct 31, 2026 •

Copy link
Copy Markdown

Secondary-link group frames arrive as translated Ethernet frames with no peer station and are rejected by mac80211. The NULL-peer station update configures only the default broadcast WCID, leaving secondary entries at firmware defaults.

After each successful station link BSS update, configure that link's broadcast WCID to retain 802.11 headers for station lookup. Expose command-success and error counters. Request device reset recovery on allocation, missing-WCID or MCU programming failures, covering station callbacks that discard the helper's return value.

LP: https://bugs.launchpad.net/bugs/2172838

@nirmoy nirmoy added the help wanted Extra attention is needed label Oct 31, 2026
@nirmoy

nirmoy commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Tip

✅ Review passed

No issues found across the reviewed commits.

Findings: none

🔍 Review artifacts

📦 Build checks — 🔴 2/4 passed

Note

Build reports and debs are retained for 10 days after the PR closes.

  • 🔴 PR Illustrated: failed — Published explanation could not be verified.
Review metadata
  • Reviewed head: 78f6a5ac7107
  • Overall status: build partially successful
  • Build checks: 2/4 passed

This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ⚠️ Warnings

Details
Checking 1 commits...

Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 78f6a5ac7107 │ [SAUCE] wifi: mt76: mt7925: configure group header translation o │ N/A        │ N/A     │ maizenst                  │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

PR metadata:
W: PR title missing [<branch>] prefix: "wifi: mt76: mt7925: configure group header translation on each link"

@clsotog

clsotog commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Are there plans to upstream this patch?

@maizensh

maizensh commented Nov 2, 2026 •

Copy link
Copy Markdown
Author

Reply to Boro review.

On mt7925 the WM/WA flags don't change routing: mt7925_mcu_fill_message() sets s2d_index = MCU_S2D_H2N for every UNI command (mcu.c:3574) and only reads __MCU_CMD_FIELD_WA on the legacy non-UNI path (mcu.c:3617); PCIe always
uses MT_MCUQ_WM and USB always uses MT_EP_OUT_INBAND_CMD. MCU_UNI_CMD and MCU_WMWA_UNI_CMD therefore produce the same command on the wire. The main station path, mt7925_mcu_sta_update() (mcu.c:2046), which already programs the default broadcast WCID's header translation, uses MCU_UNI_CMD as this patch does. Switching to MCU_WMWA_UNI_CMD would make things worse: mt7925_mcu_parse_response() matches cmd == MCU_UNI_CMD(STA_REC_UPDATE) exactly (mcu.c:53-57), so with the WMWA variant the firmware status is never checked and success would be recorded unconditionally.

@maizensh

maizensh commented Nov 2, 2026

Copy link
Copy Markdown
Author

Are there plans to upstream this patch?

Yes. Though I don't know if by me.

@nirmoy

nirmoy commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Please add this Launchpad link to the PR description:

LP: https://bugs.launchpad.net/bugs/2172838

@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator

I see little reason to carry this as SAUCE without getting MediaTek's
feedback first. Please post it to linux-wireless (Cc the mt76 maintainers
and MediaTek) before it is considered here.

Some review findings on the current version:

  • mt792x_reset() on any failure is a new recovery policy. MCU timeouts
    already reset in mt7925_mcu_parse_response(); adding it for -ENOMEM, a
    missing link, or a firmware status error means a firmware that consistently
    rejects this command resets the device on every MLO association. Returning
    the error, as mt7925_mcu_add_bss_info() and mt7925_mcu_sta_update() do
    today, would be more conventional.
  • The bmc_hdr_programmed/bmc_hdr_errors module parameters are global
    (not per-device) debug counters and are placed between the #includes.
    Please drop them, or use debugfs if they are needed.
  • The commit message describes tests and live captures that are not part
    of the change.

On the Boro finding: agree with the analysis above; MCU_UNI_CMD is
correct here and the finding is a false positive.

@maizensh
maizensh force-pushed the dev/maizenstein/mt7925_header_translation branch from 84658f0 to 6e67de8 Compare November 4, 2026 02:02
@maizensh

maizensh commented Nov 4, 2026

Copy link
Copy Markdown
Author

Cleaned up the change (second and third bullets).
Replaced the extra reset with error return, though for this I started testing again as this is somewhat different behavior, so need to see if it holds.

@maizensh
maizensh force-pushed the dev/maizenstein/mt7925_header_translation branch from 6e67de8 to 6b148d6 Compare November 4, 2026 02:39
@maizensh

maizensh commented Nov 4, 2026

Copy link
Copy Markdown
Author

Also, wondering, should I add dev_warn if hdr_trans fails?

@maizensh

maizensh commented Nov 6, 2026

Copy link
Copy Markdown
Author

After running for a couple of days, the new change seems stable and works. I also have a local dev_warn if hdr_trans returns non zero, and nothing was printed in this time.

… on each link

Secondary-link group frames arrive as translated Ethernet frames with
no peer station and are rejected by mac80211. The NULL-peer station
update configures only the default broadcast WCID, leaving secondary
entries at firmware defaults.

After each successful station link BSS update, configure that link's
broadcast WCID to retain 802.11 headers for station lookup.

Signed-off-by: Max Eisenstein <[email protected]>
@maizensh
maizensh force-pushed the dev/maizenstein/mt7925_header_translation branch from 6b148d6 to 78f6a5a Compare November 17, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed pending_review_comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants