More issues with iwlwifi in 13-STABLE

From: Kevin Oberman <rkoberman_at_gmail.com>
Date: Wed, 19 Jan 2022 01:50:49 UTC
Today the system crashed again like the crash I reported yesterday. It is
also not properly restarting on reboot. This occurred twice, so appears
repeatable. The driver is loaded from rc.conf.
First, driver load:
ntel(R) Wireless WiFi based driver for FreeBSD
iwlwifi0: <iwlwifi> mem 0xd1300000-0xd1303fff at device 0.0 on pci2
iwlwifi0: successfully loaded firmware image 'iwlwifi-cc-a0-67.ucode'
iwlwifi0: api flags index 2 larger than supported by driver
This message looks a bit disturbing to me.
iwlwifi0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
iwlwifi0: loaded firmware version 67.8f59b80b.0 cc-a0-67.ucode op_mode
iwlmvm
iwlwifi0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340
iwlwifi0: Detected RF HR B3, rfid=0x10a100

Now he network restarts:
wlan0: Ethernet address: 6c:6a:77:ed:ce:d9
At this time the network startup is complete, but wlan0 is not present
(even after the above message). I restart wlan0 and IPv4 works:
/etc/rc.d/netif: DEBUG: run_rc_command: doit: netif_stop wlan0
/etc/rc.d/netif: WARNING: wlan0 does not exist.  Skipped.
etc/rc.d/netif: DEBUG: Created wlan(4)s: wlan0
wpa_supplicant[2161]: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid
argument
iwlwifi0: lkpi_ic_getradiocaps: Adding chan 1/2412/0/0/0/0 returned error 55
wlwifi0: lkpi_ic_getradiocaps: Adding chan 36/5180/0/0/0/0 returned error 55
wpa_supplicant[2161]: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid
argument
wpa_supplicant[2162]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
wpa_supplicant[2162]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
wpa_supplicant[2162]: wlan0: Trying to associate with 14:c0:3e:ec:a3:40
(SSID='XXXXXX' freq=2412 MHz)
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by
driver
wlan0: link state changed to UP

There are several errors in this, but IPv4 comes up. The spelling of
"quuees" above is as it was sent, not a typo. For some reason, the IPv6
address of wlan0 is not added and no default is created. I manually add the
address and the default IPv6 route and everything is working. I suspect
that a restart when IPv6 has never been configured may not work properly.
I'll try "start" instead of "restart" next time. This may be an issue with
the netif startup script.

Here are my rc.conf definitions for wlan0:
wlans_iwlwifi0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
ifconfig_wlan0_inet6="2001:XXX:X:XXXX::24 prefixlen 64"
-- 
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683