Commit a89d03c4 authored by Reinette Chatre's avatar Reinette Chatre Committed by John W. Linville

iwlwifi: fix FAT channel config for 5000 series

The test to find out if we have FAT channels do not consider that
the value of regulatory_bands for the 5000 series is larger than its
eeprom size. Using the eeprom size is strange in itself.

Use a new EEPROM_REGULATORY_BAND_NO_FAT to indicate no FAT support
and test for that explicitly.
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Acked-by: default avatarSamuel Ortiz <samuel.ortiz@intel.com>
Tested-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 24566f4a
...@@ -2738,8 +2738,8 @@ static struct iwl_lib_ops iwl3945_lib = { ...@@ -2738,8 +2738,8 @@ static struct iwl_lib_ops iwl3945_lib = {
EEPROM_REGULATORY_BAND_3_CHANNELS, EEPROM_REGULATORY_BAND_3_CHANNELS,
EEPROM_REGULATORY_BAND_4_CHANNELS, EEPROM_REGULATORY_BAND_4_CHANNELS,
EEPROM_REGULATORY_BAND_5_CHANNELS, EEPROM_REGULATORY_BAND_5_CHANNELS,
IWL3945_EEPROM_IMG_SIZE, EEPROM_REGULATORY_BAND_NO_FAT,
IWL3945_EEPROM_IMG_SIZE, EEPROM_REGULATORY_BAND_NO_FAT,
}, },
.verify_signature = iwlcore_eeprom_verify_signature, .verify_signature = iwlcore_eeprom_verify_signature,
.acquire_semaphore = iwl3945_eeprom_acquire_semaphore, .acquire_semaphore = iwl3945_eeprom_acquire_semaphore,
......
...@@ -532,10 +532,10 @@ int iwl_init_channel_map(struct iwl_priv *priv) ...@@ -532,10 +532,10 @@ int iwl_init_channel_map(struct iwl_priv *priv)
} }
/* Check if we do have FAT channels */ /* Check if we do have FAT channels */
if (priv->cfg->ops->lib->eeprom_ops.regulatory_bands[5] >= if (priv->cfg->ops->lib->eeprom_ops.regulatory_bands[5] ==
priv->cfg->eeprom_size && EEPROM_REGULATORY_BAND_NO_FAT &&
priv->cfg->ops->lib->eeprom_ops.regulatory_bands[6] >= priv->cfg->ops->lib->eeprom_ops.regulatory_bands[6] ==
priv->cfg->eeprom_size) EEPROM_REGULATORY_BAND_NO_FAT)
return 0; return 0;
/* Two additional EEPROM bands for 2.4 and 5 GHz FAT channels */ /* Two additional EEPROM bands for 2.4 and 5 GHz FAT channels */
......
...@@ -370,6 +370,8 @@ struct iwl_eeprom_calib_info { ...@@ -370,6 +370,8 @@ struct iwl_eeprom_calib_info {
*/ */
#define EEPROM_4965_REGULATORY_BAND_52_FAT_CHANNELS (2*0xA8) /* 22 bytes */ #define EEPROM_4965_REGULATORY_BAND_52_FAT_CHANNELS (2*0xA8) /* 22 bytes */
#define EEPROM_REGULATORY_BAND_NO_FAT (0)
struct iwl_eeprom_ops { struct iwl_eeprom_ops {
const u32 regulatory_bands[7]; const u32 regulatory_bands[7];
int (*verify_signature) (struct iwl_priv *priv); int (*verify_signature) (struct iwl_priv *priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment