Quectel FGH100M Wi-Fi HaLow (fgh100m) – ieee80211_alloc_hw failed (-12) Error (Kernel 6.12.80 / MT7628)

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!

root@OpenWrt:~# ls /sys/bus/spi/drivers/ 
morse_spi  spi-nor    spidev 
root@OpenWrt:~# ls -l /sys/bus/spi/devices/spi0.1/driver 
ls: /sys/bus/spi/devices/spi0.1/driver: No such file or directory 
root@OpenWrt:~# dmesg | grep -iE "morse|spi0.1" 
[   37.494334] Morse Micro Dot11ah driver registration. Version 0-rel_1_16_4_2025_Sep_18 
[   37.711407] morse micro driver registration. Version 0-rel_1_16_4_2025_Sep_18 
[   37.756541] Modules linked in: morse(O+) mac80211(O) dot11ah(O) cfg80211(O) spidev slhc nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6
 nf_defrag_ipv4 crc32c_generic libcrc32c crc_ccitt compat(O) seqiv sha3_generic jitterentropy_rng drbg hmac geniv rng cmac leds_gpio gpio_button_hotplug(O) 
[   38.049739] [<82a8adb8>] 0x82a8adb8 [morse@d57e4d8d+0x3b000] 
[   38.067872] [<82ab42f0>] 0x82ab42f0 [morse@d57e4d8d+0x3b000] 
[   38.175940] [<828cf000>] 0x828cf000 [morse@d57e4d8d+0x3b000] 
[   38.187160] [<828cf0e8>] 0x828cf0e8 [morse@d57e4d8d+0x3b000] 
[   38.198396] [<828cf000>] 0x828cf000 [morse@d57e4d8d+0x3b000] 
[   38.209616] [<828cf044>] 0x828cf044 [morse@d57e4d8d+0x3b000] 
[   38.220850] [<828cf000>] 0x828cf000 [morse@d57e4d8d+0x3b000] 
[   38.278899] morse_spi spi0.1: ieee80211_alloc_hw failed 
[   38.289455] morse_spi spi0.1: morse_mac_create failed 
[   38.299489] morse_spi spi0.1: probe with driver morse_spi failed with error -12 
root@OpenWrt:~# cat /sys/bus/spi/devices/spi0.1/modalias 
spi:mm610x-spi 
root@OpenWrt:~# free -h 
              total        used        free      shared  buff/cache   available 
Mem:         123560       18944       78012         256       26604       66612 
Swap:             0           0           0 
root@OpenWrt:~#