diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-05 12:41:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-07 15:51:36 -0400 |
commit | 1fc352765fb461e4afafff4d650624df8ab6b6d6 (patch) | |
tree | ee9e31cb30376ad39fbe199afe2c7a7e0e2ac04f /drivers/net/wireless | |
parent | 35b1d92dfb361d24664381a0e4ae8ed47c771a66 (diff) |
iwlagn: remove bootstrap code
Only 4965 had a bootstrap microcode image, so
the agn driver can completely ignore that and
we can remove some code from it.
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/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 |
6 files changed, 4 insertions, 39 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index ad500631a407..53a6702f4063 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -141,7 +141,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) | |||
141 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; | 141 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; |
142 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; | 142 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; |
143 | 143 | ||
144 | priv->hw_params.max_bsm_size = 0; | ||
145 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | 144 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
146 | BIT(IEEE80211_BAND_5GHZ); | 145 | BIT(IEEE80211_BAND_5GHZ); |
147 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | 146 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index 5e375d8089c4..9f973895ce86 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -147,7 +147,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv) | |||
147 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; | 147 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; |
148 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; | 148 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; |
149 | 149 | ||
150 | priv->hw_params.max_bsm_size = 0; | ||
151 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | 150 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
152 | BIT(IEEE80211_BAND_5GHZ); | 151 | BIT(IEEE80211_BAND_5GHZ); |
153 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | 152 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 0e1f0b50f8e8..653bb8ef2950 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -185,7 +185,6 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) | |||
185 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; | 185 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; |
186 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; | 186 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; |
187 | 187 | ||
188 | priv->hw_params.max_bsm_size = 0; | ||
189 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | 188 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
190 | BIT(IEEE80211_BAND_5GHZ); | 189 | BIT(IEEE80211_BAND_5GHZ); |
191 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | 190 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
@@ -231,7 +230,6 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) | |||
231 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; | 230 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; |
232 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; | 231 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; |
233 | 232 | ||
234 | priv->hw_params.max_bsm_size = 0; | ||
235 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | 233 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
236 | BIT(IEEE80211_BAND_5GHZ); | 234 | BIT(IEEE80211_BAND_5GHZ); |
237 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | 235 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 4d545e62e5c7..1e55f811431c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -176,7 +176,6 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |||
176 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; | 176 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; |
177 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; | 177 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; |
178 | 178 | ||
179 | priv->hw_params.max_bsm_size = 0; | ||
180 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | 179 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
181 | BIT(IEEE80211_BAND_5GHZ); | 180 | BIT(IEEE80211_BAND_5GHZ); |
182 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | 181 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c66fcea4737b..5e74eb0fd6ee 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1181,7 +1181,6 @@ static void iwl_dealloc_ucode_pci(struct iwl_priv *priv) | |||
1181 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | 1181 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data_backup); |
1182 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init); | 1182 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init); |
1183 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init_data); | 1183 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_init_data); |
1184 | iwl_free_fw_desc(priv->pci_dev, &priv->ucode_boot); | ||
1185 | } | 1184 | } |
1186 | 1185 | ||
1187 | static void iwl_nic_start(struct iwl_priv *priv) | 1186 | static void iwl_nic_start(struct iwl_priv *priv) |
@@ -1239,8 +1238,8 @@ static int __must_check iwl_request_firmware(struct iwl_priv *priv, bool first) | |||
1239 | } | 1238 | } |
1240 | 1239 | ||
1241 | struct iwlagn_firmware_pieces { | 1240 | struct iwlagn_firmware_pieces { |
1242 | const void *inst, *data, *init, *init_data, *boot; | 1241 | const void *inst, *data, *init, *init_data; |
1243 | size_t inst_size, data_size, init_size, init_data_size, boot_size; | 1242 | size_t inst_size, data_size, init_size, init_data_size; |
1244 | 1243 | ||
1245 | u32 build; | 1244 | u32 build; |
1246 | 1245 | ||
@@ -1271,7 +1270,6 @@ static int iwlagn_load_legacy_firmware(struct iwl_priv *priv, | |||
1271 | pieces->data_size = le32_to_cpu(ucode->u.v2.data_size); | 1270 | pieces->data_size = le32_to_cpu(ucode->u.v2.data_size); |
1272 | pieces->init_size = le32_to_cpu(ucode->u.v2.init_size); | 1271 | pieces->init_size = le32_to_cpu(ucode->u.v2.init_size); |
1273 | pieces->init_data_size = le32_to_cpu(ucode->u.v2.init_data_size); | 1272 | pieces->init_data_size = le32_to_cpu(ucode->u.v2.init_data_size); |
1274 | pieces->boot_size = le32_to_cpu(ucode->u.v2.boot_size); | ||
1275 | src = ucode->u.v2.data; | 1273 | src = ucode->u.v2.data; |
1276 | break; | 1274 | break; |
1277 | case 0: | 1275 | case 0: |
@@ -1287,7 +1285,6 @@ static int iwlagn_load_legacy_firmware(struct iwl_priv *priv, | |||
1287 | pieces->data_size = le32_to_cpu(ucode->u.v1.data_size); | 1285 | pieces->data_size = le32_to_cpu(ucode->u.v1.data_size); |
1288 | pieces->init_size = le32_to_cpu(ucode->u.v1.init_size); | 1286 | pieces->init_size = le32_to_cpu(ucode->u.v1.init_size); |
1289 | pieces->init_data_size = le32_to_cpu(ucode->u.v1.init_data_size); | 1287 | pieces->init_data_size = le32_to_cpu(ucode->u.v1.init_data_size); |
1290 | pieces->boot_size = le32_to_cpu(ucode->u.v1.boot_size); | ||
1291 | src = ucode->u.v1.data; | 1288 | src = ucode->u.v1.data; |
1292 | break; | 1289 | break; |
1293 | } | 1290 | } |
@@ -1295,7 +1292,7 @@ static int iwlagn_load_legacy_firmware(struct iwl_priv *priv, | |||
1295 | /* Verify size of file vs. image size info in file's header */ | 1292 | /* Verify size of file vs. image size info in file's header */ |
1296 | if (ucode_raw->size != hdr_size + pieces->inst_size + | 1293 | if (ucode_raw->size != hdr_size + pieces->inst_size + |
1297 | pieces->data_size + pieces->init_size + | 1294 | pieces->data_size + pieces->init_size + |
1298 | pieces->init_data_size + pieces->boot_size) { | 1295 | pieces->init_data_size) { |
1299 | 1296 | ||
1300 | IWL_ERR(priv, | 1297 | IWL_ERR(priv, |
1301 | "uCode file size %d does not match expected size\n", | 1298 | "uCode file size %d does not match expected size\n", |
@@ -1311,8 +1308,6 @@ static int iwlagn_load_legacy_firmware(struct iwl_priv *priv, | |||
1311 | src += pieces->init_size; | 1308 | src += pieces->init_size; |
1312 | pieces->init_data = src; | 1309 | pieces->init_data = src; |
1313 | src += pieces->init_data_size; | 1310 | src += pieces->init_data_size; |
1314 | pieces->boot = src; | ||
1315 | src += pieces->boot_size; | ||
1316 | 1311 | ||
1317 | return 0; | 1312 | return 0; |
1318 | } | 1313 | } |
@@ -1413,8 +1408,7 @@ static int iwlagn_load_firmware(struct iwl_priv *priv, | |||
1413 | pieces->init_data_size = tlv_len; | 1408 | pieces->init_data_size = tlv_len; |
1414 | break; | 1409 | break; |
1415 | case IWL_UCODE_TLV_BOOT: | 1410 | case IWL_UCODE_TLV_BOOT: |
1416 | pieces->boot = tlv_data; | 1411 | IWL_ERR(priv, "Found unexpected BOOT ucode\n"); |
1417 | pieces->boot_size = tlv_len; | ||
1418 | break; | 1412 | break; |
1419 | case IWL_UCODE_TLV_PROBE_MAX_LEN: | 1413 | case IWL_UCODE_TLV_PROBE_MAX_LEN: |
1420 | if (tlv_len != sizeof(u32)) | 1414 | if (tlv_len != sizeof(u32)) |
@@ -1614,8 +1608,6 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1614 | pieces.init_size); | 1608 | pieces.init_size); |
1615 | IWL_DEBUG_INFO(priv, "f/w package hdr init data size = %Zd\n", | 1609 | IWL_DEBUG_INFO(priv, "f/w package hdr init data size = %Zd\n", |
1616 | pieces.init_data_size); | 1610 | pieces.init_data_size); |
1617 | IWL_DEBUG_INFO(priv, "f/w package hdr boot inst size = %Zd\n", | ||
1618 | pieces.boot_size); | ||
1619 | 1611 | ||
1620 | /* Verify that uCode images will fit in card's SRAM */ | 1612 | /* Verify that uCode images will fit in card's SRAM */ |
1621 | if (pieces.inst_size > priv->hw_params.max_inst_size) { | 1613 | if (pieces.inst_size > priv->hw_params.max_inst_size) { |
@@ -1642,12 +1634,6 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1642 | goto try_again; | 1634 | goto try_again; |
1643 | } | 1635 | } |
1644 | 1636 | ||
1645 | if (pieces.boot_size > priv->hw_params.max_bsm_size) { | ||
1646 | IWL_ERR(priv, "uCode boot instr len %Zd too large to fit in\n", | ||
1647 | pieces.boot_size); | ||
1648 | goto try_again; | ||
1649 | } | ||
1650 | |||
1651 | /* Allocate ucode buffers for card's bus-master loading ... */ | 1637 | /* Allocate ucode buffers for card's bus-master loading ... */ |
1652 | 1638 | ||
1653 | /* Runtime instructions and 2 copies of data: | 1639 | /* Runtime instructions and 2 copies of data: |
@@ -1678,15 +1664,6 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1678 | goto err_pci_alloc; | 1664 | goto err_pci_alloc; |
1679 | } | 1665 | } |
1680 | 1666 | ||
1681 | /* Bootstrap (instructions only, no data) */ | ||
1682 | if (pieces.boot_size) { | ||
1683 | priv->ucode_boot.len = pieces.boot_size; | ||
1684 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_boot); | ||
1685 | |||
1686 | if (!priv->ucode_boot.v_addr) | ||
1687 | goto err_pci_alloc; | ||
1688 | } | ||
1689 | |||
1690 | /* Now that we can no longer fail, copy information */ | 1667 | /* Now that we can no longer fail, copy information */ |
1691 | 1668 | ||
1692 | /* | 1669 | /* |
@@ -1749,11 +1726,6 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1749 | pieces.init_data_size); | 1726 | pieces.init_data_size); |
1750 | } | 1727 | } |
1751 | 1728 | ||
1752 | /* Bootstrap instructions */ | ||
1753 | IWL_DEBUG_INFO(priv, "Copying (but not loading) boot instr len %Zd\n", | ||
1754 | pieces.boot_size); | ||
1755 | memcpy(priv->ucode_boot.v_addr, pieces.boot, pieces.boot_size); | ||
1756 | |||
1757 | /* | 1729 | /* |
1758 | * figure out the offset of chain noise reset and gain commands | 1730 | * figure out the offset of chain noise reset and gain commands |
1759 | * base on the size of standard phy calibration commands table size | 1731 | * base on the size of standard phy calibration commands table size |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 8dc209a341aa..b3af2e8afc0a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -641,7 +641,6 @@ struct iwl_hw_params { | |||
641 | u8 max_beacon_itrvl; /* in 1024 ms */ | 641 | u8 max_beacon_itrvl; /* in 1024 ms */ |
642 | u32 max_inst_size; | 642 | u32 max_inst_size; |
643 | u32 max_data_size; | 643 | u32 max_data_size; |
644 | u32 max_bsm_size; | ||
645 | u32 ct_kill_threshold; /* value in hw-dependent units */ | 644 | u32 ct_kill_threshold; /* value in hw-dependent units */ |
646 | u32 ct_kill_exit_threshold; /* value in hw-dependent units */ | 645 | u32 ct_kill_exit_threshold; /* value in hw-dependent units */ |
647 | /* for 1000, 6000 series and up */ | 646 | /* for 1000, 6000 series and up */ |
@@ -1263,7 +1262,6 @@ struct iwl_priv { | |||
1263 | struct fw_desc ucode_data_backup; /* runtime data save/restore */ | 1262 | struct fw_desc ucode_data_backup; /* runtime data save/restore */ |
1264 | struct fw_desc ucode_init; /* initialization inst */ | 1263 | struct fw_desc ucode_init; /* initialization inst */ |
1265 | struct fw_desc ucode_init_data; /* initialization data */ | 1264 | struct fw_desc ucode_init_data; /* initialization data */ |
1266 | struct fw_desc ucode_boot; /* bootstrap inst */ | ||
1267 | enum ucode_type ucode_type; | 1265 | enum ucode_type ucode_type; |
1268 | u8 ucode_write_complete; /* the image write is complete */ | 1266 | u8 ucode_write_complete; /* the image write is complete */ |
1269 | char firmware_name[25]; | 1267 | char firmware_name[25]; |