Unable to load wireless firmware

I'm building a custom OpenWRT build for an MT7621 (ramips) devkit. The default configuration for "Hilink HLK7621A" works fine but I cannot get any of the wi-fi cards to work. The cards are detected but it seems like the kernel never attempts to load the firmware and they do not show up as wlan interfaces in ip link. I have two cards, a PCI-express BCM4311, and a USB Ralink 2573 (0db0:6877) (I know they are ancient, it does not matter since they work on other modern Linux 6.x systems fine, I dont need performance, and I think this problem prevents me from using any other cards that need to load firmware anyways.)

What am I doing wrong?

I have an OpenWRT v24.10.5 image built from git source, according to the guide on the wiki. In menuconfig I enabled the respective drivers and firmware packages. The cards are detected by the kernel:

[    1.510804] pci 0000:01:00.0: [14e4:4312] type 00 class 0x028000
[    1.522726] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit]
[    1.536191] pci 0000:01:00.0: enabling Extended Tags
[    1.546089] pci 0000:01:00.0: supports D1 D2
[    1.554826] pci 0000:00:02.0: PCI bridge to [bus 01-ff]
[    1.565136] pci 0000:00:02.0:   bridge window [io  0x0000-0x0fff]
[    1.577207] pci 0000:00:02.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.590676] pci 0000:00:02.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.605033] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.618186] pci 0000:00:02.0: BAR 0: no space for [mem size 0x80000000]
[    1.631282] pci 0000:00:02.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.645113] pci 0000:00:02.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.658588] pci 0000:00:02.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    1.672961] pci 0000:00:02.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    1.686421] pci 0000:00:02.0: BAR 7: assigned [io  0x0000-0x0fff]
[    1.698511] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x60003fff 64bit]
                   [   skipped until b43 module was installed   ]
[  114.305423] kmodloader: loading kernel modules from /etc/modules.d/*
[  114.343265] Broadcom 43xx driver loaded [ Features: NL ]
[  114.355337] kmodloader: done loading kernel modules from /etc/modules.d/*

And the USB card is detected, in this case left in the USB port it initialized on boot:

[   58.584135] kmodloader: loading kernel modules from /etc/modules.d/*
[   58.654513] mtk-eip93 1e004000.crypto: EIP93 Crypto Engine Initialized.
[   59.195025] compat: loading out-of-tree module taints kernel.
[   59.206940] Loading modules backported from Linux version v6.12.61-0-gdcbeffaf66d0
[   59.222035] Backport generated by backports.git v6.1.110-1-35-g410656ef
[   59.476427] PPP generic driver version 2.4.2
[   59.486975] NET: Registered PF_PPPOX protocol family
[   59.612944] urngd: v1.0.2 started.
[   59.647501] usb 1-1: reset high-speed USB device number 2 using xhci-mtk
[   60.171920] ieee80211 phy0: rt2x00_set_chip: Info - Chipset detected - rt: 2573, rf: 0002, rev: 000a
[   60.194336] usbcore: registered new interface driver rt73usb
[   60.228330] usbcore: registered new interface driver rt2800usb
[   60.241516] kmodloader: done loading kernel modules from /etc/modules.d/*

The USB card phy0 is also detected in iw list, so some part of it is working

What I cannot figure out is why neither of the modules attempts to load the firmware from /lib/firmware. The required files are there.

# ls /lib/firmware
b43     regulatory.db  rt2870.bin     rt73.bin

Is there some OpenWRT component that I am missing and it's disabled in this board's default config? I expected to see the kernel print something like this (for comparison, Ralink card initializing on my workstation with kernel 6.17.13)

[27575.825988] usb 11-1.3: new full-speed USB device number 13 using xhci-hcd
[27576.142026] usb 11-1.3: reset full-speed USB device number 13 using xhci-hcd
[27576.560438] ieee80211 phy6: rt2x00_set_chip: Info - Chipset detected - rt: 2573, rf: 0002, rev: 000a
[27576.560920] ieee80211 phy6: Selected rate control algorithm 'minstrel_ht'
[27576.581558] rt73usb 11-1.3:1.0 wlx00abcdef1234: renamed from wlan0
[27576.599050] ieee80211 phy6: rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'
[27576.599179] ieee80211 phy6: rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7
[27577.531309] ieee80211 phy6: rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x006b, type=2
[blah blah blah]

This is my diffconfig:

Summary
$ ./scripts/diffconfig.sh 
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7621=y
CONFIG_TARGET_ramips_mt7621_DEVICE_hilink_hlk-7621a-evb=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_AIRCRACK_NG_OPENSSL=y
CONFIG_AIRCRACK_NG_OPTIMIZE_SPEED=y
CONFIG_B43_FW_5_100_138=y
CONFIG_BUSYBOX_CONFIG_FEATURE_GETOPT_LONG=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS=y
CONFIG_BUSYBOX_CONFIG_GETOPT=y
CONFIG_BUSYBOX_CONFIG_MDEV=y
CONFIG_BUSYBOX_CONFIG_MOUNTPOINT=y
CONFIG_BUSYBOX_CONFIG_RFKILL=y
CONFIG_BUSYBOX_CONFIG_UNXZ=y
CONFIG_BUSYBOX_CONFIG_XZ=y
# CONFIG_DRIVER_11AC_SUPPORT is not set
CONFIG_HTOP_LMSENSORS=y
CONFIG_KERNEL_ENABLE_DEFAULT_TRACERS=y
CONFIG_KERNEL_FTRACE=y
# CONFIG_KERNEL_PAGE_POOL is not set
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_MBEDTLS=y
CONFIG_LIBCURL_NGHTTP2=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_PROXY=y
CONFIG_LIBCURL_UNIX_SOCKETS=y
CONFIG_LXC_BUSYBOX_OPTIONS=y
CONFIG_LXC_SECCOMP=y
CONFIG_OPENSSL_ENGINE=y
CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=y
CONFIG_OPENSSL_WITH_ASM=y
CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y
CONFIG_OPENSSL_WITH_CMS=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y
CONFIG_OPENSSL_WITH_IDEA=y
CONFIG_OPENSSL_WITH_MDC2=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SEED=y
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_OPENSSL_WITH_TLS13=y
CONFIG_OPENSSL_WITH_WHIRLPOOL=y
CONFIG_PACKAGE_B43_BUSES_BCMA_AND_SSB=y
CONFIG_PACKAGE_B43_DEBUG=y
CONFIG_PACKAGE_B43_PHY_G=y
CONFIG_PACKAGE_B43_PHY_HT=y
CONFIG_PACKAGE_B43_PHY_LP=y
CONFIG_PACKAGE_B43_PHY_N=y
CONFIG_PACKAGE_B43_USE_BCMA=m
CONFIG_PACKAGE_B43_USE_SSB=m
# CONFIG_PACKAGE_MAC80211_DEBUGFS is not set
# CONFIG_PACKAGE_MAC80211_MESH is not set
CONFIG_PACKAGE_RT2X00_DEBUG=y
CONFIG_PACKAGE_cgi-io=y
CONFIG_PACKAGE_ethtool=y
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_kmod-b43=m
CONFIG_PACKAGE_kmod-bcma=y
# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set
CONFIG_PACKAGE_kmod-lib-cordic=y
CONFIG_PACKAGE_kmod-lib-crc-itu-t=y
CONFIG_PACKAGE_kmod-lib-crc8=y
# CONFIG_PACKAGE_kmod-mt76x2 is not set
CONFIG_PACKAGE_kmod-rt2800-lib=y
CONFIG_PACKAGE_kmod-rt2800-usb=y
CONFIG_PACKAGE_kmod-rt2x00-lib=y
CONFIG_PACKAGE_kmod-rt2x00-usb=y
CONFIG_PACKAGE_kmod-rt73-usb=y
CONFIG_PACKAGE_kmod-ssb=y
CONFIG_PACKAGE_libatomic=y
CONFIG_PACKAGE_libcap=m
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libevdev=y
CONFIG_PACKAGE_libevent2=m
CONFIG_PACKAGE_libkmod=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-ucode=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libnghttp2=y
CONFIG_PACKAGE_libnl-cli=y
CONFIG_PACKAGE_libnl-core=y
CONFIG_PACKAGE_libnl-genl=y
CONFIG_PACKAGE_libnl-nf=y
CONFIG_PACKAGE_libnl-route=y
CONFIG_PACKAGE_libpci=y
CONFIG_PACKAGE_libpcre2=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libselinux=y
CONFIG_PACKAGE_libsepol=y
CONFIG_PACKAGE_libstdcpp=y
CONFIG_PACKAGE_libudev-zero=y
CONFIG_PACKAGE_libusb-1.0=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-commands=y
CONFIG_PACKAGE_luci-app-filebrowser=y
CONFIG_PACKAGE_luci-app-filemanager=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-package-manager=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-light=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-dashboard=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-openwrt-2020=y
CONFIG_PACKAGE_lxc=y
CONFIG_PACKAGE_musl-fts=y
CONFIG_PACKAGE_pciids=y
CONFIG_PACKAGE_pciutils=y
CONFIG_PACKAGE_perl=y
CONFIG_PACKAGE_perlbase-base=y
CONFIG_PACKAGE_perlbase-bytes=y
CONFIG_PACKAGE_perlbase-class=y
CONFIG_PACKAGE_perlbase-config=y
CONFIG_PACKAGE_perlbase-dynaloader=y
CONFIG_PACKAGE_perlbase-errno=y
CONFIG_PACKAGE_perlbase-essential=y
CONFIG_PACKAGE_perlbase-fcntl=y
CONFIG_PACKAGE_perlbase-filehandle=y
CONFIG_PACKAGE_perlbase-getopt=y
CONFIG_PACKAGE_perlbase-io=y
CONFIG_PACKAGE_perlbase-list=y
CONFIG_PACKAGE_perlbase-net=y
CONFIG_PACKAGE_perlbase-posix=y
CONFIG_PACKAGE_perlbase-scalar=y
CONFIG_PACKAGE_perlbase-selectsaver=y
CONFIG_PACKAGE_perlbase-socket=y
CONFIG_PACKAGE_perlbase-symbol=y
CONFIG_PACKAGE_perlbase-tie=y
CONFIG_PACKAGE_perlbase-time=y
CONFIG_PACKAGE_perlbase-xsloader=y
CONFIG_PACKAGE_procps-ng=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_rpcd-mod-ucode=y
CONFIG_PACKAGE_rt2800-usb-firmware=y
CONFIG_PACKAGE_rt73-usb-firmware=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_ucode-mod-html=y
CONFIG_PACKAGE_ucode-mod-math=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_usbids=y
CONFIG_PACKAGE_usbutils=y
CONFIG_PACKAGE_wireless-tools=y
CONFIG_PACKAGE_zlib=y
CONFIG_PERL_NOCOMMENT=y
CONFIG_PERL_THREADS=y
# CONFIG_B43_FW_SQUASH is not set

Where is the problem indication?

Oh, it is wifi-G, your neighbours are grateful you dont prime up your 20 years old radio menace.

The problem is that neither card is loading the firmware, despite the driver detecting the card and the firmware being installed in /lib/firmware. So, what else am I missing?
Also, this an incorrect assumption that the cards will be used to transmit 802.11g packets. Why the negativity :frowning: ?

I think that since this problem affects two cards which use two completely different drivers, it will also happen when I install a super-duper 802.11ax/ac/omg/wtf/bbq card, this is what I am afraid of, that I will install the card, it will be detected and then nothing happens. Why is it not loading the firmware?

That is normal, you have not attached any function. Check iw phy

wifi g has no airtime fairness provisions, you will just shouting out and interfering with normal peoples wifi. You are the negative here.

You have to check "legacy rates" box in luci for a reason.

Thats true. But as I said, this card will not be used to transmit packets. I just want to run wavemon on this.

Thank you! I didn't know it's necessary to do this once a phy is detected :slight_smile: . It seems most Linux systems do this automatically via udev.

iw phy phy0 interface add wifi0 type monitor - that's all I need from the USB card. And don't worry. Now that this works, I am positive I will get it to work with an 802.11ac/ax card that I have coming in the mail.

1 Like

You can add monitor interface in luci too

1 Like