Hello everyone,
I am trying to integrate the Quectel FGH100M Wi-Fi HaLow module into an OpenWrt-based system (HLK-7628N / MT7628). The module is connected via the SPI interface. I have successfully compiled the manufacturer-provided drivers (fgh100m v1.16.4), but I am facing a serious incompatibility issue during the driver probe stage.
System Summary:
-
Hardware: HLK-7628N (MIPS 24kc)
-
Kernel: 6.12.80
-
Driver: Morse Micro fgh100m (based on Backport v6.18.7)
-
Interface: SPI (on spi0.1)
Problem:
The modules load without errors, but during the probe stage, the driver fails at the ieee80211_alloc_hw call with error -12 (ENOMEM) and aborts. This happens even though the system has around 77MB of free RAM.
From my own debugging, I observed that the size of struct ieee80211_hw is calculated as 160 bytes on the driver side. However, on a modern kernel like 6.12, this structure should be significantly larger. This suggests a mismatch between the driver’s internal backport headers and the running kernel’s headers.
Tests and Outputs:
1. Interface and Device Status:
The iw dev command returns nothing, and wlan1 does not appear in ip link. SPI devices are present, but driver binding fails:
root@OpenWrt:~# iw dev
root@OpenWrt:~# ls -l /sys/bus/spi/devices/
spi0.0 -> ../../../devices/platform/10000000.palmbus/10000b00.spi/spi_master/spi0/spi0.0
spi0.1 -> ../../../devices/platform/10000000.palmbus/10000b00.spi/spi_master/spi0/spi0.1
root@OpenWrt:~# ls -l /sys/bus/spi/drivers/morse_spi/
ls: /sys/bus/spi/drivers/morse_spi/: No such file or directory
2. Memory Status (proves it’s not a RAM issue):
root@OpenWrt:~# free -m
total used free shared buff/cache available
Mem: 123560 19360 77564 252 26636 66180
root@OpenWrt:~# cat /proc/meminfo | grep -i slab
Slab: 8764 kB
3. Module Version Info:
root@OpenWrt:~# modinfo mac80211 | grep -E "filename|vermagic"
filename: /lib/modules/6.12.80/mac80211.ko
vermagic: 6.12.80 mod_unload MIPS32_R2 32BIT
root@OpenWrt:~# modinfo morse | grep -E "filename|vermagic"
filename: /lib/modules/6.12.80/morse.ko
vermagic: 6.12.80 mod_unload MIPS32_R2 32BIT
4. Dmesg Logs:
[ 36.636094] Loading modules backported from Linux version v6.18.7-0-g5dfbc5357
[ 36.650529] Backport generated by backports.git c8a37ce
[ 37.911156] morse micro driver registration. Version 0-rel_1_16_4_2025_Sep_18
# Earlier logs: morse_spi spi0.1: ieee80211_alloc_hw failed with error -12
Summary:
The driver’s backport layer assumes it is running on kernel v6.18, while the actual kernel is v6.12. It appears that the ops structure or the total hardware size passed to ieee80211_alloc_hw is being rejected by the kernel.
My Question:
How can I force the driver to use the kernel’s native mac80211.h instead of its own backport headers? Or could there be another cause for this issue specific to the MIPS architecture?
I would greatly appreciate any insights or suggestions.
Thanks in advance!