diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-05 12:41:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-07 15:51:37 -0400 |
commit | 6009c39c6fc1cb988bdc90a395d9cce273afc7d5 (patch) | |
tree | 1f316922c3e7f4e9dd77717cdbdf63493f7be2e9 /drivers/net | |
parent | e649437fd6e2bae6f7b8a36a302a1ec4faa5d906 (diff) |
iwlagn: remove ucode_data_backup
This was used only on 4965 in conjunction with
the bootstrap ucode.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 1 |
2 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 5e74eb0fd6ee..e3095afc9554 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1178,7 +1178,6 @@ static void iwl_dealloc_ucode_pci(struct iwl_priv *priv) | |||
1178 | { | 1178 | { |
1179 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); | 1179 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); |
1180 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); | 1180 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); |
1181 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | ||
1182 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init); | 1181 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init); |
1183 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init_data); | 1182 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init_data); |
1184 | } | 1183 | } |
@@ -1645,11 +1644,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1645 | priv->ucode_data.len = pieces.data_size; | 1644 | priv->ucode_data.len = pieces.data_size; |
1646 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data); | 1645 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data); |
1647 | 1646 | ||
1648 | priv->ucode_data_backup.len = pieces.data_size; | 1647 | if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr) |
1649 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | ||
1650 | |||
1651 | if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr || | ||
1652 | !priv->ucode_data_backup.v_addr) | ||
1653 | goto err_pci_alloc; | 1648 | goto err_pci_alloc; |
1654 | 1649 | ||
1655 | /* Initialization instructions and data */ | 1650 | /* Initialization instructions and data */ |
@@ -1709,7 +1704,6 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1709 | IWL_DEBUG_INFO(priv, "Copying (but not loading) uCode data len %Zd\n", | 1704 | IWL_DEBUG_INFO(priv, "Copying (but not loading) uCode data len %Zd\n", |
1710 | pieces.data_size); | 1705 | pieces.data_size); |
1711 | memcpy(priv->ucode_data.v_addr, pieces.data, pieces.data_size); | 1706 | memcpy(priv->ucode_data.v_addr, pieces.data, pieces.data_size); |
1712 | memcpy(priv->ucode_data_backup.v_addr, pieces.data, pieces.data_size); | ||
1713 | 1707 | ||
1714 | /* Initialization instructions */ | 1708 | /* Initialization instructions */ |
1715 | if (pieces.init_size) { | 1709 | if (pieces.init_size) { |
@@ -2481,11 +2475,6 @@ static int __iwl_up(struct iwl_priv *priv) | |||
2481 | return -EIO; | 2475 | return -EIO; |
2482 | } | 2476 | } |
2483 | 2477 | ||
2484 | if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { | ||
2485 | IWL_ERR(priv, "ucode not available for device bringup\n"); | ||
2486 | return -EIO; | ||
2487 | } | ||
2488 | |||
2489 | for_each_context(priv, ctx) { | 2478 | for_each_context(priv, ctx) { |
2490 | ret = iwlagn_alloc_bcast_station(priv, ctx); | 2479 | ret = iwlagn_alloc_bcast_station(priv, ctx); |
2491 | if (ret) { | 2480 | if (ret) { |
@@ -2542,12 +2531,6 @@ static int __iwl_up(struct iwl_priv *priv) | |||
2542 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 2531 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
2543 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 2532 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
2544 | 2533 | ||
2545 | /* Copy original ucode data image from disk into backup cache. | ||
2546 | * This will be used to initialize the on-board processor's | ||
2547 | * data SRAM for a clean start when the runtime program first loads. */ | ||
2548 | memcpy(priv->ucode_data_backup.v_addr, priv->ucode_data.v_addr, | ||
2549 | priv->ucode_data.len); | ||
2550 | |||
2551 | for (i = 0; i < MAX_HW_RESTARTS; i++) { | 2534 | for (i = 0; i < MAX_HW_RESTARTS; i++) { |
2552 | 2535 | ||
2553 | /* load bootstrap state machine, | 2536 | /* load bootstrap state machine, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index b3af2e8afc0a..7619cee648f4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1259,7 +1259,6 @@ struct iwl_priv { | |||
1259 | iwl_ucode.ver */ | 1259 | iwl_ucode.ver */ |
1260 | struct fw_desc ucode_code; /* runtime inst */ | 1260 | struct fw_desc ucode_code; /* runtime inst */ |
1261 | struct fw_desc ucode_data; /* runtime data original */ | 1261 | struct fw_desc ucode_data; /* runtime data original */ |
1262 | struct fw_desc ucode_data_backup; /* runtime data save/restore */ | ||
1263 | struct fw_desc ucode_init; /* initialization inst */ | 1262 | struct fw_desc ucode_init; /* initialization inst */ |
1264 | struct fw_desc ucode_init_data; /* initialization data */ | 1263 | struct fw_desc ucode_init_data; /* initialization data */ |
1265 | enum ucode_type ucode_type; | 1264 | enum ucode_type ucode_type; |