aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index c532584b11e6..783f722f3c35 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -1128,15 +1128,6 @@ static int iwl4965_send_beacon_cmd(struct iwl_priv *priv)
1128 * 1128 *
1129 ******************************************************************************/ 1129 ******************************************************************************/
1130 1130
1131static void iwl4965_unset_hw_params(struct iwl_priv *priv)
1132{
1133 if (priv->shared_virt)
1134 pci_free_consistent(priv->pci_dev,
1135 sizeof(struct iwl4965_shared),
1136 priv->shared_virt,
1137 priv->shared_phys);
1138}
1139
1140/** 1131/**
1141 * iwl4965_supported_rate_to_ie - fill in the supported rate in IE field 1132 * iwl4965_supported_rate_to_ie - fill in the supported rate in IE field
1142 * 1133 *
@@ -5298,6 +5289,7 @@ static void __iwl4965_down(struct iwl_priv *priv)
5298 iwl4965_hw_nic_stop_master(priv); 5289 iwl4965_hw_nic_stop_master(priv);
5299 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); 5290 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
5300 iwl4965_hw_nic_reset(priv); 5291 iwl4965_hw_nic_reset(priv);
5292 priv->cfg->ops->lib->free_shared_mem(priv);
5301 5293
5302 exit: 5294 exit:
5303 memset(&priv->card_alive, 0, sizeof(struct iwl4965_alive_resp)); 5295 memset(&priv->card_alive, 0, sizeof(struct iwl4965_alive_resp));
@@ -5359,6 +5351,12 @@ static int __iwl4965_up(struct iwl_priv *priv)
5359 iwl_rfkill_set_hw_state(priv); 5351 iwl_rfkill_set_hw_state(priv);
5360 iwl_write32(priv, CSR_INT, 0xFFFFFFFF); 5352 iwl_write32(priv, CSR_INT, 0xFFFFFFFF);
5361 5353
5354 ret = priv->cfg->ops->lib->alloc_shared_mem(priv);
5355 if (ret) {
5356 IWL_ERROR("Unable to allocate shared memory\n");
5357 return ret;
5358 }
5359
5362 ret = priv->cfg->ops->lib->hw_nic_init(priv); 5360 ret = priv->cfg->ops->lib->hw_nic_init(priv);
5363 if (ret) { 5361 if (ret) {
5364 IWL_ERROR("Unable to init nic\n"); 5362 IWL_ERROR("Unable to init nic\n");
@@ -7503,7 +7501,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7503 7501
7504 err = iwl_setup(priv); 7502 err = iwl_setup(priv);
7505 if (err) 7503 if (err)
7506 goto out_unset_hw_params; 7504 goto out_free_eeprom;
7507 /* At this point both hw and priv are initialized. */ 7505 /* At this point both hw and priv are initialized. */
7508 7506
7509 /********************************** 7507 /**********************************
@@ -7529,7 +7527,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7529 err = sysfs_create_group(&pdev->dev.kobj, &iwl4965_attribute_group); 7527 err = sysfs_create_group(&pdev->dev.kobj, &iwl4965_attribute_group);
7530 if (err) { 7528 if (err) {
7531 IWL_ERROR("failed to create sysfs device attributes\n"); 7529 IWL_ERROR("failed to create sysfs device attributes\n");
7532 goto out_unset_hw_params; 7530 goto out_free_eeprom;
7533 } 7531 }
7534 7532
7535 err = iwl_dbgfs_register(priv, DRV_NAME); 7533 err = iwl_dbgfs_register(priv, DRV_NAME);
@@ -7553,8 +7551,6 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7553 7551
7554 out_remove_sysfs: 7552 out_remove_sysfs:
7555 sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); 7553 sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group);
7556 out_unset_hw_params:
7557 iwl4965_unset_hw_params(priv);
7558 out_free_eeprom: 7554 out_free_eeprom:
7559 iwl_eeprom_free(priv); 7555 iwl_eeprom_free(priv);
7560 out_iounmap: 7556 out_iounmap:
@@ -7618,7 +7614,6 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
7618 iwl4965_rx_queue_free(priv, &priv->rxq); 7614 iwl4965_rx_queue_free(priv, &priv->rxq);
7619 iwl4965_hw_txq_ctx_free(priv); 7615 iwl4965_hw_txq_ctx_free(priv);
7620 7616
7621 iwl4965_unset_hw_params(priv);
7622 iwlcore_clear_stations_table(priv); 7617 iwlcore_clear_stations_table(priv);
7623 iwl_eeprom_free(priv); 7618 iwl_eeprom_free(priv);
7624 7619