Thank you, I was able to successfully build using

NSS-12.5-K6.x-wwan branch. Now my problem was quectel-cm wont connect and its not getting an IP

It's worth to mention that we have a bug. At least on NBG7815 here. A reboot is causing a crash with the updated mac80211 in place on master. It would be interesting if other devices are affected as well. Respectivley if its the version bump or just a patch which got removed.

Maybe its worth to wait a bit until things are sorted out.

1 Like

@qosmio

6.11 can use,Currently, the wifi is normal and has not occurred netifd /hostapd fails to bring up the AP.

999-783-001-wifi-ath11k-Fix-BCCA-counter-for-EMA.patch
999-800-ath11k-Add-threaded-napi.patch

Do not delete, the patch should be slightly modified.





1 Like

@qosmio

with below changes mac80211 6.11 build bring up wifi

CONFIG_LIST_HARDENED literally crushes the general performance
It works better without it

gcc 14.2 snapshot can't build below patch i have to comment out the line

999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch

--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
/* +	tlv_filter.offset_valid = false; */
1 Like

All,

I've pushed fixes for backports 6.11. Considered unstable, but those who want to test can take look.

All targets (except MX4300/HomeWrk)
qualcommax-6.x-nss-wifi-6.11

All targets + MX4300/LN301 HomeWrk
qualcommax-6.x-nss-mx4300-6.11

Known Bugs:
ifconfig shows 0 bytes TX/RX on wlan interfaces
Kernel panic on reboot (workaround in place, will push once I test a bit more)

Other Changes:
I've also included 2 patches to revert the 256M/512M profiles, and disable RX TLV header. These shouldn't be needed anymore. Folks on AX3600 please test and see how memory usage holds up.

package/kernel/mac80211/patches/nss/ath11k/999-902-Revert-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch 
package/kernel/mac80211/patches/nss/ath11k/999-903-Revert-207-ath11k-Enable-256_512MB-profiles.patch
3 Likes

341-ath11k-fix-support-for-ext-vdev-in-NSS-for-AP_VLAN-v.patch

This patch should I delete it? It looks duplicate enabled nss_offload.

image

After the introduction of these two patches, my AX6 wireless disappeared.

The updated patch has problems:
1, The wireless display rate is 0;
2. The network is abnormal;
3. The kernel crashes, as shown by unresponsive routing.
Based on this, I made some adjustments to part of the patch and remove this both patches, and now all functions are normal and the speed is displayed normally.

package/kernel/mac80211/patches/nss/ath11k/999-902-Revert-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch 
package/kernel/mac80211/patches/nss/ath11k/999-903-Revert-207-ath11k-Enable-256_512MB-profiles.patch

Can submit pr for your review?
image

Patch 233 can be compiled with the following changes.

2 Likes

I've made a build for nbg7815 with ath11k-v2.12 and it's working fine. I will report if a problem appears.

1 Like

@qosmio

I made some adjustments to some patches, and now all functions are normal and the speed display is normal.

3 Likes

@qosmio

/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts:241.7-28: Warning (reg_format): /soc@0/spi@78b5000/flash@0/partitions/partition@650000/nvmem-layout/aqr-fw@0:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/image-ipq8074-nbg7815.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/image-ipq8074-nbg7815.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/image-ipq8074-nbg7815.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/image-ipq8074-nbg7815.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts:239.23-242.8: Warning (avoid_default_addr_size): /soc@0/spi@78b5000/flash@0/partitions/partition@650000/nvmem-layout/aqr-fw@0: Relying on default #address-cells value
/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts:239.23-242.8: Warning (avoid_default_addr_size): /soc@0/spi@78b5000/flash@0/partitions/partition@650000/nvmem-layout/aqr-fw@0: Relying on default #size-cells value
rm -f /home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/image-ipq8074-nbg7815.dtb.tmp

Thanks for the PR, however I'm afraid I can't merge this.

1.) You're using an older commit meant for 6.9.9. Tri-band devices like MX5300 and AX3600 have ath10k and ath11k radios so it fails compilation.

../mac80211-regular/backports-6.11/drivers/net/wireless/ath/ath10k/core.c: In function 'ath10k_core_create':
../mac80211-regular/backports-6.11/drivers/net/wireless/ath/ath10k/core.c:3731:30: error: 'ar->napi_dev' is a pointer; did you mean to use '->'?
 3731 |         snprintf(ar->napi_dev.name, sizeof(ar->napi_dev.name), "ath10k_%s",
      |                              ^
      |                              ->
../mac80211-regular/backports-6.11/drivers/net/wireless/ath/ath10k/core.c:3731:56: error: 'ar->napi_dev' is a pointer; did you mean to use '->'?
 3731 |         snprintf(ar->napi_dev.name, sizeof(ar->napi_dev.name), "ath10k_%s",
      |                                                        ^
      |                                                        ->

2.) I removed package/kernel/mac80211/patches/nss/ath11k/336-ath11k-skip-status-ring-entry-processing.patch because it's already merged upstream.

commit 4c2b796be3a12a11ab611917fafdabc9d3862a1d
Author:     Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
AuthorDate: Fri May 3 16:24:16 2024 +0300
Commit:     Kalle Valo <quic_kvalo@quicinc.com>
CommitDate: Tue May 7 13:00:01 2024 +0300

    wifi: ath11k: skip status ring entry processing

    If STATUS_BUFFER_DONE is not set for a monitor status ring entry,
    we don't process the status ring until STATUS_BUFFER_DONE set
    for that status ring entry.

    During LMAC reset it may happen that hardware will not write
    STATUS_BUFFER_DONE tlv in status buffer, in that case we end up
    waiting for STATUS_BUFFER_DONE leading to backpressure on monitor
    status ring.

    To fix the issue, when HP (Head Pointer) + 1 entry is peeked and if DMA is not
    done and if HP + 2 entry's DMA done is set, replenish HP + 1 entry and start
    processing in next interrupt. If HP + 2 entry's DMA done is not set, poll onto
    HP + 1 entry DMA done to be set.

    Also, during monitor attach HP points to the end of the ring and TP (Tail
    Pointer) points to the start of the ring.  Using ath11k_hal_srng_src_peek() may
    result in processing invalid buffer for the very first interrupt. Since, HW
    starts writing buffer from TP.

    To avoid this issue call ath11k_hal_srng_src_next_peek() instead of
    calling ath11k_hal_srng_src_peek().

This patch is an older version of the patch. It is now essentially only adding a warning message that is not necessary.

+				} else if (reap_status == DP_MON_STATUS_REPLINISH) {
+					ath11k_warn(ab, "mon status DONE not set %lx, buf_id %d\n",
+						    FIELD_GET(HAL_TLV_HDR_TAG, tlv->tl),
+						    buf_id);

3.) Sebastian's (@BrainSlayer) patch nss/ath11k/999-902-ath11k-fix-wds-ap-and-sta-mode-issues.patch needs to be properly accredited to him as a separate commit. I have to confirm this works before merging in. Have you actually tested this in a WDS setup?

Please test with just reverting the commit:
ath11k_nss: Revert patch for 512M + 2KB RX header

1 Like

They are related to formatting and structure in the device tree source, rather than critical errors that would prevent the system from booting or functioning properly. They exist upstream as well.

1 Like

@qosmio
Should this line of code be placed on top of p2p?

image

I used two patch commits yesterday, but the UI interface did not show the wireless menu, and the wireless startup failed in the system log. I'll be testing the new code tonight.

I'm not following what your diff of drivers/net/wireless/ath/ath11k/wmi.h is being compared against.

But to answer your question, no, the order of prototype definitions in C doesn't matter as long as they are self-contained and declared before their use in the code (*.c files).

@qosmio

not that it really matters but i've noticed that there is a substantial performance penalty when sending traffic from the access point it self (eg: 301w or nbg7815) to a directly wifi connected station (eg: connected to phy*-ap*). i am only talking about traffic which originates on "the access point you are connected to". so a running iperf3 server or librespeed instance etc.

here are 2 screenshots below, both access points are identical hardware, running the same image, with pretty much the same services / lack there of. they are both dumb aps.

the station running the iperf3 client is connected directly to 192.168.1.3 via 5g 160:

packet flow : dumb ap ---WIFI---> windows 10 iperf3 client:

packet flow : dumb ap ---wired lan---> dumb ap ---WIFI---> windows 10 iperf3 client:

dont get confused by the dumb ap -> dumb ap... its just that i have iperf3 servers running on both so i used those for testing to ensure the hardware is identical and this isnt a case of iperf3 not being able to keep up... the same happens if i use my NAS as the originating host which is NOT running openwrt, eg: i get near 2gbit tx/rx.

this is a build just before the ongoing 6.11 changes... the above situation has been the case for a number of months btw. im back on 11.4 on all my devices as you recommended and running zero additional patches. this is a clean 6.6.50 github/qosmio build :wink:

i checked my wire connected workstation and the above only happens via wifi. when running essentially the same test as the screenshots above but via an ethernet connected device, my 2.5gbe connected workstation is able to saturate the link both ways (-R and without) regardless of weather i go to the access point directly or through it to another device up the LAN.

guess : it appears that traffic which originates on the access point you are connected to is not NSS accelerated?

2 Likes

@qosmio

Local compilation appears this phenomenon, how to solve?

make[5]: Entering directory '/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52'
  SYNC    include/config/auto.conf.cmd
make[6]: *** read jobs pipe: No such file or directory.  Stop.
make[6]: *** Waiting for unfinished jobs....
Makefile:234: recipe for target '__sub-make' failed
make[5]: *** [__sub-make] Error 2
make[5]: Leaving directory '/home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52'
touch /home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52/.image
make -C image compile install TARGET_BUILD=
make[5]: Entering directory '/home/lin/ax6-6.x/target/linux/qualcommax/image'
make[5]: Nothing to be done for 'compile'.

@qosmio

Memory leak was severe.

No software is running, memory usage is heavy,the kernel crashes when the UI page is upgraded, and the route keeps blocking and restarting.

[  127.049868] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/,task=clash,pid=11950,uid=65534
[  127.058137] Out of memory: Killed process 11950 (clash) total-vm:1261788kB, anon-rss:50068kB, file-rss:0kB, shmem-rss:0kB, UID:65534 pgtables:184kB oom_score_adj:0
[  153.714366] clash invoked oom-killer: gfp_mask=0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), order=0, oom_score_adj=0
[  153.714434] CPU: 3 PID: 13512 Comm: clash Tainted: G           O       6.6.52 #0
[  153.724670] Hardware name: Redmi AX6 (DT)
[  153.732136] Call trace:
[  153.736030]  dump_backtrace+0xa0/0xd8
[  153.738289]  show_stack+0x18/0x24
[  153.742107]  dump_stack_lvl+0x48/0x60
[  153.745406]  dump_stack+0x18/0x24
[  153.749052]  dump_header+0x40/0x1b4
[  153.752350]  oom_kill_process+0x150/0x290
[  153.755650]  out_of_memory+0xc8/0x304
[  153.759816]  __alloc_pages+0x75c/0xc6c
[  153.763463]  __folio_alloc+0x14/0x20
[  153.767108]  vma_alloc_zeroed_movable_folio+0x24/0x30
[  153.770844]  __handle_mm_fault+0x3dc/0xa54
[  153.775800]  handle_mm_fault+0x1a0/0x2e8
[  153.779783]  do_page_fault+0x1d8/0x4b8
[  153.783861]  do_translation_fault+0x98/0xa8
[  153.787422]  do_mem_abort+0x40/0x90
[  153.791500]  el0_da+0x24/0x60
[  153.794972]  el0t_64_sync_handler+0xb4/0x12c
[  153.798099]  el0t_64_sync+0x178/0x17c
[  153.857855] Mem-Info:
[  153.857896] active_anon:13836 inactive_anon:32639 isolated_anon:0
[  153.857896]  active_file:236 inactive_file:351 isolated_file:0
[  153.857896]  unevictable:0 dirty:0 writeback:0
[  153.857896]  slab_reclaimable:2177 slab_unreclaimable:38545
[  153.857896]  mapped:55 shmem:18402 pagetables:456
[  153.857896]  sec_pagetables:0 bounce:0
[  153.857896]  kernel_misc_reclaimable:0
[  153.857896]  free:4060 free_pcp:215 free_cma:0
[  153.883170] Node 0 active_anon:124952kB inactive_anon:60948kB active_file:924kB inactive_file:1496kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:220kB dirty:0kB writeback:0kB shmem:73608kB writeback_tmp:0kB kernel_stack:3840kB pagetables:1824kB sec_pagetables:0kB all_unreclaimable? no
[  153.901995] DMA free:16628kB boost:0kB min:16384kB low:20480kB high:24576kB reserved_highatomic:0KB active_anon:124952kB inactive_anon:60948kB active_file:0kB inactive_file:2464kB unevictable:0kB writepending:0kB present:524288kB managed:414664kB mlocked:0kB bounce:0kB free_pcp:824kB local_pcp:88kB free_cma:0kB
[  153.929683] lowmem_reserve[]: 0 0 0 0
[  153.952090] DMA: 55*4kB (ME) 69*8kB (UE) 59*16kB (UME) 50*32kB (UME) 18*64kB (UME) 8*128kB (UME) 4*256kB (UE) 1*512kB (M) 1*1024kB (M) 2*2048kB (M) 1*4096kB (U) = 16244kB
[  153.955408] 18938 total pagecache pages
[  153.970513] 0 pages in swap cache
[  153.974221] Free swap  = 0kB
[  153.977709] Total swap = 0kB
[  153.980650] 131072 pages RAM
[  153.983507] 0 pages HighMem/MovableOnly

My device is Redmi AX6,the test situation is as follows:
1、Memory leakage occurs when the following two patches are imported,The cpu is heavily loaded,the kernel crashes. Delete the following two patches, and the memory usage recovers,The kernel does not crash, and routes are running normally,as shown below:

package/kernel/mac80211/patches/nss/ath11k/999-902-Revert-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch 
package/kernel/mac80211/patches/nss/ath11k/999-903-Revert-207-ath11k-Enable-256_512MB-profiles.patch

2、If the following patch 353 is not available, some videos on the mobile web page cannot be played. Restore the following patch 353 and restore the normal state. You are advised to introduce the following patch again.

package/kernel/mac80211/patches/nss/ath11k/353-ath11k-ignore-frags-from-uninitialized-peer-in-dp.patch

Im able to build using the latest from @qosmio repo. It was successful however when I added quectel cm / luci proto quectel and when quectel cm starts the modem auto reboot when sim is inserted.