Merge tag 'iwlwifi-next-for-kalle-2016-07-06' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-block.git] / drivers / net / wireless / intel / iwlwifi / iwl-drv.c
index d675bf0a9e99f0bcbc3e6ba5799e77d1f24941dc..45b2f679e4d8ec624be0090081aad2cbab2bec5a 100644 (file)
@@ -1241,7 +1241,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