diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 3946e5c03f81..72f0d77955cf 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -518,10 +518,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
518 | } | 518 | } |
519 | e = (u16 *)priv->eeprom; | 519 | e = (u16 *)priv->eeprom; |
520 | 520 | ||
521 | if (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) { | 521 | priv->cfg->ops->lib->apm_ops.init(priv); |
522 | /* OTP reads require powered-up chip */ | ||
523 | priv->cfg->ops->lib->apm_ops.init(priv); | ||
524 | } | ||
525 | 522 | ||
526 | ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv); | 523 | ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv); |
527 | if (ret < 0) { | 524 | if (ret < 0) { |
@@ -570,13 +567,6 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
570 | e[cache_addr / 2] = eeprom_data; | 567 | e[cache_addr / 2] = eeprom_data; |
571 | cache_addr += sizeof(u16); | 568 | cache_addr += sizeof(u16); |
572 | } | 569 | } |
573 | |||
574 | /* | ||
575 | * Now that OTP reads are complete, reset chip to save | ||
576 | * power until we load uCode during "up". | ||
577 | */ | ||
578 | priv->cfg->ops->lib->apm_ops.stop(priv); | ||
579 | |||
580 | } else { | 570 | } else { |
581 | /* eeprom is an array of 16bit values */ | 571 | /* eeprom is an array of 16bit values */ |
582 | for (addr = 0; addr < sz; addr += sizeof(u16)) { | 572 | for (addr = 0; addr < sz; addr += sizeof(u16)) { |
@@ -603,6 +593,8 @@ done: | |||
603 | err: | 593 | err: |
604 | if (ret) | 594 | if (ret) |
605 | iwl_eeprom_free(priv); | 595 | iwl_eeprom_free(priv); |
596 | /* Reset chip to save power until we load uCode during "up". */ | ||
597 | priv->cfg->ops->lib->apm_ops.stop(priv); | ||
606 | alloc_err: | 598 | alloc_err: |
607 | return ret; | 599 | return ret; |
608 | } | 600 | } |