diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-24 02:48:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:02:24 -0400 |
commit | 0ef2ca67b19e2286eed8eeb7ef7a35ce57d6d629 (patch) | |
tree | c19702e83267fe503a790b164290fd2fec1eb6b9 /drivers/net/wireless/iwlwifi/iwl-eeprom.c | |
parent | ed7fafec5e566a30fb21586c98cbef76c306d209 (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-eeprom.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 37155755efc5..5160b4b0c0de 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -279,7 +279,23 @@ EXPORT_SYMBOL(iwl_eeprom_free); | |||
279 | 279 | ||
280 | int iwl_eeprom_check_version(struct iwl_priv *priv) | 280 | int iwl_eeprom_check_version(struct iwl_priv *priv) |
281 | { | 281 | { |
282 | return priv->cfg->ops->lib->eeprom_ops.check_version(priv); | 282 | u16 eeprom_ver; |
283 | u16 calib_ver; | ||
284 | |||
285 | eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION); | ||
286 | calib_ver = priv->cfg->ops->lib->eeprom_ops.calib_version(priv); | ||
287 | |||
288 | if (eeprom_ver < priv->cfg->eeprom_ver || | ||
289 | calib_ver < priv->cfg->eeprom_calib_ver) | ||
290 | goto err; | ||
291 | |||
292 | return 0; | ||
293 | err: | ||
294 | IWL_ERROR("Unsuported EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n", | ||
295 | eeprom_ver, priv->cfg->eeprom_ver, | ||
296 | calib_ver, priv->cfg->eeprom_calib_ver); | ||
297 | return -EINVAL; | ||
298 | |||
283 | } | 299 | } |
284 | EXPORT_SYMBOL(iwl_eeprom_check_version); | 300 | EXPORT_SYMBOL(iwl_eeprom_check_version); |
285 | 301 | ||