diff mbox

[2/6] ath9k: Initialize MCI state correctly

Message ID 1425191029-13667-3-git-send-email-sujith@msujith.org (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Sujith Manoharan March 1, 2015, 6:23 a.m. UTC
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

The MCI configuration values are assigned
in ath9k_hw_btcoex_init_mci() which are used
by the MCI reset routine. When initializing
BTCOEX/MCI, ath_mci_setup() ends up using
uninitialized data. Fix this by setting up
the configuration parameters before issuing
a MCI reset.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/gpio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 78695b5..257ffce 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -415,12 +415,11 @@  int ath9k_init_btcoex(struct ath_softc *sc)
 		if (ath9k_hw_mci_is_enabled(ah)) {
 			sc->btcoex.duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE;
 			INIT_LIST_HEAD(&sc->btcoex.mci.info);
+			ath9k_hw_btcoex_init_mci(ah);
 
 			r = ath_mci_setup(sc);
 			if (r)
 				return r;
-
-			ath9k_hw_btcoex_init_mci(ah);
 		}
 
 		break;