Archer C7 V1.0 crashes on boot

in this case, the explanation was is in the comment field


ath10k on this device causes a boot loop in 17.03 and newer OpenWrt, removing minipcie card or building image without ath10k should work

When the fix is implemented, please change that as well

Both ath79 in master and 19.07 have ath10k removed now, but I'm at work so I have no access to my wiki account.

1 Like

I have added an infobox to https://openwrt.org/toh/tp-link/archer-c7-1750 regarding the C7 v1 bootloop.

Please review and edit as appropriate.

For the moment, the best a user can do is to install a prebuilt snapshot (or build his own snapshot / 19.07), therefore I will change the dataentry from 18.06.5 -> snapshot. 19.07 is on the way (...kind of...), so the final solution is near.

1 Like

Shouldn't the box read ' 5 GHz WiFi won't work?'

2,4 GHz WiFi is part of the ath79 SoC.

1 Like

Thanks for the notice, I have corrected this now.

Just for the avoidance of doubt, the QCA9880-AR1A on the c7-v1 (instead of the later QCA9880-BR4A used in the c7-v2 and most other devices) has never been supported by ath10k in the first place. While the driver removal should fix the bootloop, the removal is not the cause for the 5 GHz WLAN card failing to work. I have no idea why ath10k and ath10k-firmware-qca988x had been added to its profiles in the first place, but can only assume that the original submitter had either replaced their QCA9880-AR1A card with QCA9880-BR4A, cargo-culted it from the c7-v2 or just hoped that support for the older QCA9880-AR1A chipset would be added one day[0] - but at no point in time was this actually working on an unmodified c7-v1.

I'd suggest to change

Please mind that due to removal of the wifi driver, 5GHz wifi will not work.

into something like

Please mind that 5GHz wifi will not work on the C7 v1.

--
[0] this has hope been explicitly rejected by both ath10k- and ath10k-ct upstreams within the last couple of months.

1 Like

I've adapted the wording.

it gets further, alongside several bugs and crashes, this time scan picked up my other AP and its MAC address :woozy_face:

[   30.648460] ath10k_pci 0000:01:00.0: scan event foreign channel type 8 reason 3 freq 5180 req_id 40961 scan_id 40960 vdev_id 0 state running (2)
[   30.661598] ath10k_pci 0000:01:00.0: pci rx ce pipe 2 len 36
[   30.667344] ath10k_pci 0000:01:00.0: pci rx: 00000000: 02 00 1c 00 00 2c 00 00 0e 90 00 00 00 00 00 00  .....,..........
[   30.678369] ath10k_pci 0000:01:00.0: pci rx: 00000010: 3c 14 00 00 00 00 00 00 00 00 00 00 a0 b2 05 00  <...............
[   30.689394] ath10k_pci 0000:01:00.0: pci rx: 00000020: 50 b5 07 00                                      P...
[   30.699365] ath10k_pci 0000:01:00.0: htc rx completion ep 2 skb 876d9e40
[   30.706159] ath10k_pci 0000:01:00.0: testmode event wmi cmd_id 36878 skb 876d9e40 skb->len 24
[   30.714812] ath10k_pci 0000:01:00.0: 00000000: 00 00 00 00 3c 14 00 00 00 00 00 00 00 00 00 00  ....<...........
[   30.725132] ath10k_pci 0000:01:00.0: 00000010: a0 b2 05 00 50 b5 07 00                          ....P...
[   30.734750] ath10k_pci 0000:01:00.0: wmi event phyerr count 0 tsf64 0x143C
[   30.855309] ath10k_pci 0000:01:00.0: pci rx ce pipe 2 len 268
[   30.861183] ath10k_pci 0000:01:00.0: pci rx: 00000000: 02 00 04 01 00 2d 00 00 0d 90 00 00 24 00 00 00  .....-......$...
[   30.872211] ath10k_pci 0000:01:00.0: pci rx: 00000010: 2e 00 00 00 70 17 00 00 00 00 00 00 e7 00 00 00  ....p...........
[   30.883241] ath10k_pci 0000:01:00.0: pci rx: 00000020: 00 00 00 00 80 00 00 00 ff ff ff ff ff ff 18 e8  ................
[   30.894268] ath10k_pci 0000:01:00.0: pci rx: 00000030: 29 30 a7 7d 18 e8 29 30 a7 7d 00 c9 3b e0 4e 80  )0.}..)0.}..;.N.
[   30.905294] ath10k_pci 0000:01:00.0: pci rx: 00000040: 00 00 00 00 64 00 11 00 00 08 4f 70 65 6e 57 72  ....d.....OpenWr
[   30.916320] ath10k_pci 0000:01:00.0: pci rx: 00000050: 74 35 01 08 8c 12 98 24 b0 48 60 6c 03 01 24 05  t5.....$.H`l..$.
[   30.927347] ath10k_pci 0000:01:00.0: pci rx: 00000060: 04 00 02 00 00 07 0c 55 53 20 24 08 1e 64 0c 1e  .......US $..d..
[   30.938372] ath10k_pci 0000:01:00.0: pci rx: 00000070: 95 07 1e 30 18 01 00 00 0f ac 04 01 00 00 0f ac  ...0............
[   30.949399] ath10k_pci 0000:01:00.0: pci rx: 00000080: 04 02 00 00 0f ac 02 00 0f ac 06 8c 00 0b 05 03  ................
[   30.960426] ath10k_pci 0000:01:00.0: pci rx: 00000090: 00 1c 00 00 3b 02 80 00 2d 1a ef 09 1b ff ff 00  ....;...-.......
[   30.971453] ath10k_pci 0000:01:00.0: pci rx: 000000a0: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00  ................
[   30.982478] ath10k_pci 0000:01:00.0: pci rx: 000000b0: 00 00 00 00 3d 16 24 05 04 00 00 00 00 00 00 00  ....=.$.........
[   30.993506] ath10k_pci 0000:01:00.0: pci rx: 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 04 00  ................
[   31.004531] ath10k_pci 0000:01:00.0: pci rx: 000000d0: 00 00 00 00 01 40 bf 0c b2 01 80 33 fa ff 00 00  .....@.....3....
[   31.015557] ath10k_pci 0000:01:00.0: pci rx: 000000e0: fa ff 00 00 c0 05 01 2a 00 fc ff c3 04 02 3c 3c  .......*......<<
[   31.026584] ath10k_pci 0000:01:00.0: pci rx: 000000f0: 3c dd 18 00 50 f2 02 01 01 80 00 03 a4 00 00 27  <...P..........'
[   31.037611] ath10k_pci 0000:01:00.0: pci rx: 00000100: a4 00 00 42 43 5e 00 62 32 2f 00 af              ...BC^.b2/..
[   31.048287] ath10k_pci 0000:01:00.0: htc rx completion ep 2 skb 876d9f00
[   31.055080] ath10k_pci 0000:01:00.0: testmode event wmi cmd_id 36877 skb 876d9f00 skb->len 256
[   31.063818] ath10k_pci 0000:01:00.0: 00000000: 24 00 00 00 2e 00 00 00 70 17 00 00 00 00 00 00  $.......p.......
[   31.074141] ath10k_pci 0000:01:00.0: 00000010: e7 00 00 00 00 00 00 00 80 00 00 00 ff ff ff ff  ................
[   31.084462] ath10k_pci 0000:01:00.0: 00000020: ff ff 18 e8 29 30 a7 7d 18 e8 29 30 a7 7d 00 c9  ....)0.}..)0.}..
[   31.094784] ath10k_pci 0000:01:00.0: 00000030: 3b e0 4e 80 00 00 00 00 64 00 11 00 00 08 4f 70  ;.N.....d.....Op
[   31.105107] ath10k_pci 0000:01:00.0: 00000040: 65 6e 57 72 74 35 01 08 8c 12 98 24 b0 48 60 6c  enWrt5.....$.H`l
[   31.115433] ath10k_pci 0000:01:00.0: 00000050: 03 01 24 05 04 00 02 00 00 07 0c 55 53 20 24 08  ..$........US $.
[   31.125751] ath10k_pci 0000:01:00.0: 00000060: 1e 64 0c 1e 95 07 1e 30 18 01 00 00 0f ac 04 01  .d.....0........
[   31.136074] ath10k_pci 0000:01:00.0: 00000070: 00 00 0f ac 04 02 00 00 0f ac 02 00 0f ac 06 8c  ................
[   31.146396] ath10k_pci 0000:01:00.0: 00000080: 00 0b 05 03 00 1c 00 00 3b 02 80 00 2d 1a ef 09  ........;...-...
[   31.156719] ath10k_pci 0000:01:00.0: 00000090: 1b ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00  ................
[   31.167042] ath10k_pci 0000:01:00.0: 000000a0: 00 00 00 00 00 00 00 00 3d 16 24 05 04 00 00 00  ........=.$.....
[   31.177363] ath10k_pci 0000:01:00.0: 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[   31.187685] ath10k_pci 0000:01:00.0: 000000c0: 7f 08 04 00 00 00 00 00 01 40 bf 0c b2 01 80 33  .........@.....3
[   31.198009] ath10k_pci 0000:01:00.0: 000000d0: fa ff 00 00 fa ff 00 00 c0 05 01 2a 00 fc ff c3  ...........*....
[   31.208330] ath10k_pci 0000:01:00.0: 000000e0: 04 02 3c 3c 3c dd 18 00 50 f2 02 01 01 80 00 03  ..<<<...P.......
[   31.218653] ath10k_pci 0000:01:00.0: 000000f0: a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 af  ...'...BC^.b2/..
[   31.228979] ath10k_pci 0000:01:00.0: chan info err_code 36 freq 46 cmd_flags 6000 noise_floor 0 rx_clear_count 231 cycle_count 0

full output: https://pastebin.com/w3YzeDM5

update>
AP enabled and beaconing in 20mhz mode

final update:

card enabled with ath10k driver, stressed with 10 TCP streams using iperf for about 5h30min, about 1TB of traffic made during that time, avg 442Mbps (2x2 STA), remained stable without any driver related log messages.
still didn't completely fix crashes on boot but at least allows device to start and get in usable state

1 Like

Is it possible for you to post a build of the firmware please? Sounds promising if it only crashes during startup.

changes have been submitted here https://github.com/openwrt/openwrt/pull/2674
maybe you can try to build it and if it works for you leave a reply there. that way it helps maintainers to include it in the main tree

I'll try to see if I can figure it out on the weekend.

Hopefully that change progresses.

1 Like

@psyborg I wasn't able to compile the firmware. Would you be able to provide a precompiled image? Or assist me with compilation? I'm quite interested in your patch!

Hunk #1 succeeded at 4515 (offset 2 lines).
Hunk #2 succeeded at 4844 (offset 2 lines).
patching file drivers/net/wireless/ath/ath10k/pci.c
Hunk #6 succeeded at 2671 (offset 15 lines).
Hunk #7 succeeded at 3360 (offset 15 lines).
Hunk #8 FAILED at 3696.
Hunk #9 succeeded at 3866 (offset 29 lines).

don't have builddir anymore...
do you have patch reject file (.rej) somewhere when building?
try changing failed hunk manually otherwise

I've tried to compare the rej file and the pci.c file but it seems that the pci.c file has been changed since you wrote the patch? This is a little new to me.

The rej file has the following inside it.

--- drivers/net/wireless/ath/ath10k/pci.c
+++ drivers/net/wireless/ath/ath10k/pci.c
@@ -3696,14 +3773,21 @@ static int ath10k_pci_probe(struct pci_d
 		goto err_deinit_irq;
 	}
 
+	bus_params.dev_type = ATH10K_DEV_TYPE_LL;
+	bus_params.link_can_suspend = true;
+	bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
+
+	if (bus_params.chip_id == 0x043200ff) {
+		ar_pci->pci_soft_reset = NULL;
+		ar_pci->pci_hard_reset = ath10k_pci_qca988x_v1_chip_reset;
+	}
+
 	ret = ath10k_pci_chip_reset(ar);
 	if (ret) {
 		ath10k_err(ar, "failed to reset chip: %d\n", ret);
 		goto err_free_irq;
 	}
 
-	bus_params.dev_type = ATH10K_DEV_TYPE_LL;
-	bus_params.link_can_suspend = true;
 	bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
 	if (bus_params.chip_id == 0xffffffff) {
 		ath10k_err(ar, "failed to get chip id\n");


you have to revert this crap https://patchwork.kernel.org/patch/11136091/ and then patch with the above hunk manually if autopatching fails

A bit over my head now.

Would it be difficult to create a package that implements the changes you've made? Or would be a nightmare to maintain.

simply copy the patch from kernel to a new file in package/kernel/mac80211/patches/ath/ and name it 981-whatever... so its applied before 982 patch. replace - with + in that patch and vice versa

Thanks for your help. I've changed the + and - but didn't change the --- or +++.

Do I need to include firmware-1.bin and board.bin in the firmware?

1 Like

yes include them in build with proper path or upload to device after flashing