ath9k: Remove enabling btcoex from stomp type change
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Sat, 12 Nov 2011 14:05:46 +0000 (19:35 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 17 Nov 2011 20:43:54 +0000 (15:43 -0500)
This patch removes btcoex_enable from stomp type change and let
it be called from callee functions that makes the code can be
reusable for MCI changes.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/btcoex.c
drivers/net/wireless/ath/ath9k/gpio.c
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c

index 6635c377dc00e8d977b2094b345a4d287f721ec3..137a045f0094a9932dc380b8298bf468fd66c521 100644 (file)
@@ -268,8 +268,6 @@ static void ar9003_btcoex_bt_stomp(struct ath_hw *ah,
                                "Invalid Stomptype\n");
                break;
        }
-
-       ath9k_hw_btcoex_enable(ah);
 }
 
 /*
@@ -301,7 +299,5 @@ void ath9k_hw_btcoex_bt_stomp(struct ath_hw *ah,
                                "Invalid Stomptype\n");
                break;
        }
-
-       ath9k_hw_btcoex_enable(ah);
 }
 EXPORT_SYMBOL(ath9k_hw_btcoex_bt_stomp);
index 2c279dcaf4ba8cb8813997c39472bb4ac869dc7d..e4ae08e07719e2f4e3f1a545b6ac653cf8d29cb5 100644 (file)
@@ -198,6 +198,7 @@ static void ath_btcoex_period_timer(unsigned long data)
        ath9k_hw_btcoex_bt_stomp(ah, is_btscan ? ATH_BTCOEX_STOMP_ALL :
                              btcoex->bt_stomp_type);
 
+       ath9k_hw_btcoex_enable(ah);
        spin_unlock_bh(&btcoex->btcoex_lock);
 
        if (btcoex->btcoex_period != btcoex->btcoex_no_stomp) {
@@ -240,6 +241,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)
         else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
                ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW);
 
+       ath9k_hw_btcoex_enable(ah);
        spin_unlock_bh(&btcoex->btcoex_lock);
        ath9k_ps_restore(sc);
 }
index e3a02eb8e0cc768dd44f2b49db655ed9d705c02f..ce606b618e0b7c4813235b221c2bf9fa096887c6 100644 (file)
@@ -80,6 +80,7 @@ static void ath_btcoex_period_work(struct work_struct *work)
        ath9k_hw_btcoex_bt_stomp(priv->ah, is_btscan ? ATH_BTCOEX_STOMP_ALL :
                        btcoex->bt_stomp_type);
 
+       ath9k_hw_btcoex_enable(priv->ah);
        timer_period = is_btscan ? btcoex->btscan_no_stomp :
                btcoex->btcoex_no_stomp;
        ieee80211_queue_delayed_work(priv->hw, &priv->duty_cycle_work,
@@ -108,6 +109,7 @@ static void ath_btcoex_duty_cycle_work(struct work_struct *work)
                ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE);
        else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
                ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW);
+       ath9k_hw_btcoex_enable(priv->ah);
 }
 
 void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv)