From: Reinette Chatre Date: Mon, 14 Dec 2009 22:12:13 +0000 (-0800) Subject: iwlwifi: fix 40MHz operation setting on cards that do not allow it X-Git-Tag: v2.6.33-rc3~44^2~31^2~10 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6c3069b1e7e983e176a5f826e2edffefdd404a08;p=~emulex%2Finfiniband.git iwlwifi: fix 40MHz operation setting on cards that do not allow it Some devices have 40MHz operation disabled entirely. Ensure that driver do not enable 40MHz operation if a channel does not allow this. This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2135 Signed-off-by: Reinette Chatre CC: stable@kernel.org Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 08ad6e41a1c..4a30969689f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -749,7 +749,8 @@ static int iwl_mod_ht40_chan_info(struct iwl_priv *priv, ch_info->ht40_eeprom = *eeprom_ch; ch_info->ht40_max_power_avg = eeprom_ch->max_power_avg; ch_info->ht40_flags = eeprom_ch->flags; - ch_info->ht40_extension_channel &= ~clear_ht40_extension_channel; + if (eeprom_ch->flags & EEPROM_CHANNEL_VALID) + ch_info->ht40_extension_channel &= ~clear_ht40_extension_channel; return 0; }