aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/eeprom.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-11-23 22:33:29 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-28 15:04:42 -0500
commit0bed08de91c41b21447d704995a438d4536586ba (patch)
tree501f281d2023011835d4b74b90b07f371dc66f63 /drivers/net/wireless/iwmc3200wifi/eeprom.c
parentfe19176ea46db572f0dc2df8bfe1dc5d8751ab9e (diff)
iwmc3200wifi: Update wireless_mode with eeprom values
The iwmc3200wifi eeprom contains information about the available PHYs on the chip. We should update our wireless_mode setting and profile according to it. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/eeprom.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/eeprom.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/eeprom.c b/drivers/net/wireless/iwmc3200wifi/eeprom.c
index c574f58dfb20..8091421ee5e5 100644
--- a/drivers/net/wireless/iwmc3200wifi/eeprom.c
+++ b/drivers/net/wireless/iwmc3200wifi/eeprom.c
@@ -176,6 +176,26 @@ int iwm_eeprom_fat_channels(struct iwm_priv *iwm)
176 return 0; 176 return 0;
177} 177}
178 178
179u32 iwm_eeprom_wireless_mode(struct iwm_priv *iwm)
180{
181 u16 sku_cap;
182 u32 wireless_mode = 0;
183
184 sku_cap = *((u16 *)iwm_eeprom_access(iwm, IWM_EEPROM_SKU_CAP));
185
186 if (sku_cap & IWM_EEPROM_SKU_CAP_BAND_24GHZ)
187 wireless_mode |= WIRELESS_MODE_11G;
188
189 if (sku_cap & IWM_EEPROM_SKU_CAP_BAND_52GHZ)
190 wireless_mode |= WIRELESS_MODE_11A;
191
192 if (sku_cap & IWM_EEPROM_SKU_CAP_11N_ENABLE)
193 wireless_mode |= WIRELESS_MODE_11N;
194
195 return wireless_mode;
196}
197
198
179int iwm_eeprom_init(struct iwm_priv *iwm) 199int iwm_eeprom_init(struct iwm_priv *iwm)
180{ 200{
181 int i, ret = 0; 201 int i, ret = 0;