Thread (21 messages) 21 messages, 6 authors, 2017-03-28
STALE3375d

[PATCH 7/7] ath9k: hw: Reset the device with the external reset before init

From: Alban <albeu@free.fr>
Date: 2017-03-13 21:07:37
Also in: linux-wireless, lkml
Subsystem: atheros ath generic utilities, qualcomm atheros ath9k wireless driver, the rest · Maintainers: Jeff Johnson, Toke Høiland-Jørgensen, Linus Torvalds

On the SoC platform the board code often manually reset the device
before registering it. To allow the same to happen on DT platforms
let the driver call the reset before init.

Signed-off-by: Alban <albeu@free.fr>
---
 drivers/net/wireless/ath/ath9k/hw.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index efc0435..dfb13bc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -576,6 +576,13 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	struct ath_common *common = ath9k_hw_common(ah);
 	int r = 0;
 
+	/* Reset the device before using it */
+	r = ath9k_hw_external_reset(ah);
+	if (r) {
+		ath_err(common, "Failed to reset chip\n");
+		return r;
+	}
+
 	ath9k_hw_read_revisions(ah);
 
 	switch (ah->hw_version.macVersion) {
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help