[openwrt/openwrt] mac80211: ath9k: avoid a double reset
LEDE Commits
lede-commits at lists.infradead.org
Thu Jun 5 04:10:30 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0ccc336c56fca7ecaede590995da30889c71d8a6
commit 0ccc336c56fca7ecaede590995da30889c71d8a6
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Jun 4 14:57:11 2025 -0700
mac80211: ath9k: avoid a double reset
The original OF code effectively does a reset at ahb.c but then again in
hw.c. For AR9330, it's already done in the driver and with the others,
there are patches in here that do the same. hw.c looks like the proper
place to handle this.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19031
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch b/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch
index 94fcc816df..604239188d 100644
--- a/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch
+++ b/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch
@@ -102,7 +102,7 @@
int ret;
if (!of_device_is_available(np))
-@@ -677,6 +758,46 @@ static int ath9k_of_init(struct ath_soft
+@@ -677,6 +758,43 @@ static int ath9k_of_init(struct ath_soft
ath_dbg(common, CONFIG, "parsing configuration from OF node\n");
@@ -115,13 +115,11 @@
+#ifdef CONFIG_ATH79
+ if (ah->hw_version.devid == AR5416_AR9100_DEVID) {
+ ah->external_reset = ar913x_wmac_reset;
-+ ah->external_reset();
+ } else if (ah->hw_version.devid == AR9300_DEVID_AR9330) {
+ ah->get_mac_revision = ar9330_get_soc_revision;
+ u32 t = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
+ ah->is_clk_25mhz = !(t & AR933X_BOOTSTRAP_REF_CLK_40);
+ ah->external_reset = ar933x_wmac_reset;
-+ ah->external_reset();
+ } else if (ah->hw_version.devid == AR9300_DEVID_AR9340) {
+ ah->get_mac_revision = ath79_get_soc_revision;
+ u32 t = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
@@ -138,7 +136,6 @@
+ u32 t = ath79_reset_rr(QCA955X_RESET_REG_BOOTSTRAP);
+ ah->is_clk_25mhz = !(t & QCA955X_BOOTSTRAP_REF_CLK_40);
+ ah->external_reset = qca955x_wmac_reset;
-+ ah->external_reset();
+ } else if (ah->hw_version.devid == AR9300_DEVID_QCA956X) {
+ ah->get_mac_revision = ath79_get_soc_revision;
+ u32 t = ath79_reset_rr(QCA956X_RESET_REG_BOOTSTRAP);
@@ -149,7 +146,7 @@
if (of_property_read_bool(np, "qca,no-eeprom")) {
/* ath9k-eeprom-<bus>-<id>.bin */
scnprintf(eeprom_name, sizeof(eeprom_name),
-@@ -693,6 +814,17 @@ static int ath9k_of_init(struct ath_soft
+@@ -693,6 +811,17 @@ static int ath9k_of_init(struct ath_soft
of_get_mac_address(np, common->macaddr);
More information about the lede-commits
mailing list