iwlwifi: 802.11n spec removes AUTO offset for FAT channel

This patch adapts to 802.11 patch and remove AUTO offset for FAT
channel

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Guy Cohen 2008-03-04 18:09:25 -08:00 committed by John W. Linville
parent 87d96114a7
commit 134eb5d327
3 changed files with 15 additions and 12 deletions

View File

@ -4416,7 +4416,7 @@ static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv,
if (!is_channel_valid(ch_info)) if (!is_channel_valid(ch_info))
return 0; return 0;
if (extension_chan_offset == IWL_EXT_CHANNEL_OFFSET_AUTO) if (extension_chan_offset == IWL_EXT_CHANNEL_OFFSET_NONE)
return 0; return 0;
if ((ch_info->fat_extension_channel == extension_chan_offset) || if ((ch_info->fat_extension_channel == extension_chan_offset) ||
@ -4433,7 +4433,7 @@ static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv,
if ((!iwl_ht_conf->is_ht) || if ((!iwl_ht_conf->is_ht) ||
(iwl_ht_conf->supported_chan_width != IWL_CHANNEL_WIDTH_40MHZ) || (iwl_ht_conf->supported_chan_width != IWL_CHANNEL_WIDTH_40MHZ) ||
(iwl_ht_conf->extension_chan_offset == IWL_EXT_CHANNEL_OFFSET_AUTO)) (iwl_ht_conf->extension_chan_offset == IWL_EXT_CHANNEL_OFFSET_NONE))
return 0; return 0;
if (sta_ht_inf) { if (sta_ht_inf) {
@ -4478,9 +4478,7 @@ void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info)
case IWL_EXT_CHANNEL_OFFSET_BELOW: case IWL_EXT_CHANNEL_OFFSET_BELOW:
rxon->flags |= RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK; rxon->flags |= RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK;
break; break;
case IWL_EXT_CHANNEL_OFFSET_AUTO: case IWL_EXT_CHANNEL_OFFSET_NONE:
rxon->flags &= ~RXON_FLG_CHANNEL_MODE_MIXED_MSK;
break;
default: default:
rxon->flags &= ~RXON_FLG_CHANNEL_MODE_MIXED_MSK; rxon->flags &= ~RXON_FLG_CHANNEL_MODE_MIXED_MSK;
break; break;

View File

@ -798,11 +798,10 @@ struct iwl4965_kw {
#define IWL_OPERATION_MODE_MIXED 2 #define IWL_OPERATION_MODE_MIXED 2
#define IWL_OPERATION_MODE_20MHZ 3 #define IWL_OPERATION_MODE_20MHZ 3
#define IWL_EXT_CHANNEL_OFFSET_AUTO 0 #define IWL_EXT_CHANNEL_OFFSET_NONE 0
#define IWL_EXT_CHANNEL_OFFSET_ABOVE 1 #define IWL_EXT_CHANNEL_OFFSET_ABOVE 1
#define IWL_EXT_CHANNEL_OFFSET_ 2 #define IWL_EXT_CHANNEL_OFFSET_RESERVE1 2
#define IWL_EXT_CHANNEL_OFFSET_BELOW 3 #define IWL_EXT_CHANNEL_OFFSET_BELOW 3
#define IWL_EXT_CHANNEL_OFFSET_MAX 4
#define NRG_NUM_PREV_STAT_L 20 #define NRG_NUM_PREV_STAT_L 20
#define NUM_RX_CHAINS (3) #define NUM_RX_CHAINS (3)

View File

@ -7957,15 +7957,21 @@ static void iwl4965_ht_info_fill(struct ieee80211_conf *conf,
iwl_conf->is_green_field = !!(ht_conf->cap & IEEE80211_HT_CAP_GRN_FLD); iwl_conf->is_green_field = !!(ht_conf->cap & IEEE80211_HT_CAP_GRN_FLD);
iwl_conf->max_amsdu_size = iwl_conf->max_amsdu_size =
!!(ht_conf->cap & IEEE80211_HT_CAP_MAX_AMSDU); !!(ht_conf->cap & IEEE80211_HT_CAP_MAX_AMSDU);
iwl_conf->supported_chan_width = iwl_conf->supported_chan_width =
!!(ht_conf->cap & IEEE80211_HT_CAP_SUP_WIDTH); !!(ht_conf->cap & IEEE80211_HT_CAP_SUP_WIDTH);
iwl_conf->extension_chan_offset =
ht_bss_conf->bss_cap & IEEE80211_HT_IE_CHA_SEC_OFFSET;
/* If no above or below channel supplied disable FAT channel */
if (iwl_conf->extension_chan_offset != IWL_EXT_CHANNEL_OFFSET_ABOVE &&
iwl_conf->extension_chan_offset != IWL_EXT_CHANNEL_OFFSET_BELOW)
iwl_conf->supported_chan_width = 0;
iwl_conf->tx_mimo_ps_mode = iwl_conf->tx_mimo_ps_mode =
(u8)((ht_conf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2); (u8)((ht_conf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2);
memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16); memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16);
iwl_conf->control_channel = ht_bss_conf->primary_channel; iwl_conf->control_channel = ht_bss_conf->primary_channel;
iwl_conf->extension_chan_offset =
ht_bss_conf->bss_cap & IEEE80211_HT_IE_CHA_SEC_OFFSET;
iwl_conf->tx_chan_width = iwl_conf->tx_chan_width =
!!(ht_bss_conf->bss_cap & IEEE80211_HT_IE_CHA_WIDTH); !!(ht_bss_conf->bss_cap & IEEE80211_HT_IE_CHA_WIDTH);
iwl_conf->ht_protection = iwl_conf->ht_protection =