]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mt76: mt7915: fix mt7981 pre-calibration
authorZhi-Jun You <hujy652@gmail.com>
Tue, 9 Sep 2025 06:48:24 +0000 (14:48 +0800)
committerFelix Fietkau <nbd@nbd.name>
Mon, 15 Sep 2025 07:47:42 +0000 (09:47 +0200)
commit2b660ee10a0c25b209d7fda3c41b821b75dd85d9
tree4e4091181040cd121a0593ca0e8dabaebbb3cc88
parenta09d2f9d69afba4365ff507d18aeeb4ff1aa0e61
wifi: mt76: mt7915: fix mt7981 pre-calibration

In vendor driver, size of group cal and dpd cal for mt7981 includes 6G
although the chip doesn't support it.

mt76 doesn't take this into account which results in reading from the
incorrect offset.

For devices with precal, this would lead to lower bitrate.

Fix this by aligning groupcal size with vendor driver and switch to
freq_list_v2 in mt7915_dpd_freq_idx in order to get the correct offset.

Below are iwinfo of the test device with two clients connected
(iPhone 16, Intel AX210).
Before :
Mode: Master  Channel: 36 (5.180 GHz)  HT Mode: HE80
Center Channel 1: 42 2: unknown
Tx-Power: 23 dBm  Link Quality: 43/70
Signal: -67 dBm  Noise: -92 dBm
Bit Rate: 612.4 MBit/s
Encryption: WPA3 SAE (CCMP)
Type: nl80211  HW Mode(s): 802.11ac/ax/n
Hardware: embedded [MediaTek MT7981]

After:
Mode: Master  Channel: 36 (5.180 GHz)  HT Mode: HE80
Center Channel 1: 42 2: unknown
Tx-Power: 23 dBm  Link Quality: 43/70
Signal: -67 dBm  Noise: -92 dBm
Bit Rate: 900.6 MBit/s
Encryption: WPA3 SAE (CCMP)
Type: nl80211  HW Mode(s): 802.11ac/ax/n
Hardware: embedded [MediaTek MT7981]

Tested-on: mt7981 20240823

Fixes: 19a954edec63 ("wifi: mt76: mt7915: add mt7986, mt7916 and mt7981 pre-calibration")
Signed-off-by: Zhi-Jun You <hujy652@gmail.com>
Link: https://patch.msgid.link/20250909064824.16847-1-hujy652@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c