aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-10-24 02:48:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:02:24 -0400
commit0ef2ca67b19e2286eed8eeb7ef7a35ce57d6d629 (patch)
treec19702e83267fe503a790b164290fd2fec1eb6b9 /drivers/net/wireless/iwlwifi/iwl-4965.c
parented7fafec5e566a30fb21586c98cbef76c306d209 (diff)
iwlwifi: parametrize eeprom versions
This patch uses new parameters eeprom_ver and eeprom_calib_ver to support additional HW. 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.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 741b425b5883..f53cd2b096df 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -318,27 +318,9 @@ static int is_fat_channel(__le32 rxon_flags)
318/* 318/*
319 * EEPROM handlers 319 * EEPROM handlers
320 */ 320 */
321 321static u16 iwl4965_eeprom_calib_version(struct iwl_priv *priv)
322static int iwl4965_eeprom_check_version(struct iwl_priv *priv)
323{ 322{
324 u16 eeprom_ver; 323 return iwl_eeprom_query16(priv, EEPROM_4965_CALIB_VERSION_OFFSET);
325 u16 calib_ver;
326
327 eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION);
328
329 calib_ver = iwl_eeprom_query16(priv, EEPROM_4965_CALIB_VERSION_OFFSET);
330
331 if (eeprom_ver < EEPROM_4965_EEPROM_VERSION ||
332 calib_ver < EEPROM_4965_TX_POWER_VERSION)
333 goto err;
334
335 return 0;
336err:
337 IWL_ERROR("Unsuported EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n",
338 eeprom_ver, EEPROM_4965_EEPROM_VERSION,
339 calib_ver, EEPROM_4965_TX_POWER_VERSION);
340 return -EINVAL;
341
342} 324}
343 325
344/* 326/*
@@ -2355,7 +2337,7 @@ static struct iwl_lib_ops iwl4965_lib = {
2355 .verify_signature = iwlcore_eeprom_verify_signature, 2337 .verify_signature = iwlcore_eeprom_verify_signature,
2356 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, 2338 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
2357 .release_semaphore = iwlcore_eeprom_release_semaphore, 2339 .release_semaphore = iwlcore_eeprom_release_semaphore,
2358 .check_version = iwl4965_eeprom_check_version, 2340 .calib_version = iwl4965_eeprom_calib_version,
2359 .query_addr = iwlcore_eeprom_query_addr, 2341 .query_addr = iwlcore_eeprom_query_addr,
2360 }, 2342 },
2361 .send_tx_power = iwl4965_send_tx_power, 2343 .send_tx_power = iwl4965_send_tx_power,
@@ -2374,6 +2356,8 @@ struct iwl_cfg iwl4965_agn_cfg = {
2374 .fw_name = "iwlwifi-4965" IWL4965_UCODE_API ".ucode", 2356 .fw_name = "iwlwifi-4965" IWL4965_UCODE_API ".ucode",
2375 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, 2357 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
2376 .eeprom_size = IWL4965_EEPROM_IMG_SIZE, 2358 .eeprom_size = IWL4965_EEPROM_IMG_SIZE,
2359 .eeprom_ver = EEPROM_4965_EEPROM_VERSION,
2360 .eeprom_calib_ver = EEPROM_4965_TX_POWER_VERSION,
2377 .ops = &iwl4965_ops, 2361 .ops = &iwl4965_ops,
2378 .mod_params = &iwl4965_mod_params, 2362 .mod_params = &iwl4965_mod_params,
2379}; 2363};