Bug 220029

Summary: [BISECTED] iwlwifi changes in 6.15.0-rc1 break Wi-Fi 6 AX200 on Dell 7390
Product: Drivers Reporter: Todd Brandt (todd.e.brandt)
Component: network-wireless-intelAssignee: Default virtual assignee for network-wireless-intel (drivers_network-wireless-intel)
Status: NEW ---    
Severity: normal CC: emmanuel.grumbach, kuurtb, val.zapod.vz
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: 6.15.0-rc1 Subsystem:
Regression: Yes Bisected commit-id: 75a3313f52b7e08e7e73746f69a68c2b7c28bb2b
Bug Depends on:    
Bug Blocks: 178231    
Attachments: dmesg-otcpl-dell-7390-cmlu.txt

Description Todd Brandt 2025-04-17 21:55:02 UTC
Created attachment 307981 [details]
dmesg-otcpl-dell-7390-cmlu.txt

Ever since 6.15.0-rc1 the AX200 wifi refuses to load on the otcpl-dell-7390-cmlu. The dmesg log show these errors:

[    6.123490] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[    6.157719] iwlwifi 0000:02:00.0: Detected crf-id 0x3617, cnv-id 0x100530 wfpm id 0x80000000
[    6.158003] iwlwifi 0000:02:00.0: PCI dev 2723/1653, rev=0x340, rfid=0x10a100
[    6.158009] iwlwifi: No config found for PCI dev 2723/1653, rev=0x340, rfid=0x10a100
[    6.158759] iwlwifi 0000:02:00.0: probe with driver iwlwifi failed with error -22

It should look like this (from 6.14.0):

[    5.711960] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[    5.740883] iwlwifi 0000:02:00.0: Detected crf-id 0x3617, cnv-id 0x100530 wfpm id 0x80000000
[    5.741006] iwlwifi 0000:02:00.0: PCI dev 2723/1653, rev=0x340, rfid=0x10a100
[    5.741013] iwlwifi 0000:02:00.0: Detected Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)
[    5.756090] iwlwifi 0000:02:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
[    5.756871] iwlwifi 0000:02:00.0: loaded firmware version 77.2753b721.0 cc-a0-77.ucode op_mode iwlmvm
[    6.540567] iwlwifi 0000:02:00.0: Detected RF HR B3, rfid=0x10a100
[    6.611332] iwlwifi 0000:02:00.0: base HW address: 3c:f0:11:37:98:35
[    6.665992] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
[    8.219622] iwlwifi 0000:02:00.0: Registered PHC clock: iwlwifi-PTP, with index: 0

I bisected it to this:

commit 75a3313f52b7e08e7e73746f69a68c2b7c28bb2b (HEAD, refs/bisect/bad)
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Wed Feb 5 14:55:42 2025 +0200

    wifi: iwlwifi: make no_160 more generic
    
    We'll have devices that are EHT capable but don't support 320 MHz and
    those devices look like the 320 MHz capable devices, but have distinct
    subsystem ID.
    We already had the same type of differentiation for HE devices that
    support 160 MHz or not.
    Enhance that mechanism and now the _IWL_DEV_INFO macro gets an
    indication whether the bandwidth should be limited for that specific
    device.
    The subsystem ID gives a binary answer about the bandwidth limitation
    and iwl_pci_find_dev_info() compares this to the list of _IWL_DEV_INFO
    entries.

I tried reverting the patch from 6.15.0-rc2 but it's too ingrained. Obviously there's something wrong with the identification string in drivers/net/wireless/intel/iwlwifi/pcie/drv.c

I haven't had a chance to debug it, but I'm hoping the solution is simple. I've attached the dmesg log with level 8 debug and iwlwifi.debug=0xf
Comment 1 Kurt Borja 2025-04-18 05:37:10 UTC
Hi Todd,

I have the same problem and I actually submitted a fix [1] more than two weeks ago, but I haven't received any comments. I'll leave it here so you can test it and hopefully a maintainer takes a look at it.

[1] https://lore.kernel.org/linux-wireless/D97AOGEOKCRX.2LAIZUEPNX2E@gmail.com

-- 
 ~ Kurt
Comment 2 Kurt Borja 2025-04-18 05:39:10 UTC
Apologies, that's the wrong link. Here is the correct one:

[1] https://lore.kernel.org/linux-wireless/20250329-wifi-fix-v1-1-d6360e78f091@gmail.com/
Comment 3 Todd Brandt 2025-04-18 18:55:39 UTC
Yea, basically the entire iwlwifi team is out this week. I'll give it a test.
Comment 4 val.zapod.vz 2025-04-18 21:28:50 UTC
There are other bugs with that commit with available fixes. E.g. this: 

https://bugzilla.kernel.org/show_bug.cgi?id=219114#c12
Comment 5 val.zapod.vz 2025-04-18 21:37:37 UTC
Oops, disregard this. Different commit. Check whether the bug is still there

https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git/log/?h=config-cleanup

git checkout 82d656e4fa337f124dbdca4885d2b81beb338fdb

make && make install

Reboot
Comment 6 Todd Brandt 2025-04-19 02:55:36 UTC
Your fix does work. It looks like they made a logic error typo with "bw_limit", it performs in the opposite way from "no_160" in 6.14.0, so an inversion seems right, and the comment seems to confirm that. Good catch!

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 93446c374008..555323341e7d 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1449,7 +1449,7 @@ iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
                 * !bw_limit to have a match.
                 */
                if (dev_info->bw_limit != IWL_CFG_BW_ANY &&
-                   (dev_info->bw_limit == IWL_CFG_BW_NO_LIM) == !!bw_limit)
+                   (dev_info->bw_limit == IWL_CFG_BW_NO_LIM) == !bw_limit)
                        continue;
 
                if (dev_info->cores != (u8)IWL_CFG_ANY &&

Tested-by: Todd Brandt <todd.e.brandt@intel.com>
Comment 8 Kurt Borja 2025-04-19 05:50:21 UTC
(In reply to val.zapod.vz from comment #7)
> That patch cannot be applied on top of Intel repo, cause the lines got
> deleted nowadays
> https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git/
> tree/drivers/net/wireless/intel/iwlwifi/pcie/drv.c?h=config-
> cleanup&id=e72a96793b24622968fdc4bc7200069b43a9397a

The patch can be applied on top of the latest commit of Linus's tree. It seems though the backport tree fixed the problem too (without a Fixes tag though).

I don't really know about the iwlwifi development process but maintainers will know how to best proceed here.

Thanks for the info.

(In reply to Todd Brandt from comment #6)
...
> Tested-by: Todd Brandt <todd.e.brandt@intel.com>

Thanks for testing! I'm going to inline it in v2, apologies for not Cc'ing you.

Link to v2: https://lore.kernel.org/r/20250418-probe-fix-v2-1-ec1ef2d8a534@gmail.com