diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-05 12:42:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-07 15:51:39 -0400 |
commit | e98a130259ed6f88bc2833fa525b10453c92c047 (patch) | |
tree | 067f8b8d3421e4e7e2fd5a31e089c3a3caaf4965 /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | bc255930639122d788d1b6ce10d3c01cc2946398 (diff) |
iwlagn: remove hw_rev
The hw_rev variable is used only during init,
so there's no need to keep it around.
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/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 55a1d65c4baf..c3306bae0f1e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3685,11 +3685,11 @@ struct ieee80211_ops iwlagn_hw_ops = { | |||
3685 | .offchannel_tx_cancel_wait = iwl_mac_offchannel_tx_cancel_wait, | 3685 | .offchannel_tx_cancel_wait = iwl_mac_offchannel_tx_cancel_wait, |
3686 | }; | 3686 | }; |
3687 | 3687 | ||
3688 | static void iwl_hw_detect(struct iwl_priv *priv) | 3688 | static u32 iwl_hw_detect(struct iwl_priv *priv) |
3689 | { | 3689 | { |
3690 | priv->hw_rev = _iwl_read32(priv, CSR_HW_REV); | ||
3691 | priv->rev_id = priv->pci_dev->revision; | 3690 | priv->rev_id = priv->pci_dev->revision; |
3692 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", priv->rev_id); | 3691 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", priv->rev_id); |
3692 | return _iwl_read32(priv, CSR_HW_REV); | ||
3693 | } | 3693 | } |
3694 | 3694 | ||
3695 | static int iwl_set_hw_params(struct iwl_priv *priv) | 3695 | static int iwl_set_hw_params(struct iwl_priv *priv) |
@@ -3740,6 +3740,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3740 | struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); | 3740 | struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); |
3741 | unsigned long flags; | 3741 | unsigned long flags; |
3742 | u16 pci_cmd, num_mac; | 3742 | u16 pci_cmd, num_mac; |
3743 | u32 hw_rev; | ||
3743 | 3744 | ||
3744 | /************************ | 3745 | /************************ |
3745 | * 1. Allocating HW data | 3746 | * 1. Allocating HW data |
@@ -3885,9 +3886,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3885 | */ | 3886 | */ |
3886 | iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); | 3887 | iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); |
3887 | 3888 | ||
3888 | iwl_hw_detect(priv); | 3889 | hw_rev = iwl_hw_detect(priv); |
3889 | IWL_INFO(priv, "Detected %s, REV=0x%X\n", | 3890 | IWL_INFO(priv, "Detected %s, REV=0x%X\n", |
3890 | priv->cfg->name, priv->hw_rev); | 3891 | priv->cfg->name, hw_rev); |
3891 | 3892 | ||
3892 | /* We disable the RETRY_TIMEOUT register (0x41) to keep | 3893 | /* We disable the RETRY_TIMEOUT register (0x41) to keep |
3893 | * PCI Tx retries from interfering with C3 CPU state */ | 3894 | * PCI Tx retries from interfering with C3 CPU state */ |
@@ -3903,7 +3904,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3903 | * 4. Read EEPROM | 3904 | * 4. Read EEPROM |
3904 | *****************/ | 3905 | *****************/ |
3905 | /* Read the EEPROM */ | 3906 | /* Read the EEPROM */ |
3906 | err = iwl_eeprom_init(priv); | 3907 | err = iwl_eeprom_init(priv, hw_rev); |
3907 | if (err) { | 3908 | if (err) { |
3908 | IWL_ERR(priv, "Unable to init EEPROM\n"); | 3909 | IWL_ERR(priv, "Unable to init EEPROM\n"); |
3909 | goto out_iounmap; | 3910 | goto out_iounmap; |