ath10k: reset BMI state upon init
authorMichal Kazior <michal.kazior@tieto.com>
Tue, 16 Jul 2013 07:38:53 +0000 (09:38 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 30 Jul 2013 15:01:19 +0000 (18:01 +0300)
This is necessary if we want to be able to restart
hw on-the-fly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/bmi.c
drivers/net/wireless/ath/ath10k/bmi.h
drivers/net/wireless/ath/ath10k/core.c

index aeae02979d4613f17b96cc9ceb8f93277a6b134e..744da6d1c405d91a645428d0f686c3c9cb4f00f0 100644 (file)
 #include "debug.h"
 #include "htc.h"
 
+void ath10k_bmi_start(struct ath10k *ar)
+{
+       ath10k_dbg(ATH10K_DBG_CORE, "BMI started\n");
+       ar->bmi.done_sent = false;
+}
+
 int ath10k_bmi_done(struct ath10k *ar)
 {
        struct bmi_cmd cmd;
index 32c56aa33a5ebe4583d41e905d04561941b51f05..8d81ce1cec216c7b55fa1c0ab47b65cc41cafb0d 100644 (file)
@@ -184,6 +184,7 @@ struct bmi_target_info {
 #define BMI_CE_NUM_TO_TARG 0
 #define BMI_CE_NUM_TO_HOST 1
 
+void ath10k_bmi_start(struct ath10k *ar);
 int ath10k_bmi_done(struct ath10k *ar);
 int ath10k_bmi_get_target_info(struct ath10k *ar,
                               struct bmi_target_info *target_info);
index dcddae4d5d904b061ca70fde32d6bfe941d6c853..3d75c6a74fc688b76eba05c7febe4246d77bcb52 100644 (file)
@@ -507,6 +507,8 @@ int ath10k_core_start(struct ath10k *ar)
        struct bmi_target_info target_info;
        int status;
 
+       ath10k_bmi_start(ar);
+
        memset(&target_info, 0, sizeof(target_info));
        status = ath10k_bmi_get_target_info(ar, &target_info);
        if (status)