summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
diff options
context:
space:
mode:
authorLuca Coelho2016-04-25 19:02:09 +0200
committerKalle Valo2016-04-26 11:32:07 +0200
commitf0d8f38cd909e072833a06b79939256c4aebe3a0 (patch)
treed70266a96bd59688f4d4982d522c146351d8cd89 /drivers/net/wireless/intel/iwlwifi/iwl-drv.c
parentrt2800lib: enable MFP if hw crypt is disabled (diff)
downloadkernel-qcow2-linux-f0d8f38cd909e072833a06b79939256c4aebe3a0.tar.gz
kernel-qcow2-linux-f0d8f38cd909e072833a06b79939256c4aebe3a0.tar.xz
kernel-qcow2-linux-f0d8f38cd909e072833a06b79939256c4aebe3a0.zip
iwlwifi: fix fw version reading for DVM devices
In commit 97f95c93c8ed ("iwlwifi: remove support for fw older than -16.ucode") we accidentally changed the fw version reading code for DVM devices. The code intended to remove the old fw version API, because all MVM firmwares version 16 and above that we support don't use it anymore. But DVM devices still use the old FW API. Fix that by bringing the code back in. Reported-by: Pat Erley <pat-lkml@erley.org> Tested-by: Kalle Valo <kvalo@codeaurora.org> Fixes: 97f95c93c8ed ("iwlwifi: remove support for fw older than-16.ucode") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-drv.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 48e873732d4e..4f495d9153a6 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1280,7 +1280,10 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
if (err)
goto try_again;
- api_ver = drv->fw.ucode_ver;
+ if (fw_has_api(&drv->fw.ucode_capa, IWL_UCODE_TLV_API_NEW_VERSION))
+ api_ver = drv->fw.ucode_ver;
+ else
+ api_ver = IWL_UCODE_API(drv->fw.ucode_ver);
/*
* api_ver should match the api version forming part of the