|
@@ -795,17 +795,17 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
|
case IWL_UCODE_TLV_SEC_RT:
|
|
case IWL_UCODE_TLV_SEC_RT:
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR,
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR,
|
|
tlv_len);
|
|
tlv_len);
|
|
- drv->fw.mvm_fw = true;
|
|
|
|
|
|
+ drv->fw.type = IWL_FW_MVM;
|
|
break;
|
|
break;
|
|
case IWL_UCODE_TLV_SEC_INIT:
|
|
case IWL_UCODE_TLV_SEC_INIT:
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT,
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT,
|
|
tlv_len);
|
|
tlv_len);
|
|
- drv->fw.mvm_fw = true;
|
|
|
|
|
|
+ drv->fw.type = IWL_FW_MVM;
|
|
break;
|
|
break;
|
|
case IWL_UCODE_TLV_SEC_WOWLAN:
|
|
case IWL_UCODE_TLV_SEC_WOWLAN:
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN,
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN,
|
|
tlv_len);
|
|
tlv_len);
|
|
- drv->fw.mvm_fw = true;
|
|
|
|
|
|
+ drv->fw.type = IWL_FW_MVM;
|
|
break;
|
|
break;
|
|
case IWL_UCODE_TLV_DEF_CALIB:
|
|
case IWL_UCODE_TLV_DEF_CALIB:
|
|
if (tlv_len != sizeof(struct iwl_tlv_calib_data))
|
|
if (tlv_len != sizeof(struct iwl_tlv_calib_data))
|
|
@@ -827,17 +827,17 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
|
case IWL_UCODE_TLV_SECURE_SEC_RT:
|
|
case IWL_UCODE_TLV_SECURE_SEC_RT:
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR,
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR,
|
|
tlv_len);
|
|
tlv_len);
|
|
- drv->fw.mvm_fw = true;
|
|
|
|
|
|
+ drv->fw.type = IWL_FW_MVM;
|
|
break;
|
|
break;
|
|
case IWL_UCODE_TLV_SECURE_SEC_INIT:
|
|
case IWL_UCODE_TLV_SECURE_SEC_INIT:
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT,
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT,
|
|
tlv_len);
|
|
tlv_len);
|
|
- drv->fw.mvm_fw = true;
|
|
|
|
|
|
+ drv->fw.type = IWL_FW_MVM;
|
|
break;
|
|
break;
|
|
case IWL_UCODE_TLV_SECURE_SEC_WOWLAN:
|
|
case IWL_UCODE_TLV_SECURE_SEC_WOWLAN:
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN,
|
|
iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN,
|
|
tlv_len);
|
|
tlv_len);
|
|
- drv->fw.mvm_fw = true;
|
|
|
|
|
|
+ drv->fw.type = IWL_FW_MVM;
|
|
break;
|
|
break;
|
|
case IWL_UCODE_TLV_NUM_OF_CPU:
|
|
case IWL_UCODE_TLV_NUM_OF_CPU:
|
|
if (tlv_len != sizeof(u32))
|
|
if (tlv_len != sizeof(u32))
|
|
@@ -1272,7 +1272,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
|
* In mvm uCode there is no difference between data and instructions
|
|
* In mvm uCode there is no difference between data and instructions
|
|
* sections.
|
|
* sections.
|
|
*/
|
|
*/
|
|
- if (!fw->mvm_fw && validate_sec_sizes(drv, pieces, drv->cfg))
|
|
|
|
|
|
+ if (fw->type == IWL_FW_DVM && validate_sec_sizes(drv, pieces, drv->cfg))
|
|
goto try_again;
|
|
goto try_again;
|
|
|
|
|
|
/* Allocate ucode buffers for card's bus-master loading ... */
|
|
/* Allocate ucode buffers for card's bus-master loading ... */
|
|
@@ -1400,10 +1400,16 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
|
release_firmware(ucode_raw);
|
|
release_firmware(ucode_raw);
|
|
|
|
|
|
mutex_lock(&iwlwifi_opmode_table_mtx);
|
|
mutex_lock(&iwlwifi_opmode_table_mtx);
|
|
- if (fw->mvm_fw)
|
|
|
|
- op = &iwlwifi_opmode_table[MVM_OP_MODE];
|
|
|
|
- else
|
|
|
|
|
|
+ switch (fw->type) {
|
|
|
|
+ case IWL_FW_DVM:
|
|
op = &iwlwifi_opmode_table[DVM_OP_MODE];
|
|
op = &iwlwifi_opmode_table[DVM_OP_MODE];
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ WARN(1, "Invalid fw type %d\n", fw->type);
|
|
|
|
+ case IWL_FW_MVM:
|
|
|
|
+ op = &iwlwifi_opmode_table[MVM_OP_MODE];
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
|
|
IWL_INFO(drv, "loaded firmware version %s op_mode %s\n",
|
|
IWL_INFO(drv, "loaded firmware version %s op_mode %s\n",
|
|
drv->fw.fw_version, op->name);
|
|
drv->fw.fw_version, op->name);
|