aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c18
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
280int iwl_eeprom_check_version(struct iwl_priv *priv) 280int 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;
293err:
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}
284EXPORT_SYMBOL(iwl_eeprom_check_version); 300EXPORT_SYMBOL(iwl_eeprom_check_version);
285 301