ath9k: Fix MCI cleanup
PATCH v2 1/2 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
@@ -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
PATCH v2 1/2 ath9k: Fix MCI cleanup
Hi Mohammed,
Quoted 19 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_cleanupthough we skipped callingath_mci_setup. Yet it does not causes any issues now as we free the DMA buffer allocated only when it is allocated duringath_mci_setup.Reviewed-by Bala Shanmugam <[email protected]>Signed-off-by Mohammed Shafi Shajakhan <[email protected]>--- drivers/net/wireless/ath/ath9k/gpio.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/net/wireless/ath/ath9k/gpio.c +0
-0
drivers/net/wireless/ath/ath9k/gpio.c void ath9k_stop_btcoex(struct ath_softc *sc) · line 391
Quoted 5 lines
drivers/net/wireless/ath/ath9k/gpio.c +2
-0@@ -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; +
Why introduce a new variable if you only use it once?
Thanks,
Signature · 5 lines
Julian Calaby Email: julian.calaby at gmail.com Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/
PATCH v2 1/2 ath9k: Fix MCI cleanup
Hi Julian,
Quoted 24 lines · Julian Calaby
Hi Mohammed,
Quoted 20 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_cleanupthough we skipped callingath_mci_setup. Yet it does not causes any issues now as we free the DMA buffer allocated only when it is allocated duringath_mci_setup.Reviewed-by Bala Shanmugam <[email protected]>Signed-off-by Mohammed Shafi Shajakhan <[email protected]>--- drivers/net/wireless/ath/ath9k/gpio.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/net/wireless/ath/ath9k/gpio.c +0
-0@@ -387,11 +387,13 @@ void ath9k_stop_btcoex(struct ath_softc *sc)
Quoted 7 lines
drivers/net/wireless/ath/ath9k/gpio.c void ath9k_stop_btcoex(struct ath_softc *sc) · line 391
Quoted 4 lines
drivers/net/wireless/ath/ath9k/gpio.c +2
-0void ath9k_deinit_btcoex (struct ath_softc *sc) { +struct ath_hw *ah = sc->sc_ah; +Why introduce a new variable if you only use it once?
oh yeah, could have avoided that (or) could have make use of it instead of sc->sc_ah in 2 places of the same function!
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);thanks for your review, John had already merged with patch. We could cleanup this in some future cleanups.
Signature · 2 lines
thanks, shafi