Hi,
I found the reason, why the ath10k driver isn't initialized properly after
reboot with backports 5.15.33-1. It is related to regulatory domain settings.
If I add the following code from backports 5.15.8-1
diff -upr a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
--- a/drivers/net/wireless/ath/regd.c 1970-01-01 01:00:00.000000000 +0100
+++ b/drivers/net/wireless/ath/regd.c 1970-01-01 01:00:00.000000000 +0100
@@ -667,14 +667,14 @@ ath_regd_init_wiphy(struct ath_regulator
/*
* Some users have reported their EEPROM programmed with
- * 0x8000 set, this is not a supported regulatory domain
- * but since we have more than one user with it we need
- * a solution for them. We default to 0x64, which is the
- * default Atheros world regulatory domain.
+ * 0x8000 or 0x0 set, this is not a supported regulatory
+ * domain but since we have more than one user with it we
+ * need a solution for them. We default to 0x64, which is
+ * the default Atheros world regulatory domain.
*/
static void ath_regd_sanitize(struct ath_regulatory *reg)
{
- if (reg->current_rd != COUNTRY_ERD_FLAG)
+ if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0)
return;
printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
reg->current_rd = 0x64;
the driver does start after reboot.
I think, this a dirty fix only and something in the regulatory domain code is
wrong, since the ath9k driver doesn't have this problem.
Regards,
Hartmut
Am 19.05.2022 um 15:04 schrieb e9hack:
Am 19.05.2022 um 14:07 schrieb Hauke Mehrtens:
On 5/16/22 15:54, e9hack wrote:
Hi,
I've trouble with the following commit:
commit 3aa96efa24c13c6e0aafa5ad826f3f95a3bd74f9
mac80211: Update to version 5.15.33-1
After this commit the 5G wifi interface doesn't start properly. The interfaces are
visible with ifconfig, but it isn't visible on air. To get 5G working, I must
restart hostapd. I'm doing this with the following command 'wifi down; sleep 5;
killall -9 hostapd; sleep 5; wifi &'.
Any idea, what is wrong in mac80211 5.15.33-1?
Regards,
Hartmut
Hi Hartmut,
Do you have some more details?
Not yet.
Do you see any error message in logread?
No. It looks similar. In both versions (5.15.8-1 and 5.15.33-1), driver and
firmware
are load and hostapd does setup the interfaces. The only difference is the first
output related to country variants from EEPROM, but I think this printed text
only.
It is different for ath9k and ath10k.
old:
Sun May 15 16:37:43 2022 kern.info kernel: [ 29.082747] ath10k_pci 0000:00:00.0:
enabling device (0000 -> 0002)
Sun May 15 16:37:43 2022 kern.info kernel: [ 29.091400] ath10k_pci
0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
Sun May 15 16:37:43 2022 kern.info kernel: [ 31.686602] EXT4-fs (sda1):
mounted filesystem with ordered data mode. Opts: errors=remount-ro
Sun May 15 16:37:43 2022 kern.info kernel: [ 34.664574] ath10k_pci
0000:00:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
Sun May 15 16:37:43 2022 kern.info kernel: [ 34.673993] ath10k_pci
0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
Sun May 15 16:37:43 2022 kern.info kernel: [ 34.687040] ath10k_pci
0000:00:00.0: firmware ver 10.2.4-1.0-00047 api 5 features
no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
Sun May 15 16:37:43 2022 kern.info kernel: [ 35.199254] ath10k_pci
0000:00:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
Sun May 15 16:37:43 2022 kern.warn kernel: [ 35.226156]
(backports-5.15.8-1/drivers/net/wireless/ath/ath10k/core.c:2213) Found a
calibration nvmem-cell
Sun May 15 16:37:43 2022 kern.info kernel: [ 36.420550] ath10k_pci
0000:00:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal nvmem max-sta 128 raw 0
hwcrypto 1
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.564054] ath: EEPROM
regdomain sanitized
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.564066] ath: EEPROM
regdomain: 0x64
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.564071] ath: EEPROM
indicates we should expect a direct regpair map
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.564090] ath: Country alpha2
being used: 00
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.564095] ath: Regpair used:
0x64
Sun May 15 16:37:43 2022 kern.warn kernel: [ 36.640956]
(backports-5.15.8-1/drivers/net/wireless/ath/ath9k/init.c:695) ath9k_of_init()
Sun May 15 16:37:43 2022 kern.warn kernel: [ 36.650798]
(backports-5.15.8-1/drivers/net/wireless/ath/ath9k/init.c:608) Found a
calibration nvmem-cell.
Sun May 15 16:37:43 2022 kern.warn kernel: [ 36.670784]
(backports-5.15.8-1/drivers/net/wireless/ath/ath9k/init.c:615) Size of
calibration nvmem-cell is 1088 bytes and crc is 0f7c.
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.687430] ath: EEPROM
regdomain sanitized
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.699887] ath: EEPROM
regdomain: 0x64
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.699893] ath: EEPROM
indicates we should expect a direct regpair map
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.699913] ath: Country alpha2
being used: 00
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.699918] ath: Regpair used:
0x64
Sun May 15 16:37:43 2022 kern.debug kernel: [ 36.716823] ieee80211 phy1:
Selected rate control algorithm 'minstrel_ht'
Sun May 15 16:37:43 2022 kern.info kernel: [ 36.718638] ieee80211 phy1:
Atheros AR9550 Rev:0 mem=0xb8100000, irq=12
new:
Sat May 14 11:09:05 2022 kern.info kernel: [ 29.384532] ath10k_pci 0000:00:00.0:
enabling device (0000 -> 0002)
Sat May 14 11:09:05 2022 kern.info kernel: [ 29.393189] ath10k_pci
0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
Sat May 14 11:09:05 2022 kern.info kernel: [ 31.920332] EXT4-fs (sda1):
mounted filesystem with ordered data mode. Opts: errors=remount-ro
Sat May 14 11:09:05 2022 kern.info kernel: [ 35.264855] ath10k_pci
0000:00:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
Sat May 14 11:09:05 2022 kern.info kernel: [ 35.274269] ath10k_pci
0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
Sat May 14 11:09:05 2022 kern.info kernel: [ 35.287315] ath10k_pci
0000:00:00.0: firmware ver 10.2.4-1.0-00047 api 5 features
no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
Sat May 14 11:09:05 2022 kern.info kernel: [ 35.945834] ath10k_pci
0000:00:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
Sat May 14 11:09:05 2022 kern.warn kernel: [ 35.973350]
(backports-5.15.33-1/drivers/net/wireless/ath/ath10k/core.c:2230) Found a
calibration nvmem-cell
Sat May 14 11:09:05 2022 kern.info kernel: [ 37.248472] ath10k_pci
0000:00:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal nvmem max-sta 128 raw 0
hwcrypto 1
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.394052] ath: EEPROM
regdomain: 0x0
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.394061] ath: EEPROM
indicates default country code should be used
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.394066] ath: doing EEPROM
country->regdmn map search
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.394080] ath: country maps to
regdmn code: 0x3a
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.394086] ath: Country alpha2
being used: US
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.394091] ath: Regpair used:
0x3a
Sat May 14 11:09:05 2022 kern.warn kernel: [ 37.481401]
(backports-5.15.33-1/drivers/net/wireless/ath/ath9k/init.c:695) ath9k_of_init()
Sat May 14 11:09:05 2022 kern.warn kernel: [ 37.481535]
(backports-5.15.33-1/drivers/net/wireless/ath/ath9k/init.c:608) Found a
calibration nvmem-cell.
Sat May 14 11:09:05 2022 kern.warn kernel: [ 37.500764]
(backports-5.15.33-1/drivers/net/wireless/ath/ath9k/init.c:615) Size of
calibration nvmem-cell is 1088 bytes and crc is 0f7c.
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.517525] ath: EEPROM
regdomain: 0x0
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.530064] ath: EEPROM
indicates default country code should be used
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.530069] ath: doing EEPROM
country->regdmn map search
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.530083] ath: country maps to
regdmn code: 0x3a
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.530089] ath: Country alpha2
being used: US
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.530094] ath: Regpair used:
0x3a
Sat May 14 11:09:05 2022 kern.debug kernel: [ 37.546975] ieee80211 phy1:
Selected rate control algorithm 'minstrel_ht'
Sat May 14 11:09:05 2022 kern.info kernel: [ 37.548814] ieee80211 phy1:
Atheros AR9550 Rev:0 mem=0xb8100000, irq=12
The nvmem-cell stuff is from me, because I did change, how the calibration data
is load for the ath9k at a tp-link wdr3600. This router doesn't have an issue.
The affected router is the tp-link archer C7 v2. I'm using the kmod-ath10k
driver and not kmod-ath10k-ct.
What hardware was this happening on?
Router is a tp-link archer C7 v2. Firmware for ath10k is qca988x.
Did it work again when you reverted the linked commit?
If I revert this commit only, backports-5.15.8-1 does work with further commits
too.
Regards,
Hartmut
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel