Skip to contentSkip to conversation

ath9k: bring back direction setting in ath9k_{start_stop}

PATCH In review Giedrius Statkevičius 3 participants 6 messages Sep 1, 2016 – Sep 7, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: bring back direction setting in ath9k_{start_stop}

A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup led_pin initial") that broken the WLAN status led on my laptop with AR9287 after suspending and resuming.

Steps to reproduce:
* Suspend (laptop)
* Resume (laptop)
* Observe that the WLAN led no longer turns ON/OFF depending on the status and is always red

Even though for my case it only needs to be set to OUT in ath9k_start but for consistency bring back the IN direction setting as well.

---
This patch should be applied to all 4.7 and later kernels

Another user complaining about probably the same problem:
https://bugzilla.kernel.org/show_bug.cgi?id=151711

 drivers/net/wireless/ath/ath9k/main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +7 -2
index 8b63988..121dc05 100644
@@ -718,9 +718,12 @@ static int ath9k_start(struct ieee80211_hw *hw)
 	if (!ath_complete_reset(sc, false))
 		ah->reset_power_on = false;
 
-	if (ah->led_pin >= 0)
+	if (ah->led_pin >= 0) {
 		ath9k_hw_set_gpio(ah, ah->led_pin,
 				  (ah->config.led_active_high) ? 1 : 0);
+		ath9k_hw_gpio_request_out(ah, ah->led_pin, NULL,
+					  AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
+	}
 
 	/*
 	 * Reset key cache to sane defaults (all entries cleared) instead of
@@ -864,9 +867,11 @@ static void ath9k_stop(struct ieee80211_hw *hw)
 
 	spin_lock_bh(&sc->sc_pcu_lock);
 
-	if (ah->led_pin >= 0)
+	if (ah->led_pin >= 0) {
 		ath9k_hw_set_gpio(ah, ah->led_pin,
 				  (ah->config.led_active_high) ? 0 : 1);
+		ath9k_hw_gpio_request_in(ah, ah->led_pin, NULL);
+	}
 
 	ath_prepare_reset(sc);
 
Signature · 1 line
2.9.3
#1 lore raw

Some more users complaining about this:
https://bbs.archlinux.org/viewtopic.php?id=215978

Quoted 18 lines · Giedrius Statkevičius

A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup led_pin initial") that broken the WLAN status led on my laptop with AR9287 after suspending and resuming.

Steps to reproduce:
* Suspend (laptop)
* Resume (laptop)
* Observe that the WLAN led no longer turns ON/OFF depending on the status and is always red

Even though for my case it only needs to be set to OUT in ath9k_start but for consistency bring back the IN direction setting as well.

---

[...]

#2 lore raw
In reply to Giedrius Statkevičius
Quoted 10 lines · Giedrius Statkevi?ius

A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup led_pin initial") that broken the WLAN status led on my laptop with AR9287 after suspending and resuming.

Steps to reproduce:
* Suspend (laptop)
* Resume (laptop)
* Observe that the WLAN led no longer turns ON/OFF depending on the status and is always red

Quoted 7 lines

Even though for my case it only needs to be set to OUT in ath9k_start but for consistency bring back the IN direction setting as well.

I'm planning to queue this to 4.8 if no objections.

Signature · 2 lines
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/
#3 lore raw
In reply to Giedrius Statkevičius
Quoted 10 lines · Giedrius Statkevi?ius

A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup led_pin initial") that broken the WLAN status led on my laptop with AR9287 after suspending and resuming.

Steps to reproduce:
* Suspend (laptop)
* Resume (laptop)
* Observe that the WLAN led no longer turns ON/OFF depending on the status and is always red

Quoted 7 lines

Even though for my case it only needs to be set to OUT in ath9k_start but for consistency bring back the IN direction setting as well.

Thanks, 1 patch applied to ath-next branch of ath.git:

088a60926b66 ath9k: bring back direction setting in ath9k_{start_stop}

Signature · 2 lines
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/
#4 lore raw
Quoted 14 lines · Kalle Valo
Quoted 13 lines · Giedrius Statkevi?ius

A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup led_pin initial") that broken the WLAN status led on my laptop with AR9287 after suspending and resuming.

Steps to reproduce:
* Suspend (laptop)
* Resume (laptop)
* Observe that the WLAN led no longer turns ON/OFF depending on the status and is always red

Even though for my case it only needs to be set to OUT in ath9k_start but for consistency bring back the IN direction setting as well.

Quoted 8 lines
Quoted 4 lines

Thanks, 1 patch applied to ath-next branch of ath.git:

088a60926b66 ath9k: bring back direction setting in ath9k_{start_stop}

Oops, I was supposed to apply this to ath-current branch. Please ignore this. Luckily I didn't push yet so I can easily fix this.

Signature · 1 line
Kalle Valo
#5 lore raw
In reply to Giedrius Statkevičius
Quoted 10 lines · Giedrius Statkevi?ius

A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup led_pin initial") that broken the WLAN status led on my laptop with AR9287 after suspending and resuming.

Steps to reproduce:
* Suspend (laptop)
* Resume (laptop)
* Observe that the WLAN led no longer turns ON/OFF depending on the status and is always red

Quoted 7 lines

Even though for my case it only needs to be set to OUT in ath9k_start but for consistency bring back the IN direction setting as well.

Thanks, 1 patch applied to ath-current branch of ath.git:

e34f2ff40e03 ath9k: bring back direction setting in ath9k_{start_stop}

Signature · 2 lines
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/