Archer C7 V1.0 crashes on boot

The build fails again this time at the new patch. I've checked to ensure that the indentation is correct. It looks like pci.c doesn't have the mentioned line?

pci.c

        case QCA988X_2_0_DEVICE_ID:
                hw_rev = ATH10K_HW_QCA988X;
                pci_ps = false;
                pci_soft_reset = ath10k_pci_warm_reset;
                pci_hard_reset = ath10k_pci_qca988x_chip_reset;
                targ_cpu_to_ce_addr = ath10k_pci_qca988x_targ_cpu_to_ce_addr;
                break;

build error

Applying ./patches/ath/980-revertcrap.mod.patch using plaintext: 
patching file drivers/net/wireless/ath/ath10k/pci.c
Hunk #1 succeeded at 3505 (offset 15 lines).
patch: **** malformed patch at line 21: 		targ_cpu_to_ce_addr = ath10k_pci_qca988x_targ_cpu_to_ce_addr;

why don't you checkout older revision? mac80211 was updated a week ago. anything before that should build fine

So I've tried to check out an older version from 31 march but I get the same error.
I suspect its something to do with the feeds part?

#https://openwrt.org/docs/guide-developer/build-system/install-buildsystem
#https://openwrt.org/docs/guide-developer/build-system/use-buildsystem
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git checkout `git rev-list -1 --before="Mar 31 2020" master`
#edit generic-tp-link.mk in both locations to add kmod-ath10k as per pull
vi ~/openwrt/target/linux/ar71xx/image/generic-tp-link.mk
vi ~/openwrt/target/linux/ath79/image/generic-tp-link.mk
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make defconfig
make menuconfig
make download
cd ~
cp 982-ath10k-qca9880-ar1a-archer-c7-wdr7500.patch 980-revertcrap.mod.patch ~/openwrt/package/kernel/mac80211/patches/ath/.
cp files openwrt/.
cd openwrt
make -j5 V=s

check git log of main tree at git.openwrt.org !

9 days ago Hauke Mehrtens mac80211: Update to version 5.4.27

Would I do

git checkout 94949801dec54892046f76e913273df529783cc1

For a copy as of https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=94949801dec54892046f76e913273df529783cc1 ?

Also do I still need to do feeds update / install ?

yes.

feeds update if you need packages these feeds provide

So I tried the following. No feeds update.

#https://openwrt.org/docs/guide-developer/build-system/install-buildsystem
#https://openwrt.org/docs/guide-developer/build-system/use-buildsystem
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git checkout 94949801dec54892046f76e913273df529783cc1
#edit generic-tp-link.mk in both locations to add kmod-ath10k as per pull
vi ~/openwrt/target/linux/ar71xx/image/generic-tp-link.mk
vi ~/openwrt/target/linux/ath79/image/generic-tp-link.mk
make menuconfig
make defconfig
make menuconfig
make download
cd ~
cp 982-ath10k-qca9880-ar1a-archer-c7-wdr7500.patch 980-revertcrap.mod.patch ~/openwrt/package/kernel/mac80211/patches/ath/.
cp -r files openwrt/.
cd openwrt
make -j5 V=s

Error

Applying ./patches/ath/980-revertcrap.mod.patch using plaintext: 
patching file drivers/net/wireless/ath/ath10k/pci.c
Hunk #1 FAILED at 3490.
patch: **** malformed patch at line 21: 		targ_cpu_to_ce_addr = ath10k_pci_qca988x_targ_cpu_to_ce_addr;

remove patch 980-revertcrap it is not needed before mac80211 update.
if still can't build or run into another error that you can't fix, start over but clone the code revision from jan 3 2020

Firmware has been built successfully and the extra radio is working. I'll test it out and report back. Thanks for your work @psyborg. Hopefully it'll get added to the official firmware.

If anyone else wants to build the firmware here are the instructions. I can upload the firmware files if anyone is interested in prebuilt.

#https://openwrt.org/docs/guide-developer/build-system/install-buildsystem
#https://openwrt.org/docs/guide-developer/build-system/use-buildsystem
#https://github.com/openwrt/openwrt/pull/2674
#https://github.com/psyborg55/tp-link/tree/master/QCA9880-AR1A
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git checkout 94949801dec54892046f76e913273df529783cc1
#edit generic-tp-link.mk in both locations to add kmod-ath10k as per pull
vi ~/openwrt/target/linux/ar71xx/image/generic-tp-link.mk
vi ~/openwrt/target/linux/ath79/image/generic-tp-link.mk
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make defconfig
make menuconfig
make download
cd ~
#copy patch
cp 982-ath10k-qca9880-ar1a-archer-c7-wdr7500.patch ~/openwrt/package/kernel/mac80211/patches/ath/.
#copy firmware bin files
mkdir -p ~/openwrt/files/lib/firmware/ath10k/QCA988X/hw1.0/
cp -r files/*.bin ~/openwrt/files/lib/firmware/ath10k/QCA988X/hw1.0/.
cd openwrt
make -j5 V=s
1 Like

In my kernel log I'm seeing the following messages. Around the same time I was changing some wireless settings. I'll see if they persist.

[ 2683.499841] ath10k_pci 0000:00:00.0: pdev param 0 not supported by firmware
[ 2683.509444] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2683.520591] br-lan: port 3(wlan0) entered blocking state
[ 2683.525986] br-lan: port 3(wlan0) entered disabled state
[ 2683.531745] device wlan0 entered promiscuous mode
[ 2696.955437] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2697.157463] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2697.252397] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2700.059797] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2700.079322] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.255198] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.261009] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.266663] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.455016] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.551452] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.557222] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.565672] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.647909] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.653585] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2718.659581] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2739.665014] ath10k_warn: 1 callbacks suppressed
[ 2739.665029] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2739.865019] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2739.961297] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2739.967074] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2739.972759] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2740.057941] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2743.122164] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2743.127849] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2743.133653] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2743.139345] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2752.427277] ath10k_warn: 25 callbacks suppressed
[ 2752.427293] ath10k_pci 0000:00:00.0: failed to flush transmit queue (skip 0 ar-state 1): 0
[ 2752.881143] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2752.887801] br-lan: port 3(wlan0) entered blocking state
[ 2752.893208] br-lan: port 3(wlan0) entered forwarding state
[ 2763.946470] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2764.244593] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2768.945176] device wlan0 left promiscuous mode
[ 2768.949826] br-lan: port 3(wlan0) entered disabled state
[ 2774.027341] ath10k_pci 0000:00:00.0: failed to flush transmit queue (skip 0 ar-state 1): 0
[ 2779.095466] ath10k_pci 0000:00:00.0: pdev param 0 not supported by firmware
[ 2779.105787] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2779.117496] br-lan: port 3(wlan0) entered blocking state
[ 2779.122941] br-lan: port 3(wlan0) entered disabled state
[ 2779.128667] device wlan0 entered promiscuous mode
[ 2806.567471] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2830.907010] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2830.912777] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2852.256787] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2859.946957] ath10k_pci 0000:00:00.0: failed to flush transmit queue (skip 0 ar-state 1): 0
[ 2860.283026] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2860.289784] br-lan: port 3(wlan0) entered blocking state
[ 2860.295196] br-lan: port 3(wlan0) entered forwarding state
[ 2876.546426] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2897.757662] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2897.763434] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2919.016847] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2941.083072] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2943.348360] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2954.284393] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2954.482022] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2954.576177] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2954.670132] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2954.675885] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2971.656864] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2977.816235] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.075174] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.095192] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.226569] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.232751] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.238477] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.246664] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.355627] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.501954] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2978.650045] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2983.866981] ath10k_warn: 2 callbacks suppressed
[ 2983.866995] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2988.032738] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2990.240720] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2993.088489] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2994.265227] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2994.321873] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2994.693716] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2994.847782] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2996.155821] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2996.232815] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2996.860920] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 2997.084797] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3003.927632] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3003.964360] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3004.129014] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3004.288271] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3004.407278] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3004.469184] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3004.568659] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3004.746771] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3004.965314] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3005.105361] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.026666] ath10k_warn: 29 callbacks suppressed
[ 3009.026680] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.046656] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.058168] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.173236] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.279403] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.303760] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.623746] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.778744] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.948145] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3009.965183] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.082516] ath10k_warn: 148 callbacks suppressed
[ 3014.082530] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.120618] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.138578] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.152615] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.181746] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.194339] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.242512] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.249124] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.296033] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3014.306829] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3023.130559] ath10k_warn: 23 callbacks suppressed
[ 3023.130574] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3024.822912] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3024.854416] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3024.935685] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3025.084623] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3025.131436] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3025.152018] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3025.259418] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3025.265920] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3025.275027] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3031.563357] ath10k_warn: 15 callbacks suppressed
[ 3031.563372] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3038.306741] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3047.159827] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3047.511462] ath10k_pci 0000:00:00.0: Unknown eventid: 36879
[ 3047.601449] ath10k_pci 0000:00:00.0: Unknown eventid: 36879

that is expected (for now) since tp-link changed event and cmd ids and i didn't yet went through all of these to verify them, instead i just disabled unverified functionality. if for some reason device stops working during wifi reconfiguring just apply settings you want and reboot router. also try power cycling a few times to see if it will crash during boot (sources claim there is about 10% of cards that don't suffer from one of the hw bugs)

I've power cycled the device 6 times and it comes up fine. The 5ghz takes a while to appear but it's the same behaviour as my other TP Link router.

Let me know if there's anything else I can do to help.

ath10k_pci 0000:00:00.0: Unknown eventid: 36879

Is there anyway to suppress or get rid of these messages? It fills up the system log.

find "Unknown eventid:" in ath10k/wmi.c and delete whole line or move to dbg level

Definitely some issues

After 12 hours of uptime, I couldn't connect to the 5GHz. I changed some settings on it and now it keeps doing this:

Fri Apr 10 xx 2020 daemon.info hostapd: wlan0: STA xxxx IEEE 802.11: disconnected due to excessive missing ACKs
Fri Apr 10 xx 2020 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED xxxx

I've changed the missing acks setting and rebooted. Seems to be better now.

Clients get disconnected and can't reconnect to the SSID. It seems as though after a period of time the SSID starts working again without any intervention. Happy to help debug this issue.

Maybe the "Unknown eventid: 36879" is important?

Fri Apr 10 xxx41 2020 daemon.info hostapd: wlan0: STA xxx IEEE 802.11: authenticated
Fri Apr 10 xxx41 2020 daemon.notice hostapd: wlan0: STA-OPMODE-MAX-BW-CHANGED xxx 20(no-HT)
Fri Apr 10 xxx41 2020 daemon.notice hostapd: wlan0: STA-OPMODE-N_SS-CHANGED xxx 2
Fri Apr 10 xxx41 2020 daemon.info hostapd: wlan0: STA xxx IEEE 802.11: associated (aid 3)
Fri Apr 10 xxx41 2020 daemon.notice hostapd: wlan0: AP-STA-CONNECTED xxx
Fri Apr 10 xxx41 2020 daemon.info hostapd: wlan0: STA xxx WPA: pairwise key handshake completed (RSN)
Fri Apr 10 xxx44 2020 kern.warn kernel: [ 9870.780249] ath10k_warn: 24 callbacks suppressed

havent really test the AP mode, except for one stress test and a few short tests with two linux laptops. maybe some of your devices cause issue.
i'm using it in client mode for past week and had zero issues with it during that time

Possibly something with my devices/ap mode. I'm using c7 as my main device for testing at the moment. Prior to this I was using wdr3600 openwrt device and the same devices worked fine.

I'll try to see if changing settings helps with stability.

Looks like the 5ghz device has crashed completely.

29:18 2020 kern.warn kernel: [ 9361.780477] WARNING: CPU: 0 PID: 124 at backports-5.4-rc8-1/net/mac80211/driver-ops.c:36 ieee80211_add_virtual_monitor+0xa00/0xaa8 [mac80211]
29:18 2020 kern.warn kernel: [ 9361.793392] Modules linked in: ath9k ath9k_common pppoe ppp_async iptable_nat ipt_MASQUERADE ath9k_hw ath10k_pci ath10k_core ath xt_state xt_nat xt_conntrack xt_REDIRECT xt_FLOWOFFLOAD pppox ppp_generic nf_nat_ipv4 nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport ledtrig_heartbeat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
29:18 2020 kern.warn kernel: [ 9361.857994] CPU: 0 PID: 124 Comm: kworker/0:1 Tainted: G        W         4.19.108 #0
29:18 2020 kern.warn kernel: [ 9361.866024] Workqueue: events_freezable ieee80211_alloc_hw_nm [mac80211]
29:18 2020 kern.warn kernel: [ 9361.872857] Stack : 80537210 87719674 8776db50 00000024 00000000 800b87b0 87df02f4 00000000
29:18 2020 kern.warn kernel: [ 9361.881341]         00000017 87d8d638 805371f8 87de7bec 80590000 00000001 87de7bc0 478b33ed
29:18 2020 kern.warn kernel: [ 9361.889833]         00000000 00000000 805a7030 00000a87 00000000 00000000 00000007 00000000
29:18 2020 kern.warn kernel: [ 9361.898330]         00000a87 80710000 00000000 000d36e8 00000000 00000009 00000000 87719674
29:18 2020 kern.warn kernel: [ 9361.906829]         8776db50 00000024 00000000 00000001 00000003 802c3894 00000000 806f0000
29:18 2020 kern.warn kernel: [ 9361.915323]         ...
29:18 2020 kern.warn kernel: [ 9361.917874] Call Trace:
29:18 2020 kern.warn kernel: [ 9361.920406] [<8006b0c4>] show_stack+0x58/0x100
29:18 2020 kern.warn kernel: [ 9361.924965] [<80086250>] __warn+0xe4/0x13c
29:18 2020 kern.warn kernel: [ 9361.929148] [<800862f0>] warn_slowpath_null+0x48/0x68
29:18 2020 kern.warn kernel: [ 9361.934428] [<87719674>] ieee80211_add_virtual_monitor+0xa00/0xaa8 [mac80211]
29:18 2020 kern.warn kernel: [ 9361.941761] ---[ end trace 43a1ae5a555b22f0 ]---
29:18 2020 kern.info kernel: [ 9361.946727] br-lan: port 3(wlan0) entered disabled state
29:18 2020 daemon.notice netifd: Network device 'wlan0' link is down

whenever you change some setting related to 5ghz, make sure new config is actually saved and then reboot device. if you experience problems after that (without messing with config after clean boot) post the logs.
otherwise i know it will crash and that is expected since the patch added only basic support