diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-04-24 14:55:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:25 -0400 |
commit | e86fe9f64d7cc3da9f445f3d0a2c5fd265fcd445 (patch) | |
tree | 419ffca5aff28b3a4f4fa5ad7d65b39f2a0e68b9 /drivers/net/wireless | |
parent | f1f6941500602504fa9cd97294bfb3df7f22384f (diff) |
iwlwifi-5000: add nic config handler for 5000 HW
This patch adds nic config handler for 5000 HW Family
Signed-off-by: Tomas Winkler <tomas.winkler@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-5000.c | 33 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.h | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index d8e3dd70423..df628353667 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -86,6 +86,38 @@ static int iwl5000_apm_init(struct iwl_priv *priv) | |||
86 | return ret; | 86 | return ret; |
87 | } | 87 | } |
88 | 88 | ||
89 | static void iwl5000_nic_init(struct iwl_priv *priv) | ||
90 | { | ||
91 | unsigned long flags; | ||
92 | u16 radio_cfg; | ||
93 | u8 val_link; | ||
94 | |||
95 | spin_lock_irqsave(&priv->lock, flags); | ||
96 | |||
97 | pci_read_config_byte(priv->pci_dev, PCI_LINK_CTRL, &val_link); | ||
98 | |||
99 | /* disable L1 entry -- workaround for pre-B1 */ | ||
100 | pci_write_config_byte(priv->pci_dev, PCI_LINK_CTRL, val_link & ~0x02); | ||
101 | |||
102 | radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); | ||
103 | |||
104 | /* write radio config values to register */ | ||
105 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) < EEPROM_5000_RF_CFG_TYPE_MAX) | ||
106 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | ||
107 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) | | ||
108 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) | | ||
109 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); | ||
110 | |||
111 | /* set CSR_HW_CONFIG_REG for uCode use */ | ||
112 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | ||
113 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | | ||
114 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); | ||
115 | |||
116 | spin_unlock_irqrestore(&priv->lock, flags); | ||
117 | } | ||
118 | |||
119 | |||
120 | |||
89 | /* | 121 | /* |
90 | * EEPROM | 122 | * EEPROM |
91 | */ | 123 | */ |
@@ -407,6 +439,7 @@ static struct iwl_lib_ops iwl5000_lib = { | |||
407 | .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, | 439 | .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, |
408 | .apm_ops = { | 440 | .apm_ops = { |
409 | .init = iwl5000_apm_init, | 441 | .init = iwl5000_apm_init, |
442 | .config = iwl5000_nic_init, | ||
410 | .set_pwr_src = iwl4965_set_pwr_src, | 443 | .set_pwr_src = iwl4965_set_pwr_src, |
411 | }, | 444 | }, |
412 | .eeprom_ops = { | 445 | .eeprom_ops = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h index 06ed30044a4..dc1f027c66a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h | |||
@@ -295,6 +295,7 @@ struct iwl_eeprom_calib_info { | |||
295 | 295 | ||
296 | #define EEPROM_3945_RF_CFG_TYPE_MAX 0x0 | 296 | #define EEPROM_3945_RF_CFG_TYPE_MAX 0x0 |
297 | #define EEPROM_4965_RF_CFG_TYPE_MAX 0x1 | 297 | #define EEPROM_4965_RF_CFG_TYPE_MAX 0x1 |
298 | #define EEPROM_5000_RF_CFG_TYPE_MAX 0x3 | ||
298 | 299 | ||
299 | /* | 300 | /* |
300 | * Per-channel regulatory data. | 301 | * Per-channel regulatory data. |