Custom Wi-Fi module kernel mismatch

I have a Mikrotik RBM33G running openWRT 25.12.5. I have added a Wi-Fi card pulled out from a broken laptop:

# lspci
01:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)

It doesn't get bound by driver, possibly because it's a laptop card, as suggested here:

So I went and downloaded openWRT 25.12.5 source code and built new drivers, paying attention to enable PC OEM (CONFIG_ATH9K_SUPPORT_PCOEM=y). I was pretty rusty on building kernels (15 years since last time) so it took me 2 days but I seemingly managed to build them:
kmod-ath9k-6.12.94.6.18.26-r1.apk
kmod-ath9k-common-6.12.94.6.18.26-r1.apk
kmod-ath-6.12.94.6.18.26-r1.apk
kmod-cfg80211-6.12.94.6.18.26-r1.apk
kmod-mac80211-6.12.94.6.18.26-r1.apk

Sadly I can not install them due to kernel mismatch:

ERROR: unable to select packages:
  kernel-6.12.94~35fb64ea09ee15c2f267bd5436b7f178-r1:
    breaks: kmod-cfg80211-6.12.94.6.18.26-r1[kernel=6.12.94~e11515ba559ab3e20e40da5aa29dd6f5-r1]

From my poor understanding, my openWRT is running this kernel:
kernel-6.12.94~35fb64ea09ee15c2f267bd5436b7f178-r1

While I built the modules against this kernel:
kernel-6.12.94~e11515ba559ab3e20e40da5aa29dd6f5-r1

So, which openWRT source should I download? I spent 2 days on this so my brain is cooked and I now that I have to start over again I can not properly navigate https://git.openwrt.org/openwrt/openwrt due to continuous 502 bad gateway.

Why are you compiling, aren't those modules already in the package repo ?

If you really want custom, you need to provide all kmods yourself, or search for vermagic.

Because it's a laptop Wi-Fi card and it may not work with openWRT, due to energy profile or something (see link: Wireless Card Atheros AR9565 - #7 by neheb); so I thought about building them from source with more options enabled.

Is there a guide for troubleshooting Wi-Fi issues in the wiki?

You're referencing an 8 yo thread.

Try the existing kmods before you take the long route ?

you need to force install it. custom kernel modules are annoying.

The kernel rejects any any version missmatch.
You can force loading modules via
insmod -f $module

but please aware, this is not (officially) supported.
Minor variances, i.,e v6.12.92 to v6.12.94 may break you system in any way.

Also you can use the OpenWRT mirror at

tl;dr: Don't try to build individual modules, always build the whole firmware image (with everything included =y) and flash/ sysupgrade that.

I am stuck and have no clue what else to check. I have installed:
# apk add kmod-ath9k kmod-ath9k-common kmod-ath kmod-cfg80211 kmod-mac80211
and restarted, still no wireless.

Wireless card exist (why wrong ID on PCIe bridge?):
# lspci -vmmnn
Slot:	00:01.0
Class:	PCI bridge [0604]
Vendor:	MediaTek Inc. (Wrong ID) [0e8d]
Device:	MT7621 PCIe Bridge [0801]
Rev:	01
ProgIf:	00
DTNode:	/sys/firmware/devicetree/base/pcie@1e140000/pcie@1,0

Slot:	01:00.0
Class:	Network controller [0280]
Vendor:	Qualcomm Atheros [168c]
Device:	QCA9565 / AR9565 Wireless Network Adapter [0036]
SVendor:	Lite-On Communications Inc [11ad]
SDevice:	Device [0642]
Rev:	01
ProgIf:	00
# lspci -nn
00:01.0 PCI bridge [0604]: MediaTek Inc. (Wrong ID) MT7621 PCIe Bridge [0e8d:0801] (rev 01)
01:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01)
There is an error in MediaTek MT621 PCIe Bridge, no clue on how relevant it is. I also see no driver in use for Qualcomm Atheros wireless adapter:
# lspci -nnk
00:01.0 PCI bridge [0604]: MediaTek Inc. (Wrong ID) MT7621 PCIe Bridge [0e8d:0801] (rev 01)
lspci: Unable to load libkmod resources: error -2
01:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01)
	Subsystem: Lite-On Communications Inc Device [11ad:0642]
More lspci info, using strace:
# strace -e file lspci -vvv | grep ENOENT
execve("/usr/bin/lspci", ["lspci", "-vvv"], 0x7f75364c /* 14 vars */) = 0
open("/etc/ld-musl-mipsel-sf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libpci.so.3", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libpci.so.3", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpci.so.3", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=45954, ...}) = 0
open("/lib/libkmod.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libkmod.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libkmod.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=62299, ...}) = 0
open("/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=131359, ...}) = 0
open("/lib/libz.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libz.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libz.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=57630, ...}) = 0
access("/sys/bus/pci", R_OK)            = 0
open("/sys/bus/pci/devices", O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = 3
open("/sys/bus/pci/devices/0000:01:00.0/config", O_RDONLY|O_LARGEFILE) = 3
open("/sys/bus/pci/devices/0000:01:00.0/vendor", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:01:00.0/device", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:01:00.0/class", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:01:00.0/revision", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:01:00.0/subsystem_vendor", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:01:00.0/subsystem_device", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/config", O_RDONLY|O_LARGEFILE) = 3
open("/sys/bus/pci/devices/0000:00:01.0/vendor", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/device", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/class", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/revision", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/subsystem_vendor", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/subsystem_device", O_RDONLY|O_LARGEFILE) = 4
open("/usr/share/hwdata/pci.ids", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/label", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:00:01.0/irq", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:00:01.0/resource", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/slots", O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = 4
open("/sys/bus/pci/devices/0000:00:01.0/numa_node", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
readlink("/sys/bus/pci/devices/0000:00:01.0/iommu_group", 0x7fef641c, 1024) = -1 ENOENT (No such file or directory)
readlink("/sys/bus/pci/devices/0000:00:01.0/of_node", "../../../../../firmware/devicetr"..., 1024) = 62
readlink("/sys", 0x7fef53c0, 4004)      = -1 EINVAL (Invalid argument)
readlink("/sys/bus", 0x7fef53c0, 4008)  = -1 EINVAL (Invalid argument)
readlink("/sys/bus/pci", 0x7fef53c0, 4012) = -1 EINVAL (Invalid argument)
readlink("/sys/bus/pci/devices", 0x7fef53c0, 4020) = -1 EINVAL (Invalid argument)
readlink("/sys/bus/pci/devices/0000:00:01.0", "../../../devices/platform/1e1400"..., 4033) = 63
readlink("/sys/bus/pci/devices/..", 0x7fef53c0, 3972) = -1 EINVAL (Invalid argument)
readlink("/sys/devices", 0x7fef53c0, 3986) = -1 EINVAL (Invalid argument)
readlink("/sys/devices/platform", 0x7fef53c0, 3995) = -1 EINVAL (Invalid argument)
readlink("/sys/devices/platform/1e140000.pcie", 0x7fef53c0, 4009) = -1 EINVAL (Invalid argument)
readlink("/sys/devices/platform/1e140000.pcie/pci0000:00", 0x7fef53c0, 4020) = -1 EINVAL (Invalid argument)
readlink("/sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0", 0x7fef53c0, 4033) = -1 EINVAL (Invalid argument)
readlink("/sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0/..", 0x7fef53c0, 4036) = -1 EINVAL (Invalid argument)
readlink("/sys/firmware", 0x7fef53c0, 4057) = -1 EINVAL (Invalid argument)
readlink("/sys/firmware/devicetree", 0x7fef53c0, 4068) = -1 EINVAL (Invalid argument)
readlink("/sys/firmware/devicetree/base", 0x7fef53c0, 4073) = -1 EINVAL (Invalid argument)
readlink("/sys/firmware/devicetree/base/pcie@1e140000", 0x7fef53c0, 4087) = -1 EINVAL (Invalid argument)
readlink("/sys/firmware/devicetree/base/pcie@1e140000/pcie@1,0", 0x7fef53c0, 4096) = -1 EINVAL (Invalid argument)
open("/sys/bus/pci/devices/0000:00:01.0/rcd_link_cap", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:00:01.0/rcd_link_ctrl", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:00:01.0/rcd_link_status", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
readlink("/sys/bus/pci/devices/0000:00:01.0/driver", 0x7fef63f4, 1024) = -1 ENOENT (No such file or directory)
open("/sys/module/compression", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/etc/modprobe.d", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 0x7fef5600) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/run/modprobe.d", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 0x7fef5600) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/usr/local/lib/modprobe.d", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 0x7fef5600) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/usr/lib/modprobe.d", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 0x7fef5600) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/lib/modprobe.d", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 0x7fef5600) = -1 ENOENT (No such file or directory)
open("/lib/modules/6.12.94/modules.softdep", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/proc/cmdline", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
open("/lib/modules/6.12.94/modules.dep.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
lspci: Unable to load libkmod resources: error -2
open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
open("/root/.cache/pci-ids", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:01:00.0/label", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:01:00.0/irq", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:01:00.0/resource", O_RDONLY|O_LARGEFILE) = 4
open("/sys/bus/pci/devices/0000:01:00.0/numa_node", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
readlink("/sys/bus/pci/devices/0000:01:00.0/iommu_group", 0x7fef641c, 1024) = -1 ENOENT (No such file or directory)
readlink("/sys/bus/pci/devices/0000:01:00.0/of_node", 0x7fef641c, 1024) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:01:00.0/rcd_link_cap", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:01:00.0/rcd_link_ctrl", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:01:00.0/rcd_link_status", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/sys/bus/pci/devices/0000:01:00.0/config", O_RDONLY|O_LARGEFILE) = 3
readlink("/sys/bus/pci/devices/0000:01:00.0/driver", 0x7fef63f4, 1024) = -1 ENOENT (No such file or directory)
+++ exited with 0 +++
Device doesn't pop up:
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
3: wan: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 11:22:33:44:55:66 brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 22:33:44:55:66:77 brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 22:33:44:55:66:77 brd ff:ff:ff:ff:ff:ff
6: wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 33:44:55:66:77:88 brd ff:ff:ff:ff:ff:ff
7: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 22:33:44:55:66:77 brd ff:ff:ff:ff:ff:ff
# ls -l /sys/class/net/
lrwxrwxrwx    1 root     root             0 Aug 18 18:29 br-lan -> ../../devices/virtual/net/br-lan
lrwxrwxrwx    1 root     root             0 Jan  1  1970 eth0 -> ../../devices/platform/1e100000.ethernet/net/eth0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan1 -> ../../devices/platform/1e100000.ethernet/mdio_bus/mdio-bus/mdio-bus:1f/net/lan1
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan2 -> ../../devices/platform/1e100000.ethernet/mdio_bus/mdio-bus/mdio-bus:1f/net/lan2
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx    1 root     root             0 Jan  1  1970 wan -> ../../devices/platform/1e100000.ethernet/net/wan
lrwxrwxrwx    1 root     root             0 Aug 18 18:29 wwan0 -> ../../devices/platform/1e1c0000.xhci/usb1/1-2/1-2:2.0/net/wwan0
Cannot configure wireless:
# uci show wireless
# wifi config
Relevant modules seem to be loaded:
# lsmod
ath                    24576  3 ath9k,ath9k_common,ath9k_hw
ath9k                 106496  0 
ath9k_common           24576  1 ath9k
ath9k_hw              352256  2 ath9k,ath9k_common
ath9k_pci_owl_loader   12288  0 
authenc                12288  2 crypto_hw_eip93,authencesn
authencesn             12288  0 
cdc_ether              12288  1 cdc_ncm
cdc_mbim               12288  0 
cdc_ncm                20480  1 cdc_mbim
cdc_wdm                16384  3 cdc_mbim,qmi_wwan
cfg80211              344064  4 ath9k,ath9k_common,ath,mac80211
cmac                   12288  0 
compat                 12288  5 ath9k,ath9k_common,mac80211,cfg80211,ath9k_pci_owl_loader
cqhci                  20480  1 mtk_sd
crc_ccitt              12288  1 ppp_async
crc32c_generic         12288  3 
crypto_hw_eip93        40960  0 
des_generic            12288  0 
drbg                   24576  0 
ext4                  491520  1 
fuse                  114688  0 
geniv                  12288  1 seqiv
gpio_button_hotplug    12288  0 
hmac                   12288  0 
jbd2                   69632  1 ext4
jitterentropy_rng      16384  0 
leds_gpio              12288  0 
libcrc32c              12288  1 nf_tables
libdes                 24576  2 crypto_hw_eip93,des_generic
mac80211              679936  1 ath9k
mbcache                12288  1 ext4
md5                    12288  0 
mii                    16384  1 usbnet
mmc_block              36864  1 
mmc_core              102400  4 mtk_sd,mmc_block,cqhci,mmc_hsq
mmc_hsq                12288  1 mtk_sd
mtk_sd                 36864  0 
nf_conntrack           90112  7 nft_redir,nft_nat,nft_masq,nft_flow_offload,nft_ct,nf_nat,nf_flow_table
nf_defrag_ipv4         12288  1 nf_conntrack
nf_defrag_ipv6         16384  1 nf_conntrack
nf_flow_table          32768  2 nf_flow_table_inet,nft_flow_offload
nf_flow_table_inet     12288  0 
nf_log_syslog          20480  0 
nf_nat                 36864  4 nft_redir,nft_nat,nft_masq,nft_chain_nat
nf_reject_ipv4         12288  2 nft_reject_ipv4,nft_reject_inet
nf_reject_ipv6         16384  2 nft_reject_ipv6,nft_reject_inet
nf_tables             212992207 nft_fib_inet,nf_flow_table_inet,nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet,nft_reject,nft_redir,nft_quota,nft_numgen,nft_nat,nft_masq,nft_log,nft_limit,nft_hash,nft_flow_offload,nft_fib_ipv6,nft_fib_ipv4,nft_fib,nft_ct,nft_chain_nat
nfnetlink              16384  1 nf_tables
nft_chain_nat          12288  2 
nft_ct                 20480  4 
nft_fib                12288  3 nft_fib_inet,nft_fib_ipv6,nft_fib_ipv4
nft_fib_inet           12288  0 
nft_fib_ipv4           12288  1 nft_fib_inet
nft_fib_ipv6           12288  1 nft_fib_inet
nft_flow_offload       12288  0 
nft_hash               12288  0 
nft_limit              12288  5 
nft_log                12288  0 
nft_masq               12288  1 
nft_nat                12288  0 
nft_numgen             12288  0 
nft_quota              12288  0 
nft_redir              12288  0 
nft_reject             12288  3 nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet
nft_reject_inet        12288  2 
nft_reject_ipv4        12288  0 
nft_reject_ipv6        12288  0 
nls_base               12288  1 usbcore
option                 49152  0 
ppp_async              16384  0 
ppp_generic            36864  3 pppoe,ppp_async,pppox
pppoe                  20480  0 
pppox                  12288  1 pppoe
qcserial               12288  0 
qmi_helpers            20480  0 
qmi_wwan               24576  0 
rng                    12288  3 jitterentropy_rng,drbg,geniv
scsi_common            12288  3 usb_storage,sd_mod,scsi_mod
scsi_mod              106496  2 usb_storage,sd_mod
sd_mod                 45056  0 
seqiv                  12288  0 
sha1_generic           12288  0 
sha256_generic         12288  0 
sha3_generic           16384  0 
sha512_generic         16384  0 
slhc                   16384  1 ppp_generic
usb_common             12288  3 xhci_plat_hcd,xhci_hcd,usbcore
usb_storage            49152  0 
usb_wwan               12288  2 qcserial,option
usbcore               163840 16 qcserial,option,cdc_mbim,usb_wwan,qmi_wwan,cdc_ncm,cdc_ether,usbserial,usbnet,cdc_wdm,usb_storage,xhci_plat_hcd,xhci_pci,xhci_mtk_hcd,xhci_hcd
usbnet                 24576  4 cdc_mbim,qmi_wwan,cdc_ncm,cdc_ether
usbserial              24576  3 qcserial,option,usb_wwan
xhci_hcd              122880  3 xhci_plat_hcd,xhci_pci,xhci_mtk_hcd
xhci_mtk_hcd           20480  0 
xhci_pci               16384  0 
xhci_plat_hcd          12288  0 
Checking modules in /proc:
# cat /proc/modules
ath9k 106496 0 - Live 0x83ec0000 (O)
ath9k_common 24576 1 ath9k, Live 0x83bd8000 (O)
qcserial 12288 0 - Live 0x83ab3000
pppoe 20480 0 - Live 0x83dbc000
ppp_async 16384 0 - Live 0x838d6000
option 49152 0 - Live 0x83aaf000
nft_fib_inet 12288 0 - Live 0x83b29000
nf_flow_table_inet 12288 0 - Live 0x8304a000
cdc_mbim 12288 0 - Live 0x82d42000
ath9k_hw 352256 2 ath9k,ath9k_common, Live 0x83fc0000 (O)
ath 24576 3 ath9k,ath9k_common,ath9k_hw, Live 0x83f94000 (O)
usb_wwan 12288 2 qcserial,option, Live 0x83ce3000
qmi_wwan 24576 0 - Live 0x83b540
pppox 12288 1 pppoe, Live 0x83ce9000
ppp_generic 36864 3 pppoe,ppp_async,pppox, Live 0x83de0000
nft_reject_ipv6 12288 0 - Live 0x83cde000
nft_reject_ipv4 12288 0 - Live 0x83cd8000
nft_reject_inet 12288 2 - Live 0x83f34000
nft_reject 12288 3 nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet, Live 0x83cd5000
nft_redir 12288 0 - Live 0x83f3c000
nft_quota 12288 0 - Live 0x83cd4000
nft_numgen 12288 0 - Live 0x83b38000
nft_nat 12288 0 - Live 0x83a9f000
nft_masq 12288 1 - Live 0x83b45000
nft_log 12288 0 - Live 0x83ab2000
nft_limit 12288 5 - Live 0x83b13000
nft_hash 12288 0 - Live 0x83d3d000
nft_flow_offload 12288 0 - Live 0x83d38000
nft_fib_ipv6 12288 1 nft_fib_inet, Live 0x83d32000
nft_fib_ipv4 12288 1 nft_fib_inet, Live 0x8339c000
nft_fib 12288 3 nft_fib_inet,nft_fib_ipv6,nft_fib_ipv4, Live 0x83878000
nft_ct 20480 4 - Live 0x83d1c000
nft_chain_nat 12288 2 - Live 0x83ccd000
nf_tables 212992 207 nft_fib_inet,nf_flow_table_inet,nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet,nft_reject,nft_redir,nft_quota,nft_numgen,nft_nat,nft_masq,nft_log,nft_limit,nft_hash,nft_flow_offload,nft_fib_ipv6,nft_fib_ipv4,nft_fib,nft_ct,nft_chain_nat, Live 0x83f00000
nf_nat 36864 4 nft_redir,nft_nat,nft_masq,nft_chain_nat, Live 0x83d98000
nf_flow_table 32768 2 nf_flow_table_inet,nft_flow_offload, Live 0x83d90000
nf_conntrack 90112 7 nft_redir,nft_nat,nft_masq,nft_flow_offload,nft_ct,nf_nat,nf_flow_table, Live 0x83d20000
mac80211 679936 1 ath9k, Live 0x83e00000 (O)
cfg80211 344064 4 ath9k,ath9k_common,ath,mac80211, Live 0x83c80000 (O)
cdc_ncm 20480 1 cdc_mbim, Live 0x83c08000
cdc_ether 12288 1 cdc_ncm, Live 0x83bba000
ath9k_pci_owl_loader 12288 0 - Live 0x83b77000 (O)
usbserial 24576 3 qcserial,option,usb_wwan, Live 0x833b4000
usbnet 24576 4 cdc_mbim,qmi_wwan,cdc_ncm,cdc_ether, Live 0x83c04000
slhc 16384 1 ppp_generic, Live 0x83aee000
qmi_helpers 20480 0 - Live 0x83c00000 (O)
nfnetlink 16384 1 nf_tables, Live 0x833aa000
nf_reject_ipv6 16384 2 nft_reject_ipv6,nft_reject_inet, Live 0x83aac000
nf_reject_ipv4 12288 2 nft_reject_ipv4,nft_reject_inet, Live 0x83b91000
nf_log_syslog 20480 0 - Live 0x83bdc000
nf_defrag_ipv6 16384 1 nf_conntrack, Live 0x83bd6000
nf_defrag_ipv4 12288 1 nf_conntrack, Live 0x83b90000
libcrc32c 12288 1 nf_tables, Live 0x83b96000
crc_ccitt 12288 1 ppp_async, Live 0x83ba1000
compat 12288 5 ath9k,ath9k_common,mac80211,cfg80211,ath9k_pci_owl_loader, Live 0x83ba2000 (O)
cdc_wdm 16384 3 cdc_mbim,qmi_wwan, Live 0x83b8a000
fuse 114688 0 - Live 0x83be0000
mii 16384 1 usbnet, Live 0x83b80000
sha512_generic 16384 0 - Live 0x83b5e000
sha256_generic 12288 0 - Live 0x83b6b000
sha1_generic 12288 0 - Live 0x83b66000
seqiv 12288 0 - Live 0x83a4d000
sha3_generic 16384 0 - Live 0x83b2a000
jitterentropy_rng 16384 0 - Live 0x83b1a000
drbg 24576 0 - Live 0x83b1c000
md5 12288 0 - Live 0x82eda000
crypto_hw_eip93 40960 0 - Live 0x83914000
hmac 12288 0 - Live 0x83a88000
geniv 12288 1 seqiv, Live 0x838da000
rng 12288 3 jitterentropy_rng,drbg,geniv, Live 0x838ef000
des_generic 12288 0 - Live 0x833c5000
libdes 24576 2 crypto_hw_eip93,des_generic, Live 0x82ff0000
cmac 12288 0 - Live 0x83aa4000
authencesn 12288 0 - Live 0x832a6000
authenc 12288 2 crypto_hw_eip93,authencesn, Live 0x833cc000
mtk_sd 36864 0 - Live 0x83908000
mmc_block 36864 1 - Live 0x83900000
cqhci 20480 1 mtk_sd, Live 0x83334000
usb_storage 49152 0 - Live 0x838f0000
mmc_hsq 12288 1 mtk_sd, Live 0x8301c000
mmc_core 102400 4 mtk_sd,mmc_block,cqhci,mmc_hsq, Live 0x838c0000
sd_mod 45056 0 - Live 0x833f8000
scsi_mod 106496 2 usb_storage,sd_mod, Live 0x838a0000
scsi_common 12288 3 usb_storage,sd_mod,scsi_mod, Live 0x83376000
ext4 491520 1 - Live 0x83800000
mbcache 12288 1 ext4, Live 0x8307c000
jbd2 69632 1 ext4, Live 0x83340000
leds_gpio 12288 0 - Live 0x82f48000
xhci_plat_hcd 12288 0 - Live 0x82f4f000
xhci_pci 16384 0 - Live 0x83040000
xhci_mtk_hcd 20480 0 - Live 0x83000000
xhci_hcd 122880 3 xhci_plat_hcd,xhci_pci,xhci_mtk_hcd, Live 0x83020000
gpio_button_hotplug 12288 0 - Live 0x81ed8000 (O)
usbcore 163840 16 qcserial,option,cdc_mbim,usb_wwan,qmi_wwan,cdc_ncm,cdc_ether,usbserial,usbnet,cdc_wdm,usb_storage,xhci_plat_hcd,xhci_pci,xhci_mtk_hcd,xhci_hcd, Live 0x82fc0000
nls_base 12288 1 usbcore, Live 0x82f1d000
usb_common 12288 3 xhci_plat_hcd,xhci_hcd,usbcore, Live 0x82f18000
crc32c_generic 12288 3 - Live 0x82f11000
Checking PCI drivers:
# ls /sys/bus/pci/drivers/
ath9k                 ath9k_pci_owl_loader  xhci_hcd
Checking device-driver bind:
# lspci -k -s 01:00.0
01:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
	Subsystem: Lite-On Communications Inc Device 0642
lspci: Unable to load libkmod resources: error -2
Checking firmware in device tree (why wrong ID on PCIe bridge)?):
# lspci -vmmnn
Slot:	00:01.0
Class:	PCI bridge [0604]
Vendor:	MediaTek Inc. (Wrong ID) [0e8d]
Device:	MT7621 PCIe Bridge [0801]
Rev:	01
ProgIf:	00
DTNode:	/sys/firmware/devicetree/base/pcie@1e140000/pcie@1,0

Slot:	01:00.0
Class:	Network controller [0280]
Vendor:	Qualcomm Atheros [168c]
Device:	QCA9565 / AR9565 Wireless Network Adapter [0036]
SVendor:	Lite-On Communications Inc [11ad]
SDevice:	Device [0642]
Rev:	01
ProgIf:	00

installed hostapd and perhaps wpa_supplicant too ... ?

If You are using official release firmware downloaded form OpenWrt, there's easy way to rebuild wireless drivers and be compatible with that firmware (You can even patch some things if they relate only to that driver). Just download SDK of the release You are using, unpack run make (adjust the jobs to Your preferences), so the SDK mandatory packages get built first. Then update feeds and install mac80211 package from feeds. Issue menuconfig and select ath9k OEM support, then run make to build modules. You should end up with all necessary modules modified easily installable on release firmware.

Aside from building, the easiest way to check if WiFi is properly recognized is running iw list, it'll show You all radios capabilities detected in the system. Also make sure to inspect kernel log for PCI initialization woes.

To make things short

why no dmesg ?
why no lspci with proper pci device id's ?

maybe entries in sysfs will help too

ls /sys/bus/pci/devices/ -l
ls /sys/class/ieee80211/ -l

AGAIN
It's easier to build a new firmware.

If the PCIe ID is wrong, and you realy know (I mean realy !) what you are doing, there is some other way to convice the kernel to use this driver with this ID

The ids are in the latest post from @Kamchatka , and per them the module is supported https://github.com/torvalds/linux/blob/master/drivers/net/wireless/ath/ath9k/pci.c#L617. So, either CONFIG_ATH9K_SUPPORT_PCOEM is not enabled in driver or there's problem with initializing hardware, which can be PCI bridge incompatibility or fried WiFi module. Kernel log / dmesg maybe has some clues on the problems.

Thank you all for the suggestions. I also have snatched from a dead laptop an Intel Dual Band Wireless-AC 3160 (3160NGW) (VEN_ID:DEV_ID = 8086:08b4)
How do I check if iwlwifi-firmware-iwl3160 and kmod-iwlwifi support it?
If it looks better supporrted than the Qualcomm Atheros QCA9565 / AR9565 I would go for it.



I flashed over to start anew, I indeed installed wpa_supplicant but not hostapd; I installed hostapd as well, but from LuCI it doesn't show as installed, only hostapd-common and hostapd-basic-mbedtls, but not hostapd itself; using apk add hostapd changes nothing.



Could you kindly point me to the right SDK, so I can avoid a kernel mismatch?
I have read these, but I have no clue on exactly which SDK I should download:

Regarding iw list, no result:

# iw list
#


Regarding dmesg: I didn't post it because the only relevant lines I could find in dmesg I also could find elsewhere:

[    1.114217] pci 0000:01:00.0: [168c:0036] type 00 class 0x028000 PCIe Endpoint
[    1.121460] pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x0007ffff 64bit]
[    1.127896] pci 0000:01:00.0: ROM [mem 0x00000000-0x0000ffff pref]
[    1.134092] pci 0000:01:00.0: supports D1 D2
[    1.138299] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold

Regarding lspci with device ID, they were inside strace, posted previously.

This being said, here what you suggested:

ls /sys/bus/pci/devices/ -l
# ls /sys/bus/pci/devices/ -l
lrwxrwxrwx    1 root     root             0 Jan  1  1970 0000:00:01.0 -> ../../../devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 0000:01:00.0 -> ../../../devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0
# ls /sys/class/ieee80211/ -l
dmesg
# dmesg
[    0.000000] Linux version 6.12.94 (builder@buildhost) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 14.3.0 r33051-f5dae5ece4) 14.3.0, GNU ld (GNU Binutils) 2.44) #0 SMP Mon Jun 29 12:59:20 2026
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: legacy bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is MikroTik RouterBOARD M33G
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT
[    0.000000] percpu: Embedded 13 pages/cpu s22928 r8192 d22128 u53248
[    0.000000] pcpu-alloc: s22928 r8192 d22128 u53248 alloc=13*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=00012428
[    0.000000] Readback ErrCtl register=00012428
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65536
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.000000] NR_IRQS: 256
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000005] sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
[    0.008052] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.066200] pid_max: default: 32768 minimum: 301
[    0.080911] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.088128] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.106286] rcu: Hierarchical SRCU implementation.
[    0.111014] rcu: 	Max phase no-delay instances is 1000.
[    0.116740] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[    0.125507] smp: Bringing up secondary CPUs ...
[    0.131030] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.131059] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.131076] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.131203] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.192504] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.192531] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.192545] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.192650] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.252477] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.252501] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.252515] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.252628] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.311643] smp: Brought up 1 node, 4 CPUs
[    0.392187] Memory: 245704K/262144K available (8771K kernel code, 651K rwdata, 1088K rodata, 1252K init, 236K bss, 14804K reserved, 0K cma-reserved)
[    0.411955] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.421782] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.434415] pinctrl core: initialized pinctrl subsystem
[    0.442722] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.449356] thermal_sys: Registered thermal governor 'step_wise'
[    0.452447] /pinctrl: Fixed dependency cycle(s) with /pinctrl/pinctrl0
[    0.470343] FPU Affinity set after 11720 emulations
[    0.487523] clocksource: Switched to clocksource GIC
[    0.502460] NET: Registered PF_INET protocol family
[    0.507601] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.516619] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.524992] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.532692] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.540352] TCP bind hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.547603] TCP: Hash tables configured (established 2048 bind 2048)
[    0.554515] MPTCP token hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.562068] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.568579] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.576526] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.582237] PCI: CLS 0 bytes, default 32
[    0.589502] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.598222] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.603968] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.618744] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.629504] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.635489] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.641464] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.647706] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    0.654345] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    0.663125] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0060000000
[    0.671241] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    1.007517] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[    1.014413] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    1.021388] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    1.026363] PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    1.033527] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    1.039855] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.045258] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.052112] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    1.058436] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400 PCIe Root Port
[    1.065662] pci 0000:00:01.0: BAR 0 [mem 0x00000000-0x7fffffff]
[    1.071579] pci 0000:00:01.0: BAR 1 [mem 0x60200000-0x6020ffff]
[    1.077406] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.082362] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.088405] pci 0000:00:01.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.095117] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.102378] pci 0000:00:01.0: supports D1
[    1.106297] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.114217] pci 0000:01:00.0: [168c:0036] type 00 class 0x028000 PCIe Endpoint
[    1.121460] pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x0007ffff 64bit]
[    1.127896] pci 0000:01:00.0: ROM [mem 0x00000000-0x0000ffff pref]
[    1.134092] pci 0000:01:00.0: supports D1 D2
[    1.138299] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.145161] pci 0000:00:01.0: PCI bridge to [bus 01-ff]
[    1.150370] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.156933] pci 0000:00:01.0: BAR 0 [mem size 0x80000000]: can't assign; no space
[    1.164368] pci 0000:00:01.0: BAR 0 [mem size 0x80000000]: failed to assign
[    1.171289] pci 0000:00:01.0: bridge window [mem 0x60000000-0x600fffff]: assigned
[    1.178731] pci 0000:00:01.0: bridge window [mem 0x60100000-0x601fffff pref]: assigned
[    1.186559] pci 0000:00:01.0: BAR 1 [mem 0x60200000-0x6020ffff]: assigned
[    1.193357] pci 0000:00:01.0: bridge window [io  0x0000-0x0fff]: assigned
[    1.200107] pci 0000:01:00.0: BAR 0 [mem 0x60000000-0x6007ffff 64bit]: assigned
[    1.207336] pci 0000:01:00.0: ROM [mem 0x60100000-0x6010ffff pref]: assigned
[    1.214364] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.219288] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.225298] pci 0000:00:01.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.232080] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.239265] pci_bus 0000:00: Some PCI device resources are unassigned, try booting with pci=realloc
[    1.248258] pci_bus 0000:00: resource 4 [mem 0x60000000-0x6fffffff]
[    1.254436] pci_bus 0000:00: resource 5 [io  0x0000-0xffff]
[    1.260004] pci_bus 0000:01: resource 0 [io  0x0000-0x0fff]
[    1.265496] pci_bus 0000:01: resource 1 [mem 0x60000000-0x600fffff]
[    1.271754] pci_bus 0000:01: resource 2 [mem 0x60100000-0x601fffff pref]
[    1.280353] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    1.294765] printk: legacy console [ttyS0] disabled
[    1.300503] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    1.309610] printk: legacy console [ttyS0] enabled
[    1.319108] printk: legacy bootconsole [early0] disabled
[    1.333149] 1e000e00.uartlite3: ttyS1 at MMIO 0x1e000e00 (irq = 19, base_baud = 3125000) is a 16550A
[    1.346447] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    1.353327] 1 fixed-partitions partitions found on MTD device spi0.0
[    1.360168] Creating 1 MTD partitions on "spi0.0":
[    1.364975] 0x000000000000-0x000000040000 : "RouterBoot"
[    1.372872] 5 routerbootpart partitions found on MTD device RouterBoot
[    1.379461] Creating 5 MTD partitions on "RouterBoot":
[    1.384591] 0x000000000000-0x00000000f000 : "bootloader1"
[    1.391101] 0x00000000f000-0x000000010000 : "hard_config"
[    1.398356] 0x000000010000-0x00000001f000 : "bootloader2"
[    1.405143] 0x000000020000-0x000000021000 : "soft_config"
[    1.411614] 0x000000030000-0x000000031000 : "bios"
[    1.422737] 1 fixed-partitions partitions found on MTD device spi0.1
[    1.429600] Creating 1 MTD partitions on "spi0.1":
[    1.434405] 0x000000040000-0x000001000000 : "firmware"
[    1.441412] 2 minor-fw partitions found on MTD device firmware
[    1.447256] Creating 2 MTD partitions on "firmware":
[    1.452275] 0x000000000000-0x000000340000 : "kernel"
[    1.458356] 0x000000340000-0x000000fc0000 : "rootfs"
[    1.464238] mtd: setting mtd8 (rootfs) as root device
[    1.469470] 1 squashfs-split partitions found on MTD device rootfs
[    1.475641] 0x000000660000-0x000000fc0000 : "rootfs_data"
[    1.609795] i2c_dev: i2c /dev entries driver
[    1.614900] i2c-mt7621 1e000900.i2c: clock 100 kHz
[    1.622931] MikroTik RouterBOARD hardware configuration sysfs driver v0.08
[    1.631286] MikroTik RouterBOARD software configuration sysfs driver v0.05
[    1.642592] NET: Registered PF_INET6 protocol family
[    1.650793] Segment Routing with IPv6
[    1.654588] In-situ OAM (IOAM) with IPv6
[    1.658706] NET: Registered PF_PACKET protocol family
[    1.663822] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.677288] 8021q: 802.1Q VLAN Support v1.8
[    1.829228] mtk_soc_eth 1e100000.ethernet: generated random MAC address 20:08:02:00:00:00
[    1.839457] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.856731] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20
[    1.868714] mtk_soc_eth 1e100000.ethernet eth1: mediatek frame engine at 0xbe100000, irq 20
[    1.878473] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.910778] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.919502] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=22)
[    1.932256] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    1.938501] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=23)
[    1.952833] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    1.959722] DSA: tree 0 setup
[    1.963862] clk: Disabling unused clocks
[    1.974640] VFS: Mounted root (squashfs filesystem) readonly on device 31:8.
[    1.985683] Freeing unused kernel image (initmem) memory: 1252K
[    1.991695] This architecture does not have kernel memory protection.
[    1.998153] Run /sbin/init as init process
[    2.002234]   with arguments:
[    2.002241]     /sbin/init
[    2.002249]   with environment:
[    2.002256]     HOME=/
[    2.002264]     TERM=linux
[    2.733012] init: Console is alive
[    2.736799] init: - watchdog -
[    3.315820] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.388960] usbcore: registered new interface driver usbfs
[    3.394650] usbcore: registered new interface driver hub
[    3.400158] usbcore: registered new device driver usb
[    3.406842] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    3.425222] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    3.430651] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    3.443164] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000280010
[    3.452440] xhci-mtk 1e1c0000.xhci: irq 27, io mem 0x1e1c0000
[    3.458485] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    3.463827] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    3.471343] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
[    3.478757] hub 1-0:1.0: USB hub found
[    3.482670] hub 1-0:1.0: 2 ports detected
[    3.487754] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.496780] hub 2-0:1.0: USB hub found
[    3.500711] hub 2-0:1.0: 1 port detected
[    3.513703] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.531832] init: - preinit -
[    3.989401] usb 1-2: new high-speed USB device number 2 using xhci-mtk
[    4.227327] mtk_soc_eth 1e100000.ethernet wan: renamed from eth1
[    5.707538] random: crng init done
[    6.676768] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[    6.689446] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    6.689883] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   10.041322] mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   11.161876] jffs2: notice: (670) jffs2_build_xattr_subsystem: complete building xattr subsystem, 44 of xdatum (28 unchecked, 3 orphan) and 60 of xref (5 dead, 0 orphan) found.
[   11.188243] mount_root: loading kmods from internal overlay
[   11.480239] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   11.838826] SCSI subsystem initialized
[   11.934382] usbcore: registered new interface driver usb-storage
[   11.998278] mtk-msdc 1e130000.mmc: msdc_track_cmd_data: cmd=52 arg=00000C00; host->error=0x00000002
[   12.002174] usbcore: registered new interface driver uas
[   12.007844] mtk-msdc 1e130000.mmc: msdc_track_cmd_data: cmd=52 arg=80000C08; host->error=0x00000002
[   12.013323] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   12.027004] mtk-msdc 1e130000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   12.040494] mtk-msdc 1e130000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   12.050026] mtk-msdc 1e130000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   12.059568] mtk-msdc 1e130000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   12.097918] mmc0: new high speed SDHC card at address 0007
[   12.108392] mmcblk0: mmc0:0007 SD8GB 7.42 GiB
[   12.121462]  mmcblk0: p1
[   12.329448] block: attempting to load /tmp/overlay/upper/etc/config/fstab
[   15.449903] EXT4-fs (mmcblk0p1): recovery complete
[   15.464125] EXT4-fs (mmcblk0p1): mounted filesystem 8a01f495-5969-4f18-8c96-6dac84f92151 r/w with ordered data mode. Quota mode: disabled.
[   15.497047] mount_root: switched to extroot
[   15.505902] urandom-seed: Seeding with /etc/urandom.seed
[   15.620323] mt7530-mdio mdio-bus:1f lan1: Link is Down
[   15.636486] procd: - early -
[   15.639743] procd: - watchdog -
[   16.288069] procd: - watchdog -
[   16.291686] procd: - ubus -
[   16.654570] procd: - init -
[   18.190685] kmodloader: loading kernel modules from /etc/modules.d/*
[   18.291863] mtk-eip93 1e004000.crypto: EIP93 Crypto Engine Initialized.
[   18.855018] urngd: v1.0.2 started.
[   19.331412] usbcore: registered new interface driver cdc_wdm
[   19.338891] Loading modules backported from Linux version v6.18.26-0-g1fe060681
[   19.346244] Backport generated by backports.git 6ecbb44
[   19.377996] usbcore: registered new interface driver usbserial_generic
[   19.384850] usbserial: USB Serial support registered for generic
[   19.394856] usbcore: registered new interface driver cdc_ether
[   19.405536] usbcore: registered new interface driver cdc_ncm
[   19.613826] PPP generic driver version 2.4.2
[   19.622116] NET: Registered PF_PPPOX protocol family
[   19.631654] usbcore: registered new interface driver qmi_wwan
[   19.710044] cdc_mbim 1-2:2.0: cdc-wdm0: USB WDM device
[   19.716870] cdc_mbim 1-2:2.0 wwan0: register 'cdc_mbim' at usb-1e1c0000.xhci-2, CDC MBIM, aa:68:a0:dd:30:e4
[   19.727239] usbcore: registered new interface driver cdc_mbim
[   19.740122] usbcore: registered new interface driver option
[   19.746071] usbserial: USB Serial support registered for GSM modem (1-port)
[   19.754031] option 1-2:2.2: GSM modem (1-port) converter detected
[   19.760767] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[   19.768225] option 1-2:2.3: GSM modem (1-port) converter detected
[   19.774914] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[   19.782367] option 1-2:2.4: GSM modem (1-port) converter detected
[   19.789060] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
[   19.796537] option 1-2:2.5: GSM modem (1-port) converter detected
[   19.803360] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB3
[   19.816920] usbcore: registered new interface driver qcserial
[   19.823116] usbserial: USB Serial support registered for Qualcomm USB modem
[   19.847071] kmodloader: done loading kernel modules from /etc/modules.d/*
[   21.091057] jffs2: notice: (1272) jffs2_build_xattr_subsystem: complete building xattr subsystem, 44 of xdatum (28 unchecked, 3 orphan) and 60 of xref (5 dead, 0 orphan) found.
[   30.529246] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   30.562987] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   30.571545] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   30.589109] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   30.599059] br-lan: port 1(lan1) entered blocking state
[   30.604351] br-lan: port 1(lan1) entered disabled state
[   30.609776] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
[   30.616125] mtk_soc_eth 1e100000.ethernet eth0: entered allmulticast mode
[   30.628031] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
[   30.669890] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[   30.679883] br-lan: port 2(lan2) entered blocking state
[   30.685204] br-lan: port 2(lan2) entered disabled state
[   30.690778] mt7530-mdio mdio-bus:1f lan2: entered allmulticast mode
[   30.700651] mt7530-mdio mdio-bus:1f lan2: entered promiscuous mode
[   30.746859] mtk_soc_eth 1e100000.ethernet wan: PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=POLL)
[   30.756589] mtk_soc_eth 1e100000.ethernet wan: configuring for phy/rgmii link mode
[   33.652831] mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   33.652933] br-lan: port 1(lan1) entered blocking state
[   33.666124] br-lan: port 1(lan1) entered forwarding state
[   51.214905] 8021q: adding VLAN 0 to HW filter on device wwan0

By new firmware, do you mean whole openWRT image?



How do I check whether or not CONFIG_ATH9K_SUPPORT_PCOEM is enabled in driver?
modinfo?

Intel WLAN cards are not suitable for AP mode (older ones not at all, fullstop, newer ones only in a very limited fashion and exclusively on 2.4 GHz). Unless your intention is to use it as client, it's useless.

Maybe take a step back and reconsider how much you really want to mess with this (on the hardware- and economical sides), as purpose-built concurrent dual-band wifi6 devices might quickly become a better option, in every dimension.

Erm...... after You choose release on OpenWrt download site and go to Your devices image, scroll down to bottom of the page, there's Your SDK in "Supplementary files".

On normal linux distro modinfo ath9k would result with listing of all supported aliases, unfortunately OpenWrt strips that during build. Maybe there's some trick to find that information on running OpenWrt but nothing comes to my mind.

TL;DR I need Wi-Fi for remote management, as the modem will NOT be in my house, but in a very small attic from the house above mine. The modem is linked to my router via Ethernet through various loops, but sometimes something fails (already happened various times) and I need direct access to modem for diagnostic, bypassing everthing else.

It's a really long story, but shortening it: I have a complicated network setup, which is going to change but not right now and regardless it will STILL go from said attic -> through another house -> finally into mine.

What is the cheapest mini PCIE Wi-Fi card with 2 antennas slots/ports/plugs/whatever I can use that's 100% supported by openWRT? I need it just as an AP to connect to for diagnostic; 2.4 GHz is better as it has higher penetration (it has to go through either reinforced concrete or masonry).



So basically I have no way to know and I can only attempt a fix by building the entire openWRT firmware but with PCOEM support enabled and see if that works, right?

Either You build full firmware or use SDK to build modified modules and install them on the system.

TL;DR either it was failing mainly hash mismatch or missing dependency
I have overwritten the expected hash as a walkaround to git/feed hash mismatch and it finally compiled successfully.

In order to build the modules using SDK, I followed this:

I spent countless hours rebuilding and rebuilding due to tons of errors, a brief summary:

  • first I tried to build everything and copying and installed only what I needed, but it was continuosly failing due to git/feed hash mismatch;
  • started anew (extracing fresh SDK from tar) then to shorten up compile time, I tried trimming down .config (via make menuconfig) as much as I could;
  • started ove ragain, then I tried brute forcing .config with just what I needed, deleting everything else;
  • after each fail I added a missing dependency, since it was taking too long, I started anew and went again to first attempt.
  • compilation finally went through with a bad hack: copying the git/feed hash over the expected one.

I copied the new modules plus kmod-iwlwifi over openWRT device.
I deleted kmod-ath9k kmod-ath9k-common kmod-ath kmod-cfg80211 kmod-mac80211 kmod-iwlwifi.
I installed my kmod-ath9k kmod-ath9k-common kmod-ath kmod-cfg80211 kmod-mac80211 kmod-iwlwifi.

Now I have wifi.

Question time:

  1. Do I have to repeat everytime I update?
  2. Deleting kmod-ath9k kmod-ath9k-common kmod-ath pulled NO dependencies, but deleting kmod-cfg80211 kmod-mac80211 kmod-iwlwifi did:
apk del
# apk del kmod-cfg80211 kmod-mac80211 kmod-iwlwifi
( 1/21) Purging kmod-iwlwifi (6.12.94.6.18.26-r1)
  Executing kmod-iwlwifi-6.12.94.6.18.26-r1.pre-deinstall
( 2/21) Purging kmod-mac80211 (6.12.94.6.18.26-r1)
  Executing kmod-mac80211-6.12.94.6.18.26-r1.pre-deinstall
( 3/21) Purging kmod-cfg80211 (6.12.94.6.18.26-r1)
  Executing kmod-cfg80211-6.12.94.6.18.26-r1.pre-deinstall
( 4/21) Purging iw (6.17-r1)
  Executing iw-6.17-r1.pre-deinstall
( 5/21) Purging wifi-scripts (1.0-r1)
  Executing wifi-scripts-1.0-r1.pre-deinstall
( 6/21) Purging ucode-mod-digest (2026.01.16~85922056-r1)
  Executing ucode-mod-digest-2026.01.16~85922056-r1.pre-deinstall
( 7/21) Purging wireless-regdb (2026.05.30-r1)
  Executing wireless-regdb-2026.05.30-r1.pre-deinstall
( 8/21) Purging kmod-crypto-ccm (6.12.94-r1)
  Executing kmod-crypto-ccm-6.12.94-r1.pre-deinstall
( 9/21) Purging kmod-crypto-cmac (6.12.94-r1)
  Executing kmod-crypto-cmac-6.12.94-r1.pre-deinstall
(10/21) Purging kmod-crypto-gcm (6.12.94-r1)
  Executing kmod-crypto-gcm-6.12.94-r1.pre-deinstall
(11/21) Purging kmod-crypto-ctr (6.12.94-r1)
  Executing kmod-crypto-ctr-6.12.94-r1.pre-deinstall
(12/21) Purging kmod-crypto-seqiv (6.12.94-r1)
  Executing kmod-crypto-seqiv-6.12.94-r1.pre-deinstall
(13/21) Purging kmod-crypto-geniv (6.12.94-r1)
  Executing kmod-crypto-geniv-6.12.94-r1.pre-deinstall
(14/21) Purging kmod-crypto-rng (6.12.94-r1)
  Executing kmod-crypto-rng-6.12.94-r1.pre-deinstall
(15/21) Purging kmod-crypto-hmac (6.12.94-r1)
  Executing kmod-crypto-hmac-6.12.94-r1.pre-deinstall
(16/21) Purging kmod-crypto-sha3 (6.12.94-r1)
  Executing kmod-crypto-sha3-6.12.94-r1.pre-deinstall
(17/21) Purging kmod-crypto-sha512 (6.12.94-r1)
  Executing kmod-crypto-sha512-6.12.94-r1.pre-deinstall
(18/21) Purging kmod-crypto-ghash (6.12.94-r1)
  Executing kmod-crypto-ghash-6.12.94-r1.pre-deinstall
(19/21) Purging kmod-crypto-gf128 (6.12.94-r1)
  Executing kmod-crypto-gf128-6.12.94-r1.pre-deinstall
(20/21) Purging kmod-ptp (6.12.94-r1)
  Executing kmod-ptp-6.12.94-r1.pre-deinstall
(21/21) Purging kmod-pps (6.12.94-r1)
  Executing kmod-pps-6.12.94-r1.pre-deinstall
OK: 27.7 MiB in 201 packages

I then installed my custom built apk EXCEPT kmod-iwlwifi, to check whether it would add everything back;

apk add
# apk add --allow-untrusted kmod-ath.apk kmod-ath9k-common.apk kmod-ath9k.apk kmod-cfg80211.apk kmod-mac80211.apk 
( 1/22) Installing iw (6.17-r1)
  Executing iw-6.17-r1.post-install
( 2/22) Installing ucode-mod-digest (2026.01.16~85922056-r1)
  Executing ucode-mod-digest-2026.01.16~85922056-r1.post-install
( 3/22) Installing wifi-scripts (1.0-r1)
  Executing wifi-scripts-1.0-r1.post-install
( 4/22) Installing wireless-regdb (2026.05.30-r1)
  Executing wireless-regdb-2026.05.30-r1.post-install
( 5/22) Installing kmod-cfg80211 (6.12.94.6.18.26-r1)
  Executing kmod-cfg80211-6.12.94.6.18.26-r1.post-install
( 6/22) Installing kmod-crypto-hmac (6.12.94-r1)
  Executing kmod-crypto-hmac-6.12.94-r1.post-install
( 7/22) Installing kmod-crypto-sha3 (6.12.94-r1)
  Executing kmod-crypto-sha3-6.12.94-r1.post-install
( 8/22) Installing kmod-crypto-sha512 (6.12.94-r1)
  Executing kmod-crypto-sha512-6.12.94-r1.post-install
( 9/22) Installing kmod-crypto-rng (6.12.94-r1)
  Executing kmod-crypto-rng-6.12.94-r1.post-install
(10/22) Installing kmod-crypto-geniv (6.12.94-r1)
  Executing kmod-crypto-geniv-6.12.94-r1.post-install
(11/22) Installing kmod-crypto-seqiv (6.12.94-r1)
  Executing kmod-crypto-seqiv-6.12.94-r1.post-install
(12/22) Installing kmod-crypto-ctr (6.12.94-r1)
  Executing kmod-crypto-ctr-6.12.94-r1.post-install
(13/22) Installing kmod-crypto-ccm (6.12.94-r1)
  Executing kmod-crypto-ccm-6.12.94-r1.post-install
(14/22) Installing kmod-crypto-cmac (6.12.94-r1)
  Executing kmod-crypto-cmac-6.12.94-r1.post-install
(15/22) Installing kmod-crypto-gf128 (6.12.94-r1)
  Executing kmod-crypto-gf128-6.12.94-r1.post-install
(16/22) Installing kmod-crypto-ghash (6.12.94-r1)
  Executing kmod-crypto-ghash-6.12.94-r1.post-install
(17/22) Installing kmod-crypto-gcm (6.12.94-r1)
  Executing kmod-crypto-gcm-6.12.94-r1.post-install
(18/22) Installing kmod-mac80211 (6.12.94.6.18.26-r1)
  Executing kmod-mac80211-6.12.94.6.18.26-r1.post-install
(19/22) Installing kmod-ath (6.12.94.6.18.26-r1)
  Executing kmod-ath-6.12.94.6.18.26-r1.post-install
(20/22) Installing kmod-random-core (6.12.94-r1)
  Executing kmod-random-core-6.12.94-r1.post-install
(21/22) Installing kmod-ath9k-common (6.12.94.6.18.26-r1)
  Executing kmod-ath9k-common-6.12.94.6.18.26-r1.post-install
(22/22) Installing kmod-ath9k (6.12.94.6.18.26-r1)
  Executing kmod-ath9k-6.12.94.6.18.26-r1.post-install
OK: 30.0 MiB in 223 packages

It didn't, so I installed iwlwifi as well:

# apk add --allow-untrusted kmod-iwlwifi.apk 
OK: 31.1 MiB in 226 packages

Should I care for the packakges not added back?
These got deleted but not added back: kmod-pps kmod-pt
This got added but was not deleted (or I did not notice): kmod-random-core