Why do you want to delete those patches?
There are 3 patches that do the same. These 2 are those do not match with robimarco repo, if i'm not wrong
is there some workaround around regulatory domain i can do myself to try the 160Mhz?
There is no workaround because the firmware is out of control of OpenWrt developers. The firmware has hardcoded regdb in itself. This changed with firmware 2.7 and we should now be able to load any regdb. But what should work in theory is not working as intended practically. As far as I know you can serve any file as regdb it won't do anything because it is not loaded anyway/correctly.
I hope I've explained it understandable and correct. Otherwise feel free to fix my comment. ![]()
Well...
Firmware 2.5 also supports external regdb.bin but as now we cannot proper load it.
Interesting fact is that original zyxel firmware rewrite regulatory database at boot time, they load own regulatory rules which gives us 160 Mhz at original software.
So as for now work in progress, more information about that problem is on AX6000 and AX3200 forum
Do you know if they are loading binary regulatory rules via CNSS or?
They use three files:
https://github.com/itorK/nbg7815_tools/blob/main/qcawificfg80211.sh
https://github.com/itorK/nbg7815_tools/blob/main/qcawifi.sh
https://github.com/itorK/nbg7815_tools/blob/main/hostapd.sh
Those are the usual part 80211, part INI config script they use in QSDK.
I am interested in how are they loading the custom regulatory rules as obviously there are none in the BDF
Interesting part from qcawifi.sh :
		# insmod and rmmod wifi_3_0 kernel object in addition to qca_ol
		# as wifi_3_0 initiates and shuts down driver.
		insmod wifi_3_0
		rmmod wifi_3_0
		rmmod qca_ol
and bootlog
[   13.867932] cfg80211: World regulatory domain updated:
[   13.867957] cfg80211:  DFS Master region: unset
[   13.871953] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   13.876580] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   13.877554] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   13.878825] Initializing XFRM netlink socket
[   13.879240] NET: Registered protocol family 15
[   13.903529] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   13.907673] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   13.916963] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   13.924934] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   13.934656] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   13.944101] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   13.952210] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
...
[   24.114836] cnss: BDF location : 0x000000004b0c0000
[   24.114860] cnss: BDF IPQ8074/bdwlan.bin size 131072
[   24.118981] cnss: BDF download response , result: 0, err: 0x0
[   24.124171] cnss: per device BDF location : 0x000000004b0e0000
[   24.129610] cnss: CALDATA IPQ8074/caldata.bin size 131072 offset 0x20000
[   24.137449] cnss: BDF download response , result: 0, err: 0x0
as we see they added 160 Mhz:
[ 13.934656] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
In my opinion the issue is caused by this condition in https://lore.kernel.org/linux-wireless/20211220062355.17021-1-quic_wgong@quicinc.com/#r
+	/* QCA6390/WCN6855 does not support cal data, skip it */
+	if (bdf_type == ATH11K_QMI_BDF_TYPE_ELF || bdf_type == ATH11K_QMI_BDF_TYPE_REGDB)
That's why caldata load is skipped and no wifi interface is created.
But fixing this to:
-	if (bdf_type == ATH11K_QMI_BDF_TYPE_ELF || bdf_type == ATH11K_QMI_BDF_TYPE_REGDB)
+	if (bdf_type == ATH11K_QMI_BDF_TYPE_ELF)
gets the caldata loading, but afterwards the remoteproc crashes:
[    9.223675] ath11k c000000.wifi: boot firmware request ath11k/IPQ8074/hw2.0/board-2.bin size 1311380
[    9.223704] ath11k c000000.wifi: failed to fetch regdb data for bus=ahb,qmi-chip-id=0,qmi-board-id=255 from ath11k/IPQ8074/hw2.0/board-2.bin
[    9.244615] ath11k c000000.wifi: boot firmware request ath11k/IPQ8074/hw2.0/regdb.bin size 19348
[    9.244636] ath11k c000000.wifi: fetched regdb
[    9.244640] ath11k c000000.wifi: qmi bdf_type 4
[    9.244695] ath11k c000000.wifi: qmi bdf download req fixed addr type 4
[    9.306598] ath11k c000000.wifi: boot firmware request ath11k/IPQ8074/hw2.0/cal-ahb-c000000.wifi.bin size 131072
[    9.306936] ath11k c000000.wifi: qmi bdf download req fixed addr type 2
[    9.307120] ath11k c000000.wifi: qmi caldata type: 2
[    9.307154] ath11k c000000.wifi: qmi BDF download sequence completed
[    9.307162] ath11k c000000.wifi: qmi m3 info req
[    9.307281] ath11k c000000.wifi: qmi firmware init done
[    9.307286] ath11k c000000.wifi: qmi firmware start
[    9.307297] ath11k c000000.wifi: qmi wlan cfg req
[    9.307450] ath11k c000000.wifi: qmi wlan mode req mode 0
[    9.313961] qcom-q6v5-wcss-pil cd00000.q6v5_wcss: fatal error received: 
[    9.313961] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
[    9.313961] Image Variant : IMAGE_VARIANT_STRING=8074.wlanfw.eval_v2Q
[    9.313961] 
[    9.313961]     :Excep  :0 Exception detectedparam0 :zero, param1 :zero, param2 :zero.
[    9.313961] Thread ID      : 0x00000072  Thread name    : wlan_platform  Process ID     : 0
[    9.313961] Register:
[    9.313961] SP : 0x4b58c910
[    9.313961] FP : 0x4b58c920
[    9.313961] PC : 0x4b28cc60
[    9.313961] SSR : 0x00000003
[    9.313961] BADVA : 0x00000224
[    9.313961] LR : 0x4b28cc4c
[    9.313961] 
[    9.313961] Stack Dump
[    9.313961] from : 0x4b58c910
[    9.313961] to   : 0x4b58cde0
[    9.313961] 
[    9.361160] remoteproc remoteproc0: crash detected in cd00000.q6v5_wcss: type fatal error
[    9.383265] remoteproc remoteproc0: handling crash #1 in cd00000.q6v5_wcss
[    9.391343] remoteproc remoteproc0: recovering cd00000.q6v5_wcss
[    9.398658] ath11k c000000.wifi: qmi wifi fw del server
[    9.423917] remoteproc remoteproc0: stopped remote processor cd00000.q6v5_wcss
It happens also with the upstream 2.7 firmware as well as the special "qsdk" 2.7 firmware
Well, I assume it needs the actual regdb.bin from QCA as this was tried with the regular wireless regdb one
I've used the regdb.bin from the ax3600 qsdk image.
If you tried it with 2.5 FW then that wont work, only 2.7 will work(2.6 potentially as well)
Hi!
I've been provided with a NBG7815 and I saw your pull request and appreciate your work I would like to make it more acceptable by robimarko and would do the following things:
- Move fanctl into a separate package
 - Move led driver into a separate kernel module package
 - Try to support factory image generation
 
Another point is that if we can provide firmware flashable via the WEB UI. Did you make any efforts in getting the image generation tool from ZyXEL or to analyze their firmware format? Looks a bit like the format used for NBG6817 or LTE3301-PLUS.
Perhaps this way we can see it faster in OpenWRT?
Do you share these ideas?
I fully agree with you,
When your suggestions will be implemented, that build will be much more flexible and much simplier for users,  especially when it will be converted to Zyxel RAS image.
but...
In my opinion before polishing codes, let's try to unblock 160Mhz and bluetooth ![]()
For 160MHz it all depends on QCA. I don't expect a soon solution. But 160MHz channels are in my opinion not really usable if you want a good wifi network with roaming.
About bluetooth, let's see. I had some experience with it when I implemented a bluetooth sound streaming. Regarding the factory image, I will ask zyxel.
First step would be an pull request robi can accept.
The base pull request has been submitted to robimarko. I also extracted to correct board-2.bin from vendor firmware, with integrated reg db. Perhaps you want to give it a try.
With that board-2.bin firmware 2.5 also works ![]()
Could you tell me what you're doing???
Hi!
The first step is to have basic support for NBG7915 in robimarkos branch, so we will have in in OpenWRT once it gets merged.
Next steps are full LED support, fan and bluetooth. I'll prepare now, but merge has to wait until it ipq807x is in OpenWRT.
There is already full LED support and fan!
We have lack of bluetooth, if you want to do something good instead of merging my repository,
try to solve problems that we have!!!