aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/testmode.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-12-03 03:10:54 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2014-12-08 10:39:08 -0500
commitd7579d12c33f87de9975d17880d708b50e959bbb (patch)
treef5d453ed9a3397b6c7d43f2faaa2f430307691b2 /drivers/net/wireless/ath/ath10k/testmode.c
parent32653cf19554ddb77e9528851df3eed3ea35619d (diff)
ath10k: introduce wmi ops
Since the 10.x fw branch support was introduced it became apparent ath10k will need to be able to deal with different fw ABIs eventually. The patch creates an abstraction for dealing with command and event structures across different ABIs and mostly gets rid of the ATH10K_FW_FEATURE_WMI_10X flag usage. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/testmode.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/testmode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c
index 483db9cb8c96..b084f88da102 100644
--- a/drivers/net/wireless/ath/ath10k/testmode.c
+++ b/drivers/net/wireless/ath/ath10k/testmode.c
@@ -187,13 +187,14 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[])
187 187
188 memcpy(ar->testmode.orig_fw_features, ar->fw_features, 188 memcpy(ar->testmode.orig_fw_features, ar->fw_features,
189 sizeof(ar->fw_features)); 189 sizeof(ar->fw_features));
190 ar->testmode.orig_wmi_op_version = ar->wmi.op_version;
190 191
191 /* utf.bin firmware image does not advertise firmware features. Do 192 /* utf.bin firmware image does not advertise firmware features. Do
192 * an ugly hack where we force the firmware features so that wmi.c 193 * an ugly hack where we force the firmware features so that wmi.c
193 * will use the correct WMI interface. 194 * will use the correct WMI interface.
194 */ 195 */
195 memset(ar->fw_features, 0, sizeof(ar->fw_features)); 196 memset(ar->fw_features, 0, sizeof(ar->fw_features));
196 __set_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features); 197 ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_10_1;
197 198
198 ret = ath10k_hif_power_up(ar); 199 ret = ath10k_hif_power_up(ar);
199 if (ret) { 200 if (ret) {
@@ -224,6 +225,7 @@ err_fw_features:
224 /* return the original firmware features */ 225 /* return the original firmware features */
225 memcpy(ar->fw_features, ar->testmode.orig_fw_features, 226 memcpy(ar->fw_features, ar->testmode.orig_fw_features,
226 sizeof(ar->fw_features)); 227 sizeof(ar->fw_features));
228 ar->wmi.op_version = ar->testmode.orig_wmi_op_version;
227 229
228 release_firmware(ar->testmode.utf); 230 release_firmware(ar->testmode.utf);
229 ar->testmode.utf = NULL; 231 ar->testmode.utf = NULL;
@@ -250,6 +252,7 @@ static void __ath10k_tm_cmd_utf_stop(struct ath10k *ar)
250 /* return the original firmware features */ 252 /* return the original firmware features */
251 memcpy(ar->fw_features, ar->testmode.orig_fw_features, 253 memcpy(ar->fw_features, ar->testmode.orig_fw_features,
252 sizeof(ar->fw_features)); 254 sizeof(ar->fw_features));
255 ar->wmi.op_version = ar->testmode.orig_wmi_op_version;
253 256
254 release_firmware(ar->testmode.utf); 257 release_firmware(ar->testmode.utf);
255 ar->testmode.utf = NULL; 258 ar->testmode.utf = NULL;