Re: [PATCH] wifi: ath12k: fix HE/EHT capability handling on big endian

From: Alexander Wilhelm

Date: Wed Mar 18 2026 - 03:18:56 EST


On Tue, Mar 17, 2026 at 05:17:43PM -0700, Jeff Johnson wrote:
> On 3/17/2026 3:59 AM, Alexander Wilhelm wrote:
> > Currently the driver uses u32 data types for the HE/EHT capabilities in
> > CPU‑native order. However, the ieee80211.h header defines these fields as
> > u8 arrays. This causes the ieee80211 registration failure on big‑endian
> > platforms, as shown in the following log:
> >
> > ath12k_pci 0001:01:00.0: BAR 0: assigned [mem 0xc00000000-0xc001fffff 64bit]
> > ath12k_pci 0001:01:00.0: MSI vectors: 1
> > ath12k_pci 0001:01:00.0: Hardware name: qcn9274 hw2.0
> > ath12k_pci 0001:01:00.0: qmi dma allocation failed (29360128 B type 1), will try later with small size
> > ath12k_pci 0001:01:00.0: memory type 10 not supported
> > ath12k_pci 0001:01:00.0: chip_id 0x0 chip_family 0xb board_id 0x1005 soc_id 0x401a2200
> > ath12k_pci 0001:01:00.0: fw_version 0x111300d6 fw_build_timestamp 2024-08-06 08:43 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.WBE.1.1.1-00214-QCAHKSWPL_SILICONZ-1
> > ath12k_pci 0001:01:00.0: leaving PCI ASPM disabled to avoid MHI M2 problems
> > ath12k_pci 0001:01:00.0: Invalid module id 2
> > ath12k_pci 0001:01:00.0: failed to parse tlv -22
> > ath12k_pci 0001:01:00.0: ieee80211 registration failed: -22
> > ath12k_pci 0001:01:00.0: failed register the radio with mac80211: -22
> > ath12k_pci 0001:01:00.0: failed to create pdev core: -22
> > ath12k_pci 0001:01:00.0: qmi failed set mode request, mode: 4, err = -110
> > ath12k_pci 0001:01:00.0: qmi failed to send wlan mode off
> >
> > Use the __le32 data type for the HE/EHT capabilities instead and avoid
> > swapping, so that both platform endiannesses are supported.
> >
> > Signed-off-by: Alexander Wilhelm <alexander.wilhelm@xxxxxxxxxxxx>
>
> With this series applied I see with make W=1 C=1:
> drivers/net/wireless/ath/ath12k/debugfs.c:413:65: warning: incorrect type in argument 1 (different base types)
> drivers/net/wireless/ath/ath12k/debugfs.c:413:65: expected unsigned int [usertype] v
> drivers/net/wireless/ath/ath12k/debugfs.c:413:65: got restricted __le32
>
> From existing code:
> f5c90ff80b4c0 (Sowmiya Sree Elavalagan 2025-01-30 11:41:04 +0530 413) extra_mcs_supported = u32_get_bits(cap_band->he_cap_info[1],

Sorry, I had `ATH12K_DEBUGFS` disabled when I ran the sparse check. I’ll
fix this in the next version.


Best regards
Alexander Wilhelm