diff options
author | Dor Shaish <dor.shaish@intel.com> | 2014-12-10 05:44:57 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-12-28 12:59:51 -0500 |
commit | 7074cc4280463c27161a1eba89dfaa01685161bd (patch) | |
tree | d612ed0435cff58062bad3101e62c073dbf3cf7a /drivers/net/wireless/iwlwifi/iwl-drv.c | |
parent | f53bf4c758c0fbe728c031621f4c5f9979cdb044 (diff) |
Revert "iwlwifi: use correct fw file in 8000 b-step"
Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-drv.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-drv.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index 36ae19134d11..afa63f7b2d3e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c | |||
@@ -237,9 +237,6 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) | |||
237 | /* | 237 | /* |
238 | * Starting 8000B - FW name format has changed. This overwrites the | 238 | * Starting 8000B - FW name format has changed. This overwrites the |
239 | * previous name and uses the new format. | 239 | * previous name and uses the new format. |
240 | * | ||
241 | * TODO: | ||
242 | * Once there is only one supported step for 8000 family - delete this! | ||
243 | */ | 240 | */ |
244 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) { | 241 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) { |
245 | char rev_step[2] = { | 242 | char rev_step[2] = { |
@@ -250,13 +247,6 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) | |||
250 | if (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_A_STEP) | 247 | if (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_A_STEP) |
251 | rev_step[0] = 0; | 248 | rev_step[0] = 0; |
252 | 249 | ||
253 | /* | ||
254 | * If hw_rev wasn't set yet - default as B-step. If it IS A-step | ||
255 | * we'll reload that FW later instead. | ||
256 | */ | ||
257 | if (drv->trans->hw_rev == 0) | ||
258 | rev_step[0] = 'B'; | ||
259 | |||
260 | snprintf(drv->firmware_name, sizeof(drv->firmware_name), | 250 | snprintf(drv->firmware_name, sizeof(drv->firmware_name), |
261 | "%s%s-%s.ucode", name_pre, rev_step, tag); | 251 | "%s%s-%s.ucode", name_pre, rev_step, tag); |
262 | } | 252 | } |
@@ -1069,7 +1059,6 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) | |||
1069 | u32 api_ver; | 1059 | u32 api_ver; |
1070 | int i; | 1060 | int i; |
1071 | bool load_module = false; | 1061 | bool load_module = false; |
1072 | u32 hw_rev = drv->trans->hw_rev; | ||
1073 | 1062 | ||
1074 | fw->ucode_capa.max_probe_length = IWL_DEFAULT_MAX_PROBE_LENGTH; | 1063 | fw->ucode_capa.max_probe_length = IWL_DEFAULT_MAX_PROBE_LENGTH; |
1075 | fw->ucode_capa.standard_phy_calibration_size = | 1064 | fw->ucode_capa.standard_phy_calibration_size = |
@@ -1262,50 +1251,6 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) | |||
1262 | op->name, err); | 1251 | op->name, err); |
1263 | #endif | 1252 | #endif |
1264 | } | 1253 | } |
1265 | |||
1266 | /* | ||
1267 | * We may have loaded the wrong FW file in 8000 HW family if it is an | ||
1268 | * A-step card, and if drv->trans->hw_rev wasn't properly read when | ||
1269 | * the FW file had been loaded. (This might happen in SDIO.) In such a | ||
1270 | * case - unload and reload the correct file. | ||
1271 | * | ||
1272 | * TODO: | ||
1273 | * Once there is only one supported step for 8000 family - delete this! | ||
1274 | */ | ||
1275 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000 && | ||
1276 | CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_A_STEP && | ||
1277 | drv->trans->hw_rev != hw_rev) { | ||
1278 | char firmware_name[32]; | ||
1279 | |||
1280 | /* Free previous FW resources */ | ||
1281 | if (drv->op_mode) | ||
1282 | _iwl_op_mode_stop(drv); | ||
1283 | iwl_dealloc_ucode(drv); | ||
1284 | |||
1285 | /* Build name of correct-step FW */ | ||
1286 | snprintf(firmware_name, sizeof(firmware_name), | ||
1287 | strrchr(drv->firmware_name, '-')); | ||
1288 | snprintf(drv->firmware_name, sizeof(drv->firmware_name), | ||
1289 | "%s%s", drv->cfg->fw_name_pre, firmware_name); | ||
1290 | |||
1291 | /* Clear data before loading correct FW */ | ||
1292 | list_del(&drv->list); | ||
1293 | |||
1294 | /* Request correct FW file this time */ | ||
1295 | IWL_DEBUG_INFO(drv, "attempting to load A-step FW %s\n", | ||
1296 | drv->firmware_name); | ||
1297 | err = request_firmware(&ucode_raw, drv->firmware_name, | ||
1298 | drv->trans->dev); | ||
1299 | if (err) { | ||
1300 | IWL_ERR(drv, "Failed swapping FW!\n"); | ||
1301 | goto out_unbind; | ||
1302 | } | ||
1303 | |||
1304 | /* Redo callback function - this time with right FW */ | ||
1305 | iwl_req_fw_callback(ucode_raw, context); | ||
1306 | } | ||
1307 | |||
1308 | kfree(pieces); | ||
1309 | return; | 1254 | return; |
1310 | 1255 | ||
1311 | try_again: | 1256 | try_again: |