2021-12-09 09:28:21

by Sven Eckelmann

[permalink] [raw]
Subject: Re: [PATCH] linux-firmware: update firmware for MT7921 WiFi device

On Thursday, 9 December 2021 09:24:11 CET Deren Wu wrote:
> From: Deren Wu <[email protected]>
>
> Update binary firmware for MT7921 WiFi devices
>
> File: mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
> Version: 20211129210838a
> File: mediatek/WIFI_RAM_CODE_MT7961_1.bin
> Version: 20211129210917

Thank you for the firmware update. With this firmware and the mt76.git
commit 678071ef7029 ("mt76: mt7615: clear mcu error interrupt status on
mt7663") + hostapd commit 14ab4a816c68 ("Reject ap_vendor_elements if
its length is odd") , I was able to connect to an 6GHz AP:

$ cat > station_sae_test.conf << "EOF"
country=US
network={
scan_ssid=1
ssid="Maverick6g"
key_mgmt=SAE
psk="testtest"
proto=RSN
ieee80211w=2
beacon_int=100
}
EOF

$ ip link set up dev wlp5s0
$ ./wpa_supplicant -D nl80211 -i wlp6s0 -c ~/station_sae_test.cfg -B
$ iw dev wlp5s0 link
Connected to 00:03:7f:12:8c:8c (on wlp5s0)
SSID: Maverick6g
freq: 6115
RX: 3092674 bytes (26805 packets)
TX: 114756 bytes (1073 packets)
signal: -49 dBm
rx bitrate: 1080.6 MBit/s 80MHz HE-MCS 10 HE-NSS 2 HE-GI 0 HE-DCM 0
tx bitrate: 6.5 MBit/s MCS 0

bss flags: short-slot-time
dtim period: 2
beacon int: 100
$ ping ff02::1%wlp5s0
....


Just as note: It is still not possible to see beacons when using the card in
monitor mode.

Tested-by: Sven Eckelmann <[email protected]>

Kind regards,
Svem


Attachments:
signature.asc (833.00 B)
This is a digitally signed message part.

2021-12-09 14:04:32

by Sven Eckelmann

[permalink] [raw]
Subject: Re: [PATCH] linux-firmware: update firmware for MT7921 WiFi device

On Thursday, 9 December 2021 10:21:02 CET Sven Eckelmann wrote:
> Tested-by: Sven Eckelmann <[email protected]>

I would like to retract this again because it seems like the firmware is now
hanging all the time when the default runtime-pm/deep-sleep settings are used.

[ 521.553436] mt7921e 0000:05:00.0: Message 40000002 (seq 12) timeout
[ 521.559884] mt7921e 0000:05:00.0: chip reset
[ 521.661983] mt7921e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build Time: 20211129210838a
[ 521.661983]
[ 521.684088] mt7921e 0000:05:00.0: WM Firmware Version: ____010000, Build Time: 20211129210917
[ 521.723561] mt7921e 0000:05:00.0: Firmware init done

This doesn't seem to happen that often when I perform a

echo 0 > /sys/kernel/debug/ieee80211/phy0/mt76/runtime-pm
echo 0 > /sys/kernel/debug/ieee80211/phy0/mt76/deep-sleep

before setting up the interfaces.

But even then, on the first "ip link set up dev mon0" (not only for mon0 -
also for wlan0/...) it will crash with:


[ 806.731357] mt7921e 0000:05:00.0: Message 00000046 (seq 4) timeout
[ 806.737730] mt7921e 0000:05:00.0: chip reset
RTNETLINK answers: Connection timed out
[ 806.867666] mt7921e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build Time: 20211129210838a
[ 806.867666]
[ 806.888441] mt7921e 0000:05:00.0: WM Firmware Version: ____010000, Build Time: 20211129210917
[ 806.928204] mt7921e 0000:05:00.0: Firmware init done

But when I then set up the device again then it seems to work. This is the
case for monitor and managed interfaces.

I've used commit 678071ef7029 ("mt76: mt7615: clear mcu error interrupt status
on mt7663") in mt76.git for this.

Kind regards,
Sven


Attachments:
signature.asc (833.00 B)
This is a digitally signed message part.

2021-12-09 14:13:48

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: [PATCH] linux-firmware: update firmware for MT7921 WiFi device

> On Thursday, 9 December 2021 10:21:02 CET Sven Eckelmann wrote:
> > Tested-by: Sven Eckelmann <[email protected]>
>
> I would like to retract this again because it seems like the firmware is now
> hanging all the time when the default runtime-pm/deep-sleep settings are used.
>
> [ 521.553436] mt7921e 0000:05:00.0: Message 40000002 (seq 12) timeout
> [ 521.559884] mt7921e 0000:05:00.0: chip reset
> [ 521.661983] mt7921e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build Time: 20211129210838a
> [ 521.661983]
> [ 521.684088] mt7921e 0000:05:00.0: WM Firmware Version: ____010000, Build Time: 20211129210917
> [ 521.723561] mt7921e 0000:05:00.0: Firmware init done
>
> This doesn't seem to happen that often when I perform a
>
> echo 0 > /sys/kernel/debug/ieee80211/phy0/mt76/runtime-pm
> echo 0 > /sys/kernel/debug/ieee80211/phy0/mt76/deep-sleep
>
> before setting up the interfaces.
>
> But even then, on the first "ip link set up dev mon0" (not only for mon0 -
> also for wlan0/...) it will crash with:
>
>
> [ 806.731357] mt7921e 0000:05:00.0: Message 00000046 (seq 4) timeout
> [ 806.737730] mt7921e 0000:05:00.0: chip reset
> RTNETLINK answers: Connection timed out
> [ 806.867666] mt7921e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build Time: 20211129210838a
> [ 806.867666]
> [ 806.888441] mt7921e 0000:05:00.0: WM Firmware Version: ____010000, Build Time: 20211129210917
> [ 806.928204] mt7921e 0000:05:00.0: Firmware init done
>
> But when I then set up the device again then it seems to work. This is the
> case for monitor and managed interfaces.
>
> I've used commit 678071ef7029 ("mt76: mt7615: clear mcu error interrupt status
> on mt7663") in mt76.git for this.

does it occur with an older fw?

Regards,
Lorenzo

>
> Kind regards,
> Sven



Attachments:
(No filename) (1.80 kB)
signature.asc (228.00 B)
Download all attachments

2021-12-09 14:59:09

by Sven Eckelmann

[permalink] [raw]
Subject: Re: [PATCH] linux-firmware: update firmware for MT7921 WiFi device

On Thursday, 9 December 2021 15:13:40 CET Lorenzo Bianconi wrote:
> does it occur with an older fw?

Before this version, I've used WM Firmware Version: ____010000, Build Time:
20211014150922. This version was not able to connect (and stay connected) to
6GHz at all (so I've used 2.4GHz/5GHz).

But the old firmware version worked fine as station on 2.4GHz/5GHz with
runtime-pm/deep-sleep set to 1. And I didn't see these crashes when starting/
stopping wpa_supplicant. But I've just reran it with the new firmware and
it seems like this is not 100% reproducible all the time. But when stopping
the wpa_supplicant would leak to a crash with the new firmware then was also
a problem to receive packets (not sure about the TX part).

I also didn't see the crash when using runtime-pm/deep-sleep == 0 and then
setting up the mon0 interface with the old firmware.

But interestingly, i could also see these crashes when
runtime-pm/deep-sleep == 1 and then starting/stopping wpa_supplicant. Just
didn't notice it because I've never used this configuration before.

[ 95.246429] mt7921e 0000:05:00.0: Message 00000046 (seq 8) timeout
[ 95.252734] mt7921e 0000:05:00.0: chip reset
[ 95.386747] mt7921e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build
Time: 20211014150838a
[ 95.386747]
[ 95.407850] mt7921e 0000:05:00.0: WM Firmware Version: ____010000,
Build Time: 20211014150922
[ 95.447509] mt7921e 0000:05:00.0: Firmware init done
[ 102.403012] wlp5s0: authenticate with 4a:13:65:00:0c:92
[ 102.524727] wlp5s0: send auth to 4a:13:65:00:0c:92 (try 1/3)
[ 102.536201] wlp5s0: authenticated
[ 102.542294] wlp5s0: associate with 4a:13:65:00:0c:92 (try 1/3)
[ 102.555600] wlp5s0: RX AssocResp from 4a:13:65:00:0c:92 (capab=0x431
status=0 aid=2)
[ 102.582864] wlp5s0: associated
[ 102.716868] IPv6: ADDRCONF(NETDEV_CHANGE): wlp5s0: link becomes ready

Kind regards,
Sven


Attachments:
signature.asc (833.00 B)
This is a digitally signed message part.