Skip to contentSkip to conversation

ath9k: Fix MCI cleanup

RFC In review Mohammed Shafi Shajakhan 1 participant 2 messages Jul 3, 2012 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

RFC 1/1 ath9k: Fix MCI cleanup

From: Mohammed Shafi Shajakhan <[email protected]>

We are doing MCI cleanup eventhough BTCOEX is not enabled via module parameter. This means we do ath_mci_cleanup though we skipped calling ath_mci_setup. Yet it does not causes any issues now as we free the DMA buffer allocated only when it is allocated during ath_mci_setup.

---
 drivers/net/wireless/ath/ath9k/gpio.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath9k/gpio.c +3 -1
index 5eac4d1..43557c2 100644
@@ -387,11 +387,13 @@ void ath9k_stop_btcoex(struct ath_softc *sc)
 
 void ath9k_deinit_btcoex(struct ath_softc *sc)
 {
+	struct ath_hw *ah = sc->sc_ah;
+
         if ((sc->btcoex.no_stomp_timer) &&
 	    ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE)
 		ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer);
 
-	if (AR_SREV_9462(sc->sc_ah))
+	if (ath9k_hw_mci_is_enabled(ah))
 		ath_mci_cleanup(sc);
 }
 
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 22 lines · Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan<[email protected]>

We are doing MCI cleanup eventhough BTCOEX is not enabled via module parameter. This means we do ath_mci_cleanup though we skipped calling ath_mci_setup. Yet it does not causes any issues now as we free the DMA buffer allocated only when it is allocated during ath_mci_setup.

---
  drivers/net/wireless/ath/ath9k/gpio.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath9k/gpio.c +1 -0
index 5eac4d1..43557c2 100644
@@ -387,11 +387,13 @@ void ath9k_stop_btcoex(struct ath_softc *sc)
 
  void ath9k_deinit_btcoex(struct ath_softc *sc)
  {
+	struct ath_hw *ah = sc->sc_ah;

drivers/net/wireless/ath/ath9k/gpio.c void ath9k_stop_btcoex(struct ath_softc *sc) · line 399

Quoted 10 lines
drivers/net/wireless/ath/ath9k/gpio.c +2 -1
+
          if ((sc->btcoex.no_stomp_timer)&&
  	ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE)
  		ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer);
 
-	if (AR_SREV_9462(sc->sc_ah))
+	if (ath9k_hw_mci_is_enabled(ah))
  		ath_mci_cleanup(sc);
  }
 

also we unnecessarily call ar9003_mci_cleanup.

Signature · 2 lines
thanks,
shafi