[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #55 from Cy Schubert --- As per our private email thread, were you able to run the wpa_supplicant provided that will produce a core dump? -- You are receiving this mail because: You are on the CC list for the bug.
Realtek rtw88 update in CURRENT
Hi, I just pushed an update for Realtek's rtw88 driver to main. Yesterday I also changed the module name to load (if you do it manually from kld_List or loader) from if_rtw88.ko to if_rtw88_pci.ko; if you auto-load the driver from devmtach nothing changes). I've done very brief testing on 8822BE and 8822CE cards. If you are using the driver please test the update. If you are on stable/13, I'll MFC end of the week-ish (as I know most people are not testing on CURRENT). Let me know if you encounter any (new) problems. In case anyone is curuious about local changes on FreeBSD compared to upstream Linux: 7 files changed, 224 insertions(+), 1 deletion(-), with about +90 lines change just to use bus_dma functions on FreeBSD. This is based on 116766 lines total of the driver (though 76708 lines of that is the 4 *_tables.c files so the number is a bit misleading); say out of 40.000 lines. Happy week, Bjoern -- Bjoern A. Zeeb r15:7
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #56 from Cy Schubert --- The current theory is that wpa_supplicant doesn't work with newer Atheros NICs/driver. The SIGABRT core dump will tell us where in the stack the bad argument to ioctl() is generating the bad argument. This is because it can call bsd_set80211() via three separate instruction paths. Without the dump we are guessing. As Bugzilla has no such status field as "pending customer" like many commercial bug tracking systems, stating here "pending customer." -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #57 from Adrian Chadd --- ... I don't think the AR9285 stuff has changed in a long time. And most of the ioctls are handed by net80211 first. Do you need me to jump in and dig into it a bit more? Or are y'all ok? -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #58 from Jaskie --- (In reply to Adrian Chadd from comment #57) By all means, jupm in please. I am currently trying to get a coredump file using the wpa Cy Schubert provided. I have in /etc/sysctl.conf: kern.corefile=/var/coredumps/%U_%N.core kern.coredump=1 kern.sugid_coredump=1 ulimit -c reported unlimited But when I ran service netif start or wpa_supplicant -D bsd -i wlan0 -c /etc/wpa_supplicant.conf, no coredump file was found. I checked root home, regular user home, / and /var/coredumps, /var/crash, no where could I find a coredump file. -- You are receiving this mail because: You are on the CC list for the bug.
Re: Realtek rtw88 update in CURRENT
Hello Bjoern. I am using CURRENT nowadays, so I can definitely test the card on 14 after a brief world update. Last time I tried I think I was getting kernel panics every 10~ish minutes, but could've been other causes. As I have mostly been using Ethernet this month I have only used rtw88 briefly so I cannot confirm. I will test this commit out and report back as soon as I have some spare time. Thanks again for your work, sincerely. --- Original Message --- On Monday, June 13th, 2022 at 4:22 PM, Bjoern A. Zeeb wrote: > Hi, > > I just pushed an update for Realtek's rtw88 driver to main. > > Yesterday I also changed the module name to load (if you do it manually > from kld_List or loader) from if_rtw88.ko to if_rtw88_pci.ko; > if you auto-load the driver from devmtach nothing changes). > > > I've done very brief testing on 8822BE and 8822CE cards. If you are using > the driver please test the update. If you are on stable/13, I'll MFC > end of the week-ish (as I know most people are not testing on CURRENT). > Let me know if you encounter any (new) problems. > > > In case anyone is curuious about local changes on FreeBSD compared to > upstream Linux: > 7 files changed, 224 insertions(+), 1 deletion(-), > with about +90 lines change just to use bus_dma functions on FreeBSD. > This is based on 116766 lines total of the driver (though 76708 lines > of that is the 4 *_tables.c files so the number is a bit misleading); > say out of 40.000 lines. > > > Happy week, > Bjoern > > -- > Bjoern A. Zeeb r15:7
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #59 from J.R. Oldroyd --- One additional data point. I am now at a location with a laptop with an AR9280 chip. I just did a 13.1 upgrade on it. This one associates just fine with the hostap here, Ethernet MCS mode 11ng. I realize it's hard to compare apples and oranges (different AR928x chips and different hostaps) but figured I'd post the result. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #60 from Cy Schubert --- Considering you can't get a dump, let's see if the ath(4) driver can give us a hint. Run this DTrace script prior to starting wlan0. #!/usr/sbin/dtrace -s fbt::ath_ioctl:entry { print(*args[0]); stack(); } fbt::ath_ioctl:return { print(arg0); } -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #61 from Adrian Chadd --- hey wait a sec, I'm seeing different configurations between wpa-supplicant on 13.0 and 13.1. (ie, out of ifconfig.) the fact ifconfig isn't saying MANUAL for roam is a big red flag to me. One of the things wpa supplicant does when it's running correctly is literally do /that/. So did bz/cy change the wpa supplicant API between 13.0 and 13.1? Something tells me they've turned on some options, updated the code, etc and only tested with a couple of NICs rather than all of them, and have broken some stuff. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #62 from Bjoern A. Zeeb --- (In reply to Adrian Chadd from comment #61) Why don't you read a bit backwards; around comment #44 would tell you. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #63 from Adrian Chadd --- Ok, it really does look like incomplete testing. :( Please compile the kernel w/: IEEE80211_DEBUG ATH_DEBUG AH_DEBUG ATH_DIAGAPI ... I think that should be enough to get all the good debugging that you need. Then you can use wlandebug to log what's going on when net80211 goes through states: wlandebug -i wlan0 +assoc +state +scan +mlme Then run wpa_supplicant and see what happens. Meanwhile I'll go update my -HEAD laptop again and go setup 13.1-RELEASE somewhere with an ath(4) NIC and see what happens. The only thing that's really ar9285 specific is 1x1 stream 11n + STBC; everything else should be the same on all 2GHz supported ath(4) NICs. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #64 from Bjoern A. Zeeb --- (In reply to Adrian Chadd from comment #63) Again, I think it might be good to remind people that the kernel was ruled out given an 13.0 user land on a 13.1 kernel works just fine if I understand the earlier information correctly. Also it was reported that copying a 13.0 wpa_supplicant over to 13.1 world makes things work. It seems based on OOB communication mentioned here, that people are trying to track down a wpa_supplicant/ioctl problem with multiple code paths, so turning on all kernel debugging is probably currently just distracting from the problem. It's probably also not related to the specific wireless chipset or driver but more likely to the specific BSS as otherwise we'd see a lot more reports and reproducers of that problem? -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #65 from Adrian Chadd --- Yes, I think it's more likely some ioctl ordering or contents issue. Doing net80211 debugging though may shed some light on what's being done. (I'd stick a dtrace rule on the net80211 ioctl handle, not the ath ioctl handle, as the ath ioctl handle doesn't do much..) -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #66 from Cy Schubert --- That's why I asked for a DTrace. The user is unable to capture a dump using the file I gave her that would force wpa_supplicant to dump with the error. There are three different calls to the function that calls ioctl(). I don't know which path it's taking. Hopefully the DTrace would have given me enough of a clue to guess which of the three calls to that function might be the source of the problem. (Apparently DTrace isn't installed on that laptop either... Scratch that idea.) As to roaming MANUAL, I don't see it. No such problem here nor do I see anything but roaming MANUAL here. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #67 from Cy Schubert --- wpa_driver_bsd_scan() calls set80211param() to set IEEE80211_IOC_ROAMING to IEEE80211_ROAMING_MANUAL immediately after setting mediaopt to STA. This is unconditional and if it fails it will issue a message to syslog. All this is passed to bsd_set80211() which calls ioctl at line 120: if (ioctl(drv->global->sock, SIOCS80211, &ireq) < 0) { wpa_printf(MSG_ERROR, "ioctl[SIOCS80211, op=%u, val=%u, " "arg_len=%u]: %s", op, val, arg_len, strerror(errno)); return -1; } It is this error message we see in syslog, which may well be that it's failing to set IEEE80211_ROAMING_MANUAL. A backtrace would be able to confirm this. The interesting thing we notice is that op contains various values. I've seen -1 and 20 so far. op is passed to bsd_set80211() via set80211var() and set80211param(), each of which is called by numerous other callers. strerrorr(errno) is "invalid argument." The question remains, which caller is responsible for this? Once the user can obtain a dump, the backtrace will tell us which calling path is used and we can discover where opt and val are set, because both of these are set many frames above this frame, thus will be on the stack. The user will need to provide wpa_supplicant.core from the binary I sent her -- because I put an abort() in place of the return. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #68 from Cy Schubert --- The ioctl() error is likely due to bsd_del_key(). Can you please add -dd to wpa_supplicant_flags= in rc.conf. Then grep wpa_supplicant /var/log/messages. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #69 from Jaskie --- Created attachment 234669 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=234669&action=edit dtrace output -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 264238] WiFi stops working after upgrade from 13.0 to 13.1, AR9285 (wpa_supplicant)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264238 --- Comment #70 from Jaskie --- (In reply to Jaskie from comment #69) I am using the wpa Cy Schubert prvided in this test. wpa_supplicant_flags="-dd" was added to rc.conf. # service netif start Created wlan(4) interfaces: wlan0. Starting wpa_supplicant. wpa_supplicant v2.10 Successfully initialized wpa_supplicant Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'bsd' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' Line: 1 - start of a new network block ssid - hexdump_ascii(len=8): 57 48 55 2d 57 4c 41 4e WHU-WLAN key_mgmt: 0x4 Line: 11 - start of a new network block ssid - hexdump_ascii(len=7): 57 48 55 2d 53 54 55 WHU-STU key_mgmt: 0x4 Line: 18 - start of a new network block ssid - hexdump_ascii(len=8): 57 68 61 74 54 68 65 46 WhatTheF PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] Priority group 0 id=0 ssid='WHU-WLAN' id=1 ssid='WHU-STU' id=2 ssid='WhatTheF' wpa_driver_bsd_capa: drivercaps=0x4f8def41,cryptocaps=0x001f Add interface wlan0 to a new radio N/A PTKSA: Initializing wlan0: Failed to attach pkt_type filter wlan0: Own MAC address: 1c:4b:d6:ca:3e:ac bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0 bsd_del_key: key_idx=0 bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0 bsd_del_key: key_idx=1 bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0 bsd_del_key: key_idx=2 bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0 bsd_del_key: key_idx=3 bsd_set_key: alg=0 addr=0x0 key_idx=4 set_tx=0 seq_len=0 key_len=0 bsd_del_key: key_idx=4 ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument Abort trap /etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant Starting Network: lo0 alc0 wlan0. lo0: flags=8049 metric 0 mtu 16384 options=680003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff00 groups: lo nd6 options=21 alc0: flags=8843 metric 0 mtu 1500 options=c3198 ether 48:5b:39:8e:3c:b0 media: Ethernet autoselect (none) status: no carrier nd6 options=29 wlan0: flags=8802 metric 0 mtu 1500 ether 1c:4b:d6:ca:3e:ac groups: wlan ssid "" channel 5 (2432 MHz 11g ht/20) regdomain 96 indoor ecm authmode OPEN privacy OFF txpower 20 bmiss 7 scanvalid 60 protmode CTS ampdulimit 64k ampdudensity 8 shortgi -stbctx stbcrx -ldpc -uapsd wme burst bintval 0 parent interface: ath0 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) status: no carrier nd6 options=29 # less /var/log/messages Jun 14 12:53:17 freebsd kernel: wlan0: Ethernet address: 1c:4b:d6:ca:3e:ac Jun 14 12:53:18 freebsd kernel: lo0: link state changed to UP Jun 14 12:53:18 freebsd root[22584]: /etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant Jun 14 12:53:18 freebsd kernel: pid 22579 (wpa_supplicant), jid 0,