openwrt / openwrt/mt76

FCC test mode for MT7921

Open
#984 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
888
Forks
436
PR merge metrics
No merged PRs in 30d

Description

Hello, we need to go through FCC testing with our Linux-based product using MT7921. We have essentially the same needs as the poster in #781. I thought the mt76-test tool provided in this repo would help us, but I have been unable to get it working.

I recompiled/reinstalled our kernel enabling cfg80211 testmode support and built the mt76-test binary successfully, and managed to confirm that commands are successfully reaching the driver's mt7921_testmode_cmd/dump functions. However, mt76-test phy0 dump outputs nothing and mt76-test phy0 set state=idle (or any other valid state) outputs nl80211 call failed: Invalid argument.

For the set subcommand, I've found that it fails at this check in the driver, skipping to the end to return -EINVAL;.

Looking more into the drivers, it seems that the mt76-test is written more for the mt7615/7915 drivers, which instead use the top level mt76_testmode_cmd/dump handlers, which handle many more commands, while it looks like the MT7921 driver's test mode is just expecting commands to forward directly to the adapter's firmware (I may be wrong - this is unfamiliar territory for me!).

Assuming my understanding is correct, I have two questions:

  • Is it feasible to change the mt7921 driver to use the mt76_testmode_cmd/dump handlers? I tried to do this, but it requires a filled in mt76_testmode_ops struct, which looks from the other drivers to requires a fair bit of implementation. Is there any hope in copying one of the other driver's implementations to hack this into working?
  • If the only option is to go the route of sending commands directly to the firmware, could someone please point me toward documentation on these commands? I have looked around the web but can't find any documentation on the mt7921 chip except for a very barebones product brief

Thank you for any possible help!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mt7921/testmode.c and the mt76-test tool, then compare the mt7921_testmode_cmd/dump handlers with the top-level mt76_testmode_cmd/dump handlers used by other drivers. The issue is resolved when the feasible implementation path for MT7921 FCC testing is established, including either supported test-mode commands or available firmware-command documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
networking, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.