We use that tool to package the BDF and/or extract the regdb from the QCA board-2.bin. But AFAIK the tool can’t be used to convert the regdb from a v2.9 BDF to a v2.4.

Regdb does not depend on FW version, its format has been the same from the start unless its 6G regulatory

I was led to believe the regdb does differ based on version, see this post by @lytr:

I’ve extracted the regdb from here

Ath11k loads, radio is up, but it’s not broadcasting.


root@ae-ap06:~# cat /etc/config/wireless 

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'soc@0/a0000000.pcie/pci0001:00/0001:00:00.0/0001:01:00.0'
        option channel '48'
        option band '5g'
        option htmode 'HE80'
        option cell_density '0'
        option country 'US'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'M-TEST'
        option encryption 'psk2+ccmp'
        option key 'test1234'
        option network 'lan'

Regulatory:


root@ae-ap06:~# iw reg get
global
country US: DFS-FCC
        (902 - 904 @ 2), (N/A, 30), (N/A)
        (904 - 920 @ 16), (N/A, 30), (N/A)
        (920 - 928 @ 8), (N/A, 30), (N/A)
        (2400 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
        (5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
        (5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
        (5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
        (57240 - 71000 @ 2160), (N/A, 40), (N/A)

phy#0 (self-managed)
country US: DFS-FCC
        (2402 - 2472 @ 40), (6, 30), (N/A)
        (5170 - 5250 @ 80), (N/A, 30), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
        (5925 - 7125 @ 160), (N/A, 30), (N/A), NO-OUTDOOR, AUTO-BW

What am I missing?

Well, it does differ in the sense that its growing and being updated but it is not tied for FW versions.

Sadly, I have no idea what is wrong in your case though

For IPQ5018, QCN6122 and QCN9074 the format is changed. Starting from FW 2.5 their using 10k regdb format. Previous FW use 7k regdb format (like IPQ6018, IPQ8074).

Probably space for 6GHz rules as well as that was not included previously

I saw this patch, do you think reg domain needs to be removed?

BDFs and precal blobs are just black boxes to me and I wouldn’t know where to start

I've prepared a regdb update tool: https://github.com/testuser7/ath_bdf_tool
to make life easier...

But the case with regdb extension is not supported.

If regdomain is set, then probably yes.

will test the script to remove the regdomain and report back..

hoping theres commits soon then maybe i can move forward with mine

removed regdomain, but still can't connect to the AP. At least now it's not barfing on a country code change. When CC is set to US:

root@ae-ap06:~# iw reg get
global
country US: DFS-FCC
        (902 - 904 @ 2), (N/A, 30), (N/A)
        (904 - 920 @ 16), (N/A, 30), (N/A)
        (920 - 928 @ 8), (N/A, 30), (N/A)
        (2400 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
        (5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
        (5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
        (5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
        (57240 - 71000 @ 2160), (N/A, 40), (N/A)

phy#0 (self-managed)
country US: DFS-FCC
        (2402 - 2472 @ 40), (6, 30), (N/A)
        (5170 - 5250 @ 80), (N/A, 30), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
        (5925 - 7125 @ 160), (N/A, 30), (N/A), NO-OUTDOOR, AUTO-BW

changing it to GB:

root@ae-ap06:~# iw reg get
global
country GB: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5730 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5850 @ 80), (N/A, 23), (N/A), NO-OUTDOOR
        (5925 - 6425 @ 160), (N/A, 23), (N/A), NO-OUTDOOR
        (57000 - 71000 @ 2160), (N/A, 40), (N/A)

phy#0 (self-managed)
country GB: DFS-ETSI
        (2402 - 2482 @ 40), (N/A, 20), (N/A)
        (5170 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5330 @ 80), (N/A, 23), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5490 - 5590 @ 80), (N/A, 30), (0 ms), DFS, AUTO-BW
        (5590 - 5650 @ 40), (N/A, 30), (600000 ms), DFS, AUTO-BW
        (5650 - 5710 @ 40), (N/A, 30), (0 ms), DFS, AUTO-BW
        (5945 - 6425 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW

just to validate I get these steps right:

  1. check OEM bootlog for BDF file used (in my case bdwlan.ba0)
  2. grab that specific file from FCC or EU folder (see list of available folders below)
  3. remove regdomain: ath11k_bdf_tool.py -r bdwlan.ba0 -o board-2.qcn9074.bin
  4. package with qca-swiss-armyknife: ath11k-bdencoder -c board-2.json -o board-2.bin
  5. upload board-2.bin to router replacing the current one
  6. reboot

anything else?

Check is hostapd is even running:

logread | grep hostapd

Yes:


Thu Mar 28 13:17:41 2024 daemon.notice hostapd: Set new config for phy phy0: /var/run/hostapd-phy0.conf
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: Restart interface for phy phy0
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: Remove interface 'phy0'
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: phy0-ap0: interface state ENABLED->DISABLED
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: phy0-ap0: AP-DISABLED
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: phy0-ap0: CTRL-EVENT-TERMINATING
Thu Mar 28 13:17:41 2024 daemon.err hostapd: rmdir[ctrl_interface=/var/run/hostapd]: Permission denied
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: nl80211: deinit ifname=phy0-ap0 disabled_11b_rates=0
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=2 logger_stdout=127 logger_stdout_level=2 country_code=GB ieee80211d=1 ieee80211h=1 hw_mode=a beacon_int=100 chanlist=36 tx_queue_data2_burst=2.0 #num_global_macaddr=1 ieee80211n=1 ht_coex=0 ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40] ieee80211ac=1 vht_oper_chwidth=2 vht_oper_centr_freq_seg0_idx=50 vht_capab=[RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][SOUNDING-DIMENSION-4][BF-ANTENNA-4][VHT160-80PLUS80][MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP7] ieee80211ax=1 he_oper_chwidth=2 he_oper_centr_freq_seg0_idx=50 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=128 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_ack=0 he_mu_edca_qos_info_queue_request=0 he_mu_edca_qos
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: phy0-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Mar 28 13:17:41 2024 daemon.notice hostapd: phy0-ap0: interface state COUNTRY_UPDATE->HT_SCAN
Thu Mar 28 13:17:42 2024 daemon.notice hostapd: phy0-ap0: interface state HT_SCAN->DFS
Thu Mar 28 13:17:42 2024 daemon.notice hostapd: phy0-ap0: DFS-CAC-START freq=5180 chan=36 sec_chan=1, width=2, seg0=50, seg1=0, cac_time=60s
Thu Mar 28 13:18:44 2024 daemon.notice hostapd: phy0-ap0: DFS-CAC-COMPLETED success=1 freq=5180 ht_enabled=0 chan_offset=0 chan_width=5 cf1=5250 cf2=0
Thu Mar 28 13:18:44 2024 daemon.warn hostapd: Can't set DFS state for freq 5180 MHz
Thu Mar 28 13:18:44 2024 daemon.warn hostapd: Can't set DFS state for freq 5200 MHz
Thu Mar 28 13:18:44 2024 daemon.warn hostapd: Can't set DFS state for freq 5220 MHz
Thu Mar 28 13:18:44 2024 daemon.warn hostapd: Can't set DFS state for freq 5240 MHz
Thu Mar 28 13:18:44 2024 daemon.notice hostapd: phy0-ap0: interface state DFS->ENABLED
Thu Mar 28 13:18:44 2024 daemon.notice hostapd: phy0-ap0: AP-ENABLED

And what does iwinfo show?


root@ae-ap06:~# iwinfo
phy0-ap0  ESSID: "M-TEST"
          Access Point: E8:9F:80:92:30:D6
          Mode: Master  Channel: 36 (5.180 GHz)  HT Mode: HE160
          Center Channel 1: 50 2: unknown
          Tx-Power: 20 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -110 dBm
          Bit Rate: unknown
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11ac/ax/n
          Hardware: 17CB:1104 17CB:1104 [Qualcomm Atheros QCN6024/9024/9074]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

I think this BDF will not work with the new firmware without modifying it.
Unfortunately I don't know how to do it yet.

In the meantime, would you suggest I roll back to an older FW version?

update: I downloaded the generic board-2.bin file from the qca FW repo, extracted the BDF for board id 255 and packaged it with ath11k-bdencoder. The radio comes up and wifi works! Clients can connect when width is set to both 80 and 160 Mhz.

question I have is whether the use of generic board files is recommended or not with precal from the device itself?

Linksys has 2 boot partitions and it keeps switching after 3 power cycles, even after successful boots. I've created the bootcount file, derived from other qualcommax subtargets, but the script isn't executed. Anything I need to enable or how does one troubleshoot?

content of bootcount file:

#!/bin/sh /etc/rc.common

START=99

boot() {
	case $(board_name) in
	linksys,mx2000|\
	linksys,mx5500)
		mtd resetbc s_env || true
	;;
	esac
}

When I run mtd resetbc s_env manually, it resets the counter successfully:

*
0001c000  11 08 11 20 00 00 00 00  11 08 11 20 ff ff ff ff  |... ....... ....|
0001c010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*