Bug 201707

Summary: iwlwifi: 8260: joining an ad-hoc network causes ASSERT 4425
Product: Drivers Reporter: Rémy Grünblatt (remy+kernel+bugzilla)
Component: network-wirelessAssignee: DO NOT USE - assign "network-wireless-intel" component instead (linuxwifi)
Status: CLOSED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.18.16-arch1-1-ARCH Subsystem:
Regression: No Bisected commit-id:
Attachments: Dmesg log showing what happens when trying to create/join an ad-hoc network

Description Rémy Grünblatt 2018-11-16 09:40:49 UTC
Created attachment 279471 [details]
Dmesg log showing what happens when trying to create/join an ad-hoc network

Hi everyone,
I'm using ArchLinux ( Linux StateOfTheArt 4.18.16-arch1-1-ARCH #1 SMP PREEMPT Sat Oct 20 22:06:45 UTC 2018 x86_64 GNU/Linux ) and recently, I have been trying to join an ad-hoc network with my laptop ( Dell Inc. Precision 5520/06X96V, BIOS 1.6.2 11/12/2017 ). 

This sequence of command triggers the hardware restart of the intel wireless 8260 wnic (wlp2s0 being the name of the wireless interface):

    sudo ip link set wlp2s0 down
    sudo iw wlp2s0 set type ibss
    sudo ip link set wlp2s0 up
    sudo iw wlp2s0 ibss join Foo 2437

Attached is an excerpt of dmesg when this happens. When this happens, dmesg is "spammed" with many messages, causing the whole computer to slow down, so I have to rmmod iwlwifi and iwlmvm to makes it stop.

It seems it does not happen on the kernel 4.4.76-aero-1.3 on another machine ( some custom kernel provided by intel for their aero drone, see https://github.com/intel-aero/packages/tree/master/aero-kernel/patches-4.4 ), so I suspect it might be related to my hardware.
Comment 1 Rémy Grünblatt 2018-11-27 12:00:19 UTC
Similar bug on an Ubuntu 18.04.1 ( 4.15.0-39-generic #42-Ubuntu ) on another machine, with another (same model) card (ASSERT 0070 ?):

DMESG log:  https://ptpb.pw/y2Fh.txt
Comment 2 Johannes Berg 2019-02-19 15:18:41 UTC
I have a fix:

--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -2277,7 +2277,8 @@ int iwl_mvm_add_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
        static const u8 _maddr[] = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00};
        const u8 *maddr = _maddr;
        struct iwl_trans_txq_scd_cfg cfg = {
-               .fifo = IWL_MVM_TX_FIFO_MCAST,
+               .fifo = vif->type == NL80211_IFTYPE_AP ?
+                       IWL_MVM_TX_FIFO_MCAST : IWL_MVM_TX_FIFO_BE,
                .sta_id = msta->sta_id,
                .tid = 0,
                .aggregate = false,

will reach upstream per our regular process.