From: Emmanuel Grumbach Date: Thu, 29 May 2008 08:35:24 +0000 (+0800) Subject: iwlwifi: disable FAT channel when not permitted X-Git-Tag: v2.6.27-rc1~969^2~337^2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d38c2e8ea7589f546244a1673b8171455283fcb;p=linux-2.6 iwlwifi: disable FAT channel when not permitted This patch disables FAT channel when it is not permitted according to the EEPROM. Signed-off-by: Emmanuel Grumbach Signed-off-by: Tomas Winkler Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 010085aee5..c9bbfbb8cf 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -486,6 +486,25 @@ static int iwlcore_init_geos(struct iwl_priv *priv) if (ch->flags & EEPROM_CHANNEL_RADAR) geo_ch->flags |= IEEE80211_CHAN_RADAR; + switch (ch->fat_extension_channel) { + case HT_IE_EXT_CHANNEL_ABOVE: + /* only above is allowed, disable below */ + geo_ch->flags |= IEEE80211_CHAN_NO_FAT_BELOW; + break; + case HT_IE_EXT_CHANNEL_BELOW: + /* only below is allowed, disable above */ + geo_ch->flags |= IEEE80211_CHAN_NO_FAT_ABOVE; + break; + case HT_IE_EXT_CHANNEL_NONE: + /* fat not allowed: disable both*/ + geo_ch->flags |= (IEEE80211_CHAN_NO_FAT_ABOVE | + IEEE80211_CHAN_NO_FAT_BELOW); + break; + case HT_IE_EXT_CHANNEL_MAX: + /* both above and below are permitted */ + break; + } + if (ch->max_power_avg > priv->max_channel_txpower_limit) priv->max_channel_txpower_limit = ch->max_power_avg;