IPQ806x NSS Drivers

Can you test usb speed?

[root@R7800:/mnt/sdb3]#/usr/bin/dd if=/dev/zero of=./largefile bs=64k count=1000
1000+0 records in
1000+0 records out
65536000 bytes (66 MB) copied, 0.605103 s, 108 MB/s
[root@R7800:/mnt/sdb3]#/usr/bin/dd if=/dev/zero of=./largefile bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 8.59317 s, 125 MB/s
[root@R7800:/mnt/sdb3]#sync && echo 3 > /proc/sys/vm/drop_caches
[root@R7800:/mnt/sdb3]#/usr/bin/dd if=./largefile of=/dev/null bs=8k
131072+0 records in
131072+0 records out
1073741824 bytes (1.1 GB) copied, 4.52066 s, 238 MB/s

Using a SanDisk Extreme USB 3.0 Flash Drive. I'm not sure what type of test you wanted me to run.

They said they r using stock Qualcomm driver, I’d checked the software packages, it’s not using ath10k for Wi-Fi, but using another driver

I’m new to OpenWRT, not sure how to identify the driver that they r using, maybe someone here can take a look

What I can say is the WiFi performance is definitely faster than the previous Hnyman build, I keep update to the latest version that he post, including CT version, but this one is the nearest to stock firmware performance

[Tue Jan 22 12:29:23 2019] ol_transfer_bin_file: flash data file defined
[Tue Jan 22 12:29:23 2019] ol_transfer_bin_file[3791] Get Caldata for wifi0.
[Tue Jan 22 12:29:23 2019] ol_transfer_bin_file 3852: Download Flash data len 12064
[Tue Jan 22 12:29:23 2019] ol_ath_download_firmware: Download OTP, flash download ADDRESS 0xc0000
[Tue Jan 22 12:29:23 2019] ol_transfer_bin_file 3672: downloading file 0, Download data len 9204
[Tue Jan 22 12:29:25 2019] ol_ath_download_firmware :First OTP download and Execute is good address:0x400 return param 4660
[Tue Jan 22 12:29:25 2019] ol_ath_download_firmware:##Board Id 1 , CHIP Id 0
[Tue Jan 22 12:29:25 2019] ol_ath_download_firmware: BOARDDATA DOWNLOAD TO address 0xc0000
**[Tue Jan 22 12:29:25 2019] ol_transfer_bin_file: Board Data File download to address=0xc0000 file name=QCA9984/hw.1/boardData_QCA9984_CUS239_5G_v1_001.bin**
[Tue Jan 22 12:29:25 2019] ol_transfer_bin_file 3672: downloading file 3, Download data len 12064
[Tue Jan 22 12:29:25 2019] ol_ath_download_firmware: Using 0x1234 for the remainder of init
[Tue Jan 22 12:29:26 2019] ol_transfer_bin_file 3672: downloading file 0, Download data len 9204
[Tue Jan 22 12:29:28 2019] ol_ath_download_firmware : Second OTP download and Execute is good, param=0x0
**[Tue Jan 22 12:29:28 2019] bin_filename=QCA9984/hw.1/athwlan.bin swap_filename=/lib/firmware/QCA9984/hw.1/athwlan.codeswap.bin**
**[Tue Jan 22 12:29:28 2019] ol_transfer_bin_file: Downloading firmware file: QCA9984/hw.1/athwlan.bin**
[Tue Jan 22 12:29:28 2019] ol_transfer_bin_file 3672: downloading file 1, Download data len 388916
[Tue Jan 22 12:29:31 2019] ol_transfer_bin_file: flash data file defined
[Tue Jan 22 12:29:31 2019] ol_transfer_bin_file[3791] Get Caldata for wifi1.
[Tue Jan 22 12:29:31 2019] ol_transfer_bin_file 3852: Download Flash data len 12064
[Tue Jan 22 12:29:31 2019] ol_ath_download_firmware: Download OTP, flash download ADDRESS 0xc0000
[Tue Jan 22 12:29:31 2019] ol_transfer_bin_file 3672: downloading file 0, Download data len 9204
[Tue Jan 22 12:29:33 2019] ol_ath_download_firmware :First OTP download and Execute is good address:0x800 return param 4660
[Tue Jan 22 12:29:33 2019] ol_ath_download_firmware:##Board Id 2 , CHIP Id 0
[Tue Jan 22 12:29:33 2019] ol_ath_download_firmware: BOARDDATA DOWNLOAD TO address 0xc0000
**[Tue Jan 22 12:29:33 2019] ol_transfer_bin_file: Board Data File download to address=0xc0000 file name=QCA9984/hw.1/boardData_QCA9984_CUS260_2G_v1_002.bin**
[Tue Jan 22 12:29:33 2019] ol_transfer_bin_file 3672: downloading file 3, Download data len 12064
[Tue Jan 22 12:29:33 2019] ol_ath_download_firmware: Using 0x1234 for the remainder of init
[Tue Jan 22 12:29:33 2019] ol_transfer_bin_file 3672: downloading file 0, Download data len 9204
[Tue Jan 22 12:29:35 2019] ol_ath_download_firmware : Second OTP download and Execute is good, param=0x0
**[Tue Jan 22 12:29:35 2019] bin_filename=QCA9984/hw.1/athwlan.bin swap_filename=/lib/firmware/QCA9984/hw.1/athwlan.codeswap.bin**
**[Tue Jan 22 12:29:36 2019] ol_transfer_bin_file: Downloading firmware file: QCA9984/hw.1/athwlan.bin**
[Tue Jan 22 12:29:36 2019] ol_transfer_bin_file 3672: downloading file 1, Download data len 388916

Yea, looks to be stock wifi drivers. Which I guess makes sense as to why kernel 3.14 is used.

Side note, are you able to view the wireless status page? Most of my pages in Luci aren't working. And I'm getting a flood of output in my logs. Especially the infamous:

Buffer I/O error on device mtdblock1, logical block 5

That looks like QSDK on which most commercial ipq devices are based, and which itself is based on a very old openwrt.

Hi folks,

I think I've identified the source of the random reboots when the qca-nss-drv driver is loaded with the NSS firmware activated to receive and transmit network packets.

The random reboots should be caused by the gcc clocks used by the NSS cores. It's likely the kernel is disabling the clocks when it finds the clocks not used. The kernel source from CodeAurora actually has the CLK_IGNORE_UNUSED flag configured for both the NSS core clocks, while my test builds were without that flag configured. So I guess when the kernel disabled the clocks, the NSS firmware cannot process incoming or outgoing network packets, causing the watchdog timers to time out and reboot the router.

My R7800 is running for 18 hours without the random reboots I experience earlier. I'm not really certain that the issue is fixed, but I'm keeping my fingers crossed.

If anyone with a R7800 is brave enough to help test my builds, you can download it from the link below in the 'test-builds' folder:

https://app.box.com/s/7eaut583pcxs7lkqtsd6mehn0cqha3hr

You can find the source code here to build your own firmware image:

Do note that my builds has bad WiFi thruput performance as the ath10k driver's network interface is not recognised by the NSS firmware as one that it can accelerate, so it's likely going thru the slow path, maxing out the CPU and limiting thruput. Max I can get out of the WiFi interface is around 400mbps, compared to around 500mbps with shortcut-fe installed, for a 2x2 80MHz channel.

It has excellent ethernet thruput tho. It can achieve around 950mbps (up & down) with close to zero CPU utilisation, tested with iPerf 3.

2 Likes

Any chance to get a c2600 build based on stable? Would like to try it at home over the weekend.

As I don't have a C2600 to play with, it'll be difficult for me to have an image built that will work properly for it.

Hopefully developers with a C2600 can join in the fun and provide a community build.

No problem :slight_smile:
Maybe you can change the title to better advertise this thread? I will check once at home for people actively working on this device and invite them over here.

Good work and thank you very much.

I think the title is apt as it applies to the C2600 as well.

I can try to compile an image for the C2600 over the weekend for you to test. It shouldn’t be too much work. Just that I cannot guarantee that it’ll work or it’ll not brick your router. If your C2600 is your main router, I’ll suggest to wait until someone confirms that it’ll work.

So far my R7800 hasn’t spontaneously rebooting itself after more that 24 hours. So I guess the instability issue caused by the NSS drivers and firmware should be resolved.

1 Like

But not for R7500v2, I presume? IPQ8064 instead of the 8065 that the R7800 has. The NSS cores have different clocks and, well obviously, the SoC is different.

The NSS driver are applicable for both ipq8064 and ipq8065. The TP-Link C2600 and the Netgear R7500 both uses the ipq8064 SOC.

We just need to add the appropriate device configuration in OpenWRT’s router DTS and we should be good to go, for the ipq806x routers.

1 Like

I'm currently using your build from git under the lede-17.01-quarkysg-qca-nss branch, is there a specific compile time setting or option in menuconfig you're using? I'm still getting a build that reboots randomly.

Also, I know you said the wifi drivers are using ath10k... Any chance of getting the qca-wifi drivers to compile? I'm having a lot of trouble getting it to work. I'm using the SDK drivers from the BR500 git repo for that btw.

@qosmio I committed the fix 2 days ago. Are you using the latest commits? I’ve committed the configs in the config_deploy folder. Use that to replace your .config file before you compile.

As for the qca-wifi drivers it’s closed source right? Do you have the sources?

Yes, I believe so... Although, I'll admit I might have been using a mix of the drivers I found from the BR500 repo. I updated yours to use GCC 6.3.0 and a later binutils. I'll rebase, clean and try again.

I think the binaries are closed source for the drivers, but the qca-wifi kernel hooks (sorry, not sure what you'd call it) are open source. I'm basing this on what I found for the BR500 which seems to be very similar to R7800

http://git.siteview.com/gitblit/tree/BR500_openwrt.git

@qosmio if you trust what I’ve compiled do try what I’ve uploaded into my Box account. If you have access to your R7800 serial console, you can use the initramfs image to test and see if the random reboots still occurs. That way you don’t need to flash the image into your router’s flash memory.

Looks like I needed to manually purge the qca-nss-drv folders out of staging and build. Did a target/linux/clean as well and so, been up for 2 hours! Everything's running pretty smoothly. And I can hit like speeds of 968mbps on my fiber. Great work! :slight_smile:

Would be awesome if you were able to get the qca-wifi drivers working. I can finally bring this router back into commission!

Will keep testing this overnight with some heavy dl/ul tests.

@quarky Shouldnt simply passing clk_ignore_unused to bootargs tell kernel to not disable them without having to patch anything?

1 Like

Yes, that should work too.

I would recommend a ‘make clean’.

Improving WiFi performance would be my next goal. Don’t hold your breath for it tho. :grimacing: