openwrt / openwrt/mt76

mt7612e fails to receive packets if the bssid is changed

Open
#233 3 comments 3 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

I've been working on tracking down a bug in the mt76 driver, and I think I've gotten about as far as I can without a datasheet/PRM. There are enough registers with similar names that I can't guess at their intended behavior.

My big-picture goal is to support 3 SSIDs, with a mixture of WPA-PSK and WPA-EAP, but I'm blocked by a problem with only a single SSID.

The nic I'm testing with is an mt7612e with a mac address of fa:62:aa:50:15:2d. If I run hostapd with a single SSID, I can successfully connect to this nic.

To support multiple SSIDs, I need to set the bssid to fa:62:aa:50:15:2c. If I change my hostapd.conf to use that bssid with only a single SSID, I can no longer connect to that SSID. The client is reporting timeouts waiting for auth responses. Using a wireless monitor, I can see that the packets are being sent from the client correctly. If I instrument the mt76 driver stack, I can see that the client's probe packets are being received, but not the auth packets.

If I modify mt76x02_add_interface() to call mt76x02_mac_setaddr() when the new address doesn't match the built-in address, then the driver will receive and process the auth packets, and the client will connect successfully.

If a try to start a 2-SSID hostap instance with that change in place, clients can connect only to the first SSID - the second SSID's packets don't show up in the receive queue.

My theory (with no documentation to look at) is that the driver needs to set a register with either the number of bssids or a mask.

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 by reproducing the single-SSID BSSID change with hostapd and an mt7612e, then inspect mt76x02_add_interface() and the mt76x02_mac_setaddr() behavior. Compare receive handling for one and two SSIDs, and use the observed register behavior to determine what is needed for authentication packets from changed and additional BSSIDs to reach the receive queue.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
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.