[iwlwifi] error bringing up 9560 NIC

From: Pete Wright via freebsd-wireless <freebsd-wireless_at_freebsd.org>
Date: Fri, 10 Sep 2021 06:28:34 UTC
hello - i've successfully run the "apply-wireless.sh" script and booted 
into a rebuilt kernel.  the system has an intel 9560 device which i 
usually used with if_iwm.

i am able to successfully unload if_iwm and load if_iwlwifi.ko. after 
updating my rc.conf to use the iwlwifi0 device and running "service 
netif start" i see the following output in my dmesg buffer:

lan0: Ethernet address: d8:3b:bf:82:d4:4e
lo0: link state changed to UP
iwlwifi0: lkpi_ic_getradiocaps: Adding chan 1/2412/0/0/0 returned error 55
iwlwifi0: lkpi_ic_getradiocaps: Adding chan 36/5180/0/0/0 returned error 55
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 
len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 
len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 
len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 
len 0
wlan0: start running, 0 vaps running
wlan0: ieee80211_start_locked: up parent iwlwifi0
wlan0: start running, 1 vaps running
wlan0: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan0: sta_newstate: INIT -> SCAN (0)


the NIC isn't able to associate with any SSID's and /var/log/messages 
contains:
Sep  9 20:52:15 colony wpa_supplicant[76640]: ioctl[SIOCS80211, op=103, 
val=0, arg_len=128]: Operation now in progress
Sep  9 20:52:15 colony wpa_supplicant[76640]: wlan0: 
CTRL-EVENT-SCAN-FAILED ret=-1 retry=1


i haven't had a chance to dig into what "error 55" is but posting here 
to see if this is a known issue.  here is my systems dmesg after i 
unload if_iwm and load if_iwlwifi:
https://termbin.com/v23g

this dmesg is from after me running "service netif start"
https://termbin.com/bpkk

and finally here's a termbin of /var/log/messages.
https://termbin.com/99n1


happy to test any patches or run additional debug steps, i've got this 
system setup as a zfs bootenv.

-pete

-- 
Pete Wright
pete@nomadlogic.org
@nomadlogicLA