Troubleshooting mt7612 authentication errors#22
Conversation
Change the BSSID index mask from 7 to 0xf in mt76x02_mac_set_bssid() to properly support all 16 hardware BSSID slots (0-15). The hardware is configured for "8 APs + 8 STAs" mode where: - Indices 0-7 are used for AP mode - Indices 8-15 are used for client (STA) mode The previous mask of 7 (0b0111) was truncating client mode indices 8-15 back to 0-7, causing client interfaces to write their BSSID to the wrong hardware register. This resulted in the hardware not recognizing the AP's BSSID during authentication, leading to authentication timeouts. Fixes authentication timeout issue when mt7612/mt7662 operates in client mode.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4173587c1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| void mt76x02_mac_set_bssid(struct mt76x02_dev *dev, u8 idx, const u8 *addr) | ||
| { | ||
| idx &= 7; | ||
| idx &= 0xf; |
There was a problem hiding this comment.
Avoid addressing non-BSSID registers for high slots
When mt76x02_mac_setaddr() clears i = 0..15, this wider mask lets i = 14 and i = 15 reach the APC BSSID address macro instead of wrapping to the eight defined slots. With MT_MAC_APC_BSSID_BASE at 0x1090 and an 8-byte stride, slot 14 writes 0x1100 (MT_XIFS_TIME_CFG) and slot 15 updates 0x110c (MT_CH_TIME_CFG), so any device init or first-interface MAC reset can zero timing/channel-counter registers rather than only BSSID storage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR attempts to address mt7612 authentication issues by changing how mt76x02_mac_set_bssid() constrains the BSSID index before programming the MT_MAC_APC_BSSID_* register block.
Changes:
- Expand the BSSID index mask from
idx &= 7toidx &= 0xfinmt76x02_mac_set_bssid().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| void mt76x02_mac_set_bssid(struct mt76x02_dev *dev, u8 idx, const u8 *addr) | ||
| { | ||
| idx &= 7; | ||
| idx &= 0xf; |
Pull request created by AI Agent