Iwlwifi on x64 failures

I have a problem setting up OpenWrt with the same HW set up that I previously got it working. After deleting my config, nothing really works. I cannot scan no matter what, no results come up.

The default setup with OpenWrt AP:

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:10.0'
	option htmode 'VHT80'
	option channel 'auto'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

fails with:

Wed Nov 17 16:39:17 2021 daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
Wed Nov 17 16:39:17 2021 daemon.err hostapd: ACS: No available channels found
Wed Nov 17 16:39:17 2021 daemon.warn hostapd: wlan0: IEEE 802.11 Configured channel (0) or frequency (0) not found from the channel list of the current mode (2) IEEE 802.11a
Wed Nov 17 16:39:17 2021 daemon.warn hostapd: wlan0: IEEE 802.11 Hardware does not support configured channel
Wed Nov 17 16:39:17 2021 daemon.err hostapd: Could not select hw_mode and channel. (-3)
Wed Nov 17 16:39:17 2021 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->DISABLED

Adding option country 'PL' does nothing.

Choosing a specific channel:

* 5720 MHz [144] (22.0 dBm) (no IR, radar detection)

does nothing, except it fails for other reasons:

Wed Nov 17 16:46:23 2021 daemon.notice hostapd: Remove interface 'wlan0'
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Wed Nov 17 16:46:23 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0) --> new PHY
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->HT_SCAN
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: interface state HT_SCAN->DFS
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: DFS-CAC-START freq=5720 chan=144 sec_chan=-1, width=0, seg0=142, seg1=0, cac_time=60s
Wed Nov 17 16:46:23 2021 daemon.err hostapd: DFS start_dfs_cac() failed, -1
Wed Nov 17 16:46:23 2021 daemon.err hostapd: Interface initialization failed
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: interface state DFS->DISABLED
Wed Nov 17 16:46:23 2021 daemon.notice hostapd: wlan0: AP-DISABLED

Choosing another 802.11ac channel does the same.

Switching to option hwmode '11g' with channel 'auto’:

Wed Nov 17 16:49:27 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Wed Nov 17 16:49:27 2021 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Wed Nov 17 16:49:27 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0) --> new PHY
Wed Nov 17 16:49:28 2021 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Wed Nov 17 16:49:28 2021 daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
Wed Nov 17 16:49:28 2021 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->ACS
Wed Nov 17 16:49:28 2021 daemon.notice hostapd: wlan0: ACS-STARTED
Wed Nov 17 16:49:36 2021 daemon.err hostapd: ACS: Unable to collect survey data
Wed Nov 17 16:49:36 2021 daemon.err hostapd: ACS: All study options have failed
Wed Nov 17 16:49:36 2021 daemon.err hostapd: Interface initialization failed
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: interface state ACS->DISABLED
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Nov 17 16:49:36 2021 daemon.err hostapd: ACS: Possibly channel configuration is invalid, please report this along with your config file.
Wed Nov 17 16:49:36 2021 daemon.err hostapd: ACS: Failed to start
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Nov 17 16:49:36 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED

Choosing a specific channel seems to work according to the logs:

Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: interface state ACS->DISABLED
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Nov 17 16:49:36 2021 daemon.err hostapd: ACS: Possibly channel configuration is invalid, please report this along with your config file.
Wed Nov 17 16:49:36 2021 daemon.err hostapd: ACS: Failed to start
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Nov 17 16:49:36 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Wed Nov 17 16:49:36 2021 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: Remove interface 'wlan0'
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Wed Nov 17 16:50:50 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0) --> new PHY
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Wed Nov 17 16:50:50 2021 kern.info kernel: [  779.846458] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->ENABLED
Wed Nov 17 16:50:50 2021 daemon.notice hostapd: wlan0: AP-ENABLED
Wed Nov 17 16:50:51 2021 daemon.notice netifd: Network device 'wlan0' link is up

Except the network is not visible to other devices.

Every now and then I see errors in dmesg:

[  150.650481] iwlwifi 0000:00:10.0: regular scan timed out
[  150.727691] iwlwifi 0000:00:10.0: Microcode SW error detected.  Restarting 0x2000000.
[  150.729820] iwlwifi 0000:00:10.0: Start IWL Error Log Dump:
[  150.731491] iwlwifi 0000:00:10.0: Status: 0x00000040, count: 6
[  150.733222] iwlwifi 0000:00:10.0: Loaded firmware version: 36.ad812ee0.0 8000C-36.ucode
[  150.735221] iwlwifi 0000:00:10.0: 0x00000084 | NMI_INTERRUPT_UNKNOWN
[  150.740021] iwlwifi 0000:00:10.0: 0x00A002F0 | trm_hw_status0
[  150.742808] iwlwifi 0000:00:10.0: 0x00000000 | trm_hw_status1
[  150.745068] iwlwifi 0000:00:10.0: 0x0002438C | branchlink2
[  150.747026] iwlwifi 0000:00:10.0: 0x00039C06 | interruptlink1
[  150.748990] iwlwifi 0000:00:10.0: 0x0000051E | interruptlink2
[  150.750997] iwlwifi 0000:00:10.0: 0x00000000 | data1
[  150.752734] iwlwifi 0000:00:10.0: 0x00000080 | data2
[  150.754218] iwlwifi 0000:00:10.0: 0x07830000 | data3
[  150.755873] iwlwifi 0000:00:10.0: 0x00000000 | beacon time
[  150.757383] iwlwifi 0000:00:10.0: 0x07FCA553 | tsf low
[  150.758998] iwlwifi 0000:00:10.0: 0x00000000 | tsf hi
[  150.760400] iwlwifi 0000:00:10.0: 0x00000000 | time gp1
[  150.761884] iwlwifi 0000:00:10.0: 0x07FCA553 | time gp2
[  150.763349] iwlwifi 0000:00:10.0: 0x00000001 | uCode revision type
[  150.765002] iwlwifi 0000:00:10.0: 0x00000024 | uCode version major
[  150.766624] iwlwifi 0000:00:10.0: 0xAD812EE0 | uCode version minor
[  150.768174] iwlwifi 0000:00:10.0: 0x00000201 | hw version
[  150.769697] iwlwifi 0000:00:10.0: 0x18489008 | board version
[  150.771243] iwlwifi 0000:00:10.0: 0x00BD011C | hcmd
[  150.772677] iwlwifi 0000:00:10.0: 0x00022000 | isr0
[  150.774024] iwlwifi 0000:00:10.0: 0x00800000 | isr1
[  150.775441] iwlwifi 0000:00:10.0: 0x08001802 | isr2
[  150.776832] iwlwifi 0000:00:10.0: 0x0041FCC0 | isr3
[  150.778185] iwlwifi 0000:00:10.0: 0x00000000 | isr4
[  150.780676] iwlwifi 0000:00:10.0: 0x00BE0128 | last cmd Id
[  150.783523] iwlwifi 0000:00:10.0: 0x00000000 | wait_event
[  150.786434] iwlwifi 0000:00:10.0: 0x0000DAE8 | l2p_control
[  150.789193] iwlwifi 0000:00:10.0: 0x00000020 | l2p_duration
[  150.790948] iwlwifi 0000:00:10.0: 0x000003BF | l2p_mhvalid
[  150.792329] iwlwifi 0000:00:10.0: 0x0000A000 | l2p_addr_match
[  150.793638] iwlwifi 0000:00:10.0: 0x0000000D | lmpm_pmg_sel
[  150.794963] iwlwifi 0000:00:10.0: 0x14100651 | timestamp
[  150.796241] iwlwifi 0000:00:10.0: 0x0034B8C8 | flow_handler
[  150.797711] iwlwifi 0000:00:10.0: Start IWL Error Log Dump:
[  150.799190] iwlwifi 0000:00:10.0: Status: 0x00000040, count: 7
[  150.800497] iwlwifi 0000:00:10.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[  150.801863] iwlwifi 0000:00:10.0: 0x00000000 | umac branchlink1
[  150.803269] iwlwifi 0000:00:10.0: 0xC0086B3C | umac branchlink2
[  150.804643] iwlwifi 0000:00:10.0: 0xC0083D08 | umac interruptlink1
[  150.806150] iwlwifi 0000:00:10.0: 0xC0083D08 | umac interruptlink2
[  150.807520] iwlwifi 0000:00:10.0: 0x00000800 | umac data1
[  150.809153] iwlwifi 0000:00:10.0: 0xC0083D08 | umac data2
[  150.810865] iwlwifi 0000:00:10.0: 0xDEADBEEF | umac data3
[  150.812345] iwlwifi 0000:00:10.0: 0x00000024 | umac major
[  150.813488] iwlwifi 0000:00:10.0: 0xAD812EE0 | umac minor
[  150.814689] iwlwifi 0000:00:10.0: 0xC088628C | frame pointer
[  150.815908] iwlwifi 0000:00:10.0: 0xC088628C | stack pointer
[  150.817058] iwlwifi 0000:00:10.0: 0x00BE0128 | last host cmd
[  150.818136] iwlwifi 0000:00:10.0: 0x00000000 | isr status reg
[  150.819335] iwlwifi 0000:00:10.0: Fseq Registers:
[  150.820401] iwlwifi 0000:00:10.0: 0xA349E85B | FSEQ_ERROR_CODE
[  150.821499] iwlwifi 0000:00:10.0: 0xE1EAA921 | FSEQ_TOP_INIT_VERSION
[  150.822754] iwlwifi 0000:00:10.0: 0x6F978347 | FSEQ_CNVIO_INIT_VERSION
[  150.824032] iwlwifi 0000:00:10.0: 0x0000A056 | FSEQ_OTP_VERSION
[  150.825273] iwlwifi 0000:00:10.0: 0x2602412E | FSEQ_TOP_CONTENT_VERSION
[  150.826686] iwlwifi 0000:00:10.0: 0x7660E6DE | FSEQ_ALIVE_TOKEN
[  150.827953] iwlwifi 0000:00:10.0: 0xC1001788 | FSEQ_CNVI_ID
[  150.829116] iwlwifi 0000:00:10.0: 0xBEB2DE9C | FSEQ_CNVR_ID
[  150.830351] iwlwifi 0000:00:10.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[  150.831632] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[  150.832935] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[  150.834463] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[  150.836006] iwlwifi 0000:00:10.0: Collecting data: trigger 2 fired.
[  150.837299] ieee80211 phy0: Hardware restart was requested
[  151.413798] iwlwifi 0000:00:10.0: Scan failed! ret -5
[  216.186438] iwlwifi 0000:00:10.0: regular scan timed out
[  216.264461] iwlwifi 0000:00:10.0: Microcode SW error detected.  Restarting 0x2000000.
[  216.266132] iwlwifi 0000:00:10.0: Start IWL Error Log Dump:
[  216.267522] iwlwifi 0000:00:10.0: Status: 0x00000040, count: 6
[  216.268932] iwlwifi 0000:00:10.0: Loaded firmware version: 36.ad812ee0.0 8000C-36.ucode
[  216.270503] iwlwifi 0000:00:10.0: 0x00000084 | NMI_INTERRUPT_UNKNOWN
[  216.272010] iwlwifi 0000:00:10.0: 0x00A002F0 | trm_hw_status0
[  216.273305] iwlwifi 0000:00:10.0: 0x00000000 | trm_hw_status1
[  216.274672] iwlwifi 0000:00:10.0: 0x0002438C | branchlink2
[  216.275984] iwlwifi 0000:00:10.0: 0x00039C06 | interruptlink1
[  216.277678] iwlwifi 0000:00:10.0: 0x00039C06 | interruptlink2
[  216.279035] iwlwifi 0000:00:10.0: 0x00000000 | data1
[  216.280247] iwlwifi 0000:00:10.0: 0x00000080 | data2
[  216.281393] iwlwifi 0000:00:10.0: 0x07830000 | data3
[  216.282546] iwlwifi 0000:00:10.0: 0x00000000 | beacon time
[  216.283734] iwlwifi 0000:00:10.0: 0x03B063DC | tsf low
[  216.284966] iwlwifi 0000:00:10.0: 0x00000000 | tsf hi
[  216.286170] iwlwifi 0000:00:10.0: 0x00000000 | time gp1
[  216.287402] iwlwifi 0000:00:10.0: 0x03B063DC | time gp2
[  216.288623] iwlwifi 0000:00:10.0: 0x00000001 | uCode revision type
[  216.289925] iwlwifi 0000:00:10.0: 0x00000024 | uCode version major
[  216.291203] iwlwifi 0000:00:10.0: 0xAD812EE0 | uCode version minor
[  216.292516] iwlwifi 0000:00:10.0: 0x00000201 | hw version
[  216.293793] iwlwifi 0000:00:10.0: 0x18489008 | board version
[  216.295123] iwlwifi 0000:00:10.0: 0x0053011C | hcmd
[  216.296346] iwlwifi 0000:00:10.0: 0x00122000 | isr0
[  216.297603] iwlwifi 0000:00:10.0: 0x00800000 | isr1
[  216.298781] iwlwifi 0000:00:10.0: 0x08001802 | isr2
[  216.299945] iwlwifi 0000:00:10.0: 0x0041FCC0 | isr3
[  216.301119] iwlwifi 0000:00:10.0: 0x00000000 | isr4
[  216.302381] iwlwifi 0000:00:10.0: 0x00540128 | last cmd Id
[  216.303693] iwlwifi 0000:00:10.0: 0x00000000 | wait_event
[  216.304927] iwlwifi 0000:00:10.0: 0x0000D446 | l2p_control
[  216.306157] iwlwifi 0000:00:10.0: 0x00000820 | l2p_duration
[  216.307451] iwlwifi 0000:00:10.0: 0x00000003 | l2p_mhvalid
[  216.308695] iwlwifi 0000:00:10.0: 0x00000000 | l2p_addr_match
[  216.309965] iwlwifi 0000:00:10.0: 0x0000000D | lmpm_pmg_sel
[  216.311254] iwlwifi 0000:00:10.0: 0x14100651 | timestamp
[  216.312467] iwlwifi 0000:00:10.0: 0x00345860 | flow_handler
[  216.313712] iwlwifi 0000:00:10.0: Start IWL Error Log Dump:
[  216.315035] iwlwifi 0000:00:10.0: Status: 0x00000040, count: 7
[  216.316376] iwlwifi 0000:00:10.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[  216.317784] iwlwifi 0000:00:10.0: 0x00000000 | umac branchlink1
[  216.319161] iwlwifi 0000:00:10.0: 0xC0086B3C | umac branchlink2
[  216.320444] iwlwifi 0000:00:10.0: 0xC0083D08 | umac interruptlink1
[  216.321744] iwlwifi 0000:00:10.0: 0xC0083D08 | umac interruptlink2
[  216.323032] iwlwifi 0000:00:10.0: 0x00000800 | umac data1
[  216.324223] iwlwifi 0000:00:10.0: 0xC0083D08 | umac data2
[  216.325429] iwlwifi 0000:00:10.0: 0xDEADBEEF | umac data3
[  216.326648] iwlwifi 0000:00:10.0: 0x00000024 | umac major
[  216.327872] iwlwifi 0000:00:10.0: 0xAD812EE0 | umac minor
[  216.329030] iwlwifi 0000:00:10.0: 0xC088628C | frame pointer
[  216.330158] iwlwifi 0000:00:10.0: 0xC088628C | stack pointer
[  216.331335] iwlwifi 0000:00:10.0: 0x00540128 | last host cmd
[  216.332479] iwlwifi 0000:00:10.0: 0x00000000 | isr status reg
[  216.333642] iwlwifi 0000:00:10.0: Fseq Registers:
[  216.334734] iwlwifi 0000:00:10.0: 0xA349E85B | FSEQ_ERROR_CODE
[  216.335996] iwlwifi 0000:00:10.0: 0xE1EAA921 | FSEQ_TOP_INIT_VERSION
[  216.337279] iwlwifi 0000:00:10.0: 0x6F978347 | FSEQ_CNVIO_INIT_VERSION
[  216.338722] iwlwifi 0000:00:10.0: 0x0000A056 | FSEQ_OTP_VERSION
[  216.339955] iwlwifi 0000:00:10.0: 0x2602412E | FSEQ_TOP_CONTENT_VERSION
[  216.341262] iwlwifi 0000:00:10.0: 0x7660E6DE | FSEQ_ALIVE_TOKEN
[  216.342729] iwlwifi 0000:00:10.0: 0xC1001788 | FSEQ_CNVI_ID
[  216.343947] iwlwifi 0000:00:10.0: 0xBEB2DE9C | FSEQ_CNVR_ID
[  216.345139] iwlwifi 0000:00:10.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[  216.346433] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[  216.347758] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[  216.349313] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[  216.350865] ------------[ cut here ]------------
[  216.352029] UMAC scan UID 1 status was not cleaned
[  216.353295] WARNING: CPU: 0 PID: 1599 at 0xffffffffa034b8e2 [iwlmvm@000000004a1a08b9+0x3a000]
[  216.354867] Modules linked in: pppoe ppp_async iwlmvm iwldvm iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD xt_CT pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack mac80211 iwlwifi ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc r8169 nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables forcedeth e1000e crc_ccitt compat bnx2 i2c_dev trelay nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ixgbe igb e1000 mdio nls_utf8 nls_iso8859_1 nls_cp437 vfat fat button_hotplug ptp realtek pps_core mii libphy
[  216.369637] CPU: 0 PID: 1599 Comm: irq/36-iwlwifi Not tainted 5.4.154 #0
[  216.371574] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[  216.375214] RIP: 0010:0xffffffffa034b8e2 [iwlmvm@000000004a1a08b9+0x3a000]
[  216.377260] Code: ff ff 41 80 bc 24 90 18 00 00 00 0f 85 35 fe ff ff 45 31 ed e9 5a ff ff ff 89 de 4c 89 ef c6 05 a7 93 01 00 01 e8 84 c0 56 e1 <0f> 0b eb c3 66 2e 0f 1f 84 00 00 00 00 00 85 b7 20 17 00 00 74 0e
[  216.384281] RSP: 0018:ffffc900001dbdb8 EFLAGS: 00010296
[  216.386778] RAX: 0000000000000026 RBX: 0000000000000001 RCX: 0000000000000006
[  216.389771] RDX: 0000000000000007 RSI: 0000000000000002 RDI: ffff8880078174d0
[  216.391838] RBP: ffffc900001dbde0 R08: 0000000000000000 R09: 00000000000002ba
[  216.393457] R10: 0000000000000000 R11: ffff888006d48f40 R12: ffff8880054726e8
[  216.395256] R13: ffffffffa0363138 R14: 0000000002000000 R15: 0000000002000000
[  216.397018] FS:  0000000000000000(0000) GS:ffff888007800000(0000) knlGS:0000000000000000
[  216.398911] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  216.400526] CR2: 00007fb58a8ebd84 CR3: 0000000003c24000 CR4: 00000000000406f0
[  216.402423] Call Trace:
[  216.403615]  0xffffffffa03361ae [iwlmvm@000000004a1a08b9+0x3a000]
[  216.405334]  0xffffffffa033647b [iwlmvm@000000004a1a08b9+0x3a000]
[  216.407093]  0xffffffffa021c63a [iwlwifi@000000009ae1c865+0x32000]
[  216.408816]  0xffffffffa021eb8a [iwlwifi@000000009ae1c865+0x32000]
[  216.410607]  ? 0xffffffff810f5280
[  216.412042]  0xffffffff810f529f
[  216.413341]  0xffffffff810f5587
[  216.414924]  ? 0xffffffff810f5370
[  216.416422]  0xffffffff810c983b
[  216.417929]  ? 0xffffffff810f54b0
[  216.419381]  ? 0xffffffff810c9730
[  216.420827]  0xffffffff81a00202
[  216.422192] ---[ end trace d3eb1dc1a9b86d6f ]---
[  216.423723] iwlwifi 0000:00:10.0: Collecting data: trigger 2 fired.
[  216.425502] ieee80211 phy0: Hardware restart was requested
[  217.003879] iwlwifi 0000:00:10.0: Scan failed! ret -5
[  240.762539] iwlwifi 0000:00:10.0: regular scan timed out
[  240.838989] iwlwifi 0000:00:10.0: Microcode SW error detected.  Restarting 0x2000000.
[  240.841199] iwlwifi 0000:00:10.0: Start IWL Error Log Dump:
[  240.843101] iwlwifi 0000:00:10.0: Status: 0x00000040, count: 6
[  240.845006] iwlwifi 0000:00:10.0: Loaded firmware version: 36.ad812ee0.0 8000C-36.ucode
[  240.847009] iwlwifi 0000:00:10.0: 0x00000084 | NMI_INTERRUPT_UNKNOWN
[  240.848871] iwlwifi 0000:00:10.0: 0x000002F2 | trm_hw_status0
[  240.850622] iwlwifi 0000:00:10.0: 0x00000000 | trm_hw_status1
[  240.852412] iwlwifi 0000:00:10.0: 0x0002438C | branchlink2
[  240.854275] iwlwifi 0000:00:10.0: 0x00039C06 | interruptlink1
[  240.858548] iwlwifi 0000:00:10.0: 0x00004B86 | interruptlink2
[  240.861446] iwlwifi 0000:00:10.0: 0x00000000 | data1
[  240.863990] iwlwifi 0000:00:10.0: 0x00000080 | data2
[  240.865517] iwlwifi 0000:00:10.0: 0x07830000 | data3
[  240.866916] iwlwifi 0000:00:10.0: 0x00000000 | beacon time
[  240.868458] iwlwifi 0000:00:10.0: 0x01578D13 | tsf low
[  240.870015] iwlwifi 0000:00:10.0: 0x00000000 | tsf hi
[  240.871480] iwlwifi 0000:00:10.0: 0x00000000 | time gp1
[  240.872891] iwlwifi 0000:00:10.0: 0x01578D14 | time gp2
[  240.874194] iwlwifi 0000:00:10.0: 0x00000001 | uCode revision type
[  240.875657] iwlwifi 0000:00:10.0: 0x00000024 | uCode version major
[  240.877121] iwlwifi 0000:00:10.0: 0xAD812EE0 | uCode version minor
[  240.878395] iwlwifi 0000:00:10.0: 0x00000201 | hw version
[  240.879521] iwlwifi 0000:00:10.0: 0x18489008 | board version
[  240.880900] iwlwifi 0000:00:10.0: 0x003A011C | hcmd
[  240.882011] iwlwifi 0000:00:10.0: 0x02F22000 | isr0
[  240.883144] iwlwifi 0000:00:10.0: 0x00804000 | isr1
[  240.884380] iwlwifi 0000:00:10.0: 0x08001802 | isr2
[  240.885684] iwlwifi 0000:00:10.0: 0x00400080 | isr3
[  240.886956] iwlwifi 0000:00:10.0: 0x00000000 | isr4
[  240.888103] iwlwifi 0000:00:10.0: 0x003B0128 | last cmd Id
[  240.889289] iwlwifi 0000:00:10.0: 0x00000000 | wait_event
[  240.891385] iwlwifi 0000:00:10.0: 0x0000DD97 | l2p_control
[  240.893005] iwlwifi 0000:00:10.0: 0x00001C22 | l2p_duration
[  240.894651] iwlwifi 0000:00:10.0: 0x00000003 | l2p_mhvalid
[  240.896270] iwlwifi 0000:00:10.0: 0x00001000 | l2p_addr_match
[  240.899996] iwlwifi 0000:00:10.0: 0x0000000F | lmpm_pmg_sel
[  240.903965] iwlwifi 0000:00:10.0: 0x14100651 | timestamp
[  240.908126] iwlwifi 0000:00:10.0: 0x00343848 | flow_handler
[  240.911651] iwlwifi 0000:00:10.0: Start IWL Error Log Dump:
[  240.916283] iwlwifi 0000:00:10.0: Status: 0x00000040, count: 7
[  240.917996] iwlwifi 0000:00:10.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[  240.919906] iwlwifi 0000:00:10.0: 0x00000000 | umac branchlink1
[  240.921613] iwlwifi 0000:00:10.0: 0xC0086B3C | umac branchlink2
[  240.923310] iwlwifi 0000:00:10.0: 0xC0083D08 | umac interruptlink1
[  240.925336] iwlwifi 0000:00:10.0: 0xC0083D08 | umac interruptlink2
[  240.927309] iwlwifi 0000:00:10.0: 0x00000800 | umac data1
[  240.928692] iwlwifi 0000:00:10.0: 0xC0083D08 | umac data2
[  240.929840] iwlwifi 0000:00:10.0: 0xDEADBEEF | umac data3
[  240.931048] iwlwifi 0000:00:10.0: 0x00000024 | umac major
[  240.932246] iwlwifi 0000:00:10.0: 0xAD812EE0 | umac minor
[  240.933415] iwlwifi 0000:00:10.0: 0xC088628C | frame pointer
[  240.934640] iwlwifi 0000:00:10.0: 0xC088628C | stack pointer
[  240.935845] iwlwifi 0000:00:10.0: 0x003B0128 | last host cmd
[  240.937021] iwlwifi 0000:00:10.0: 0x00000000 | isr status reg
[  240.938269] iwlwifi 0000:00:10.0: Fseq Registers:
[  240.939364] iwlwifi 0000:00:10.0: 0xA349E85B | FSEQ_ERROR_CODE
[  240.940540] iwlwifi 0000:00:10.0: 0xE1EAA921 | FSEQ_TOP_INIT_VERSION
[  240.941658] iwlwifi 0000:00:10.0: 0x6F978347 | FSEQ_CNVIO_INIT_VERSION
[  240.943124] iwlwifi 0000:00:10.0: 0x0000A056 | FSEQ_OTP_VERSION
[  240.944412] iwlwifi 0000:00:10.0: 0x2602412E | FSEQ_TOP_CONTENT_VERSION
[  240.945812] iwlwifi 0000:00:10.0: 0x7660E6DE | FSEQ_ALIVE_TOKEN
[  240.947122] iwlwifi 0000:00:10.0: 0xC1001788 | FSEQ_CNVI_ID
[  240.948368] iwlwifi 0000:00:10.0: 0xBEB2DE9C | FSEQ_CNVR_ID
[  240.949566] iwlwifi 0000:00:10.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[  240.950811] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[  240.952081] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[  240.953564] iwlwifi 0000:00:10.0: 0x0BADCAFE | CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[  240.955207] iwlwifi 0000:00:10.0: Collecting data: trigger 2 fired.
[  240.956556] ieee80211 phy0: Hardware restart was requested
[  241.051162] iwlwifi 0000:00:10.0: Scan failed! ret -5

I created an issue for the error above: https://bugs.openwrt.org/index.php?do=details&task_id=4139

What's super odd is that I got it to work yesterday. Somehow it stopped working overnight and now I can't get it to work at all. I shut down the hardware bunch of times, to no avail.

After shutting down everything and bringing it back up again, it seems to work again. For whatever reason, because I did that twice before already, except this time I did not just shut down but actually pulled the cord from the plug. It's possible that my system keeps WiFi powered for WoL.

That having said:

  1. I had to set
	option hwmode '11g'
	option channel '3'

, channel being a valid 2.4G channel. It would not work with anything in 5GHz, with hostapd complaining:

IEEE 802.11 Configured channel (149) or frequency (5745) not found from the channel list of the current mode (2) IEEE 802.11a

Which seems like a bug of its own.

  1. Despite that, both STA and AP actually use 802.11ac, to my surprise. The client network I connect STA to is available in both bands, so it's quite surprising that it still chooses 5G over 2.4.

  2. On my macOS the AP is reported to have country as "DE", despite me explicitly setting it to PL

option country 'PL'

This seems like a bug of hostapd itself, since its config seems to be set correctly:

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=PL
ieee80211d=1
hw_mode=g
supported_rates=60 90 120 180 240 360 480 540
basic_rates=60 120 240
beacon_int=100
dtim_period=2
channel=3
chanlist=3
noscan=1

ieee80211n=1
ht_coex=0
ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

radio_config_id=6789
interface=wlan-ap
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
skip_inactivity_poll=0
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxx
wpa_psk_file=/var/run/hostapd-wlan-ap.psk
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=some-essid
bridge=br-lan
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
dynamic_vlan=0
vlan_naming=1
vlan_file=/var/run/hostapd-wlan-ap.vlan
config_id=12345
start_disabled=1
bssid=xx:yy:xx:yy:xx:yy

AP mode in 5 GHz is not supported on that hardware. The notation "no IR" means that modes where the radio initially/unilaterally sends a signal (AP mesh and adhoc) are not allowed.

Run iw reg get to check the driver's country setting.

2 Likes