diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-04-23 20:14:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:17 -0400 |
commit | b661c8190e91c0baeebf813fec7ff8e99e155a54 (patch) | |
tree | 9b0e754ad7972e41980f6299b96b64f2b88accb4 /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | 91238714affef7603446207ad03a594d95d2eb9d (diff) |
iwlwifi: add iwl_hw_detect function to iwl core
This patch add iwl_hw_detect function to iwl core
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index b8c72159b595..d1ddbf34b7fe 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -739,7 +739,6 @@ int iwl4965_hw_nic_init(struct iwl_priv *priv) | |||
739 | { | 739 | { |
740 | unsigned long flags; | 740 | unsigned long flags; |
741 | struct iwl4965_rx_queue *rxq = &priv->rxq; | 741 | struct iwl4965_rx_queue *rxq = &priv->rxq; |
742 | u8 rev_id; | ||
743 | u8 val_link; | 742 | u8 val_link; |
744 | u32 val; | 743 | u32 val; |
745 | int ret; | 744 | int ret; |
@@ -751,18 +750,11 @@ int iwl4965_hw_nic_init(struct iwl_priv *priv) | |||
751 | iwl_write32(priv, CSR_INT_COALESCING, 512 / 32); | 750 | iwl_write32(priv, CSR_INT_COALESCING, 512 / 32); |
752 | spin_unlock_irqrestore(&priv->lock, flags); | 751 | spin_unlock_irqrestore(&priv->lock, flags); |
753 | 752 | ||
754 | /* Determine HW type */ | ||
755 | ret = pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &rev_id); | ||
756 | if (ret) | ||
757 | return ret; | ||
758 | |||
759 | IWL_DEBUG_INFO("HW Revision ID = 0x%X\n", rev_id); | ||
760 | |||
761 | ret = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); | 753 | ret = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); |
762 | 754 | ||
763 | spin_lock_irqsave(&priv->lock, flags); | 755 | spin_lock_irqsave(&priv->lock, flags); |
764 | 756 | ||
765 | if ((rev_id & 0x80) == 0x80 && (rev_id & 0x7f) < 8) { | 757 | if ((priv->rev_id & 0x80) == 0x80 && (priv->rev_id & 0x7f) < 8) { |
766 | pci_read_config_dword(priv->pci_dev, PCI_REG_WUM8, &val); | 758 | pci_read_config_dword(priv->pci_dev, PCI_REG_WUM8, &val); |
767 | /* Enable No Snoop field */ | 759 | /* Enable No Snoop field */ |
768 | pci_write_config_dword(priv->pci_dev, PCI_REG_WUM8, | 760 | pci_write_config_dword(priv->pci_dev, PCI_REG_WUM8, |