ath9k: Handle MCI_STATE_AIC_CAL_RESET
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Sat, 14 Mar 2015 05:57:54 +0000 (11:27 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 20 Mar 2015 06:28:06 +0000 (08:28 +0200)
Add a routine to handle the MCI_STATE_AIC_CAL_RESET
message.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/ar9003_aic.c
drivers/net/wireless/ath/ath9k/ar9003_aic.h
drivers/net/wireless/ath/ath9k/ar9003_mci.c

index 7bdbc7a7d7ad5eeef93562d5e85cc5f464ce9f32..4e8cf084d2fac2ca4c65787f176366c5779f820e 100644 (file)
@@ -512,6 +512,14 @@ exit:
 
 }
 
+u8 ar9003_aic_cal_reset(struct ath_hw *ah)
+{
+       struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
+
+       aic->aic_cal_state = AIC_CAL_STATE_IDLE;
+       return aic->aic_cal_state;
+}
+
 u8 ar9003_aic_calibration_single(struct ath_hw *ah)
 {
        struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci;
index e31c44e68747776e2834fc96b55077c525e6b705..f7c95466149f9a960a81dbcd463d3d8f9a543442 100644 (file)
@@ -53,6 +53,7 @@ struct ath_aic_out_info {
        struct ath_aic_sram_info sram;
 };
 
+u8 ar9003_aic_cal_reset(struct ath_hw *ah);
 u8 ar9003_aic_calibration_single(struct ath_hw *ah);
 
 #endif /* AR9003_AIC_H */
index 6fa98e51fdfca2abe23bc0fc135e9567be66c0b5..d6ed62807a979aaa62879823a3678cc626fc84b8 100644 (file)
@@ -1363,6 +1363,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
                value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
                mci->need_flush_btinfo = false;
                break;
+       case MCI_STATE_AIC_CAL_RESET:
+               if (ath9k_hw_is_aic_enabled(ah))
+                       value = ar9003_aic_cal_reset(ah);
+               break;
        case MCI_STATE_AIC_CAL_SINGLE:
                if (ath9k_hw_is_aic_enabled(ah))
                        value = ar9003_aic_calibration_single(ah);