Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mt76x02_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ EXPORT_SYMBOL_GPL(mt76x02_mac_cc_reset);

void mt76x02_mac_set_bssid(struct mt76x02_dev *dev, u8 idx, const u8 *addr)
{
idx &= 7;
idx &= 0xf;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

mt76_wr(dev, MT_MAC_APC_BSSID_L(idx), get_unaligned_le32(addr));
mt76_rmw_field(dev, MT_MAC_APC_BSSID_H(idx), MT_MAC_APC_BSSID_H_ADDR,
get_unaligned_le16(addr + 4));
Expand Down