]> err.no Git - linux-2.6/commitdiff
iwlwifi: 802.11n spec removes AUTO offset for FAT channel
authorGuy Cohen <guy.cohen@intel.com>
Wed, 5 Mar 2008 02:09:25 +0000 (18:09 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 7 Mar 2008 21:02:59 +0000 (16:02 -0500)
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>
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-4965.h
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 8b9c419e094e9f7a896545f049b36fff0ce66425..bb8f00272af3ef1c2b6e17bcd519dd70401913eb 100644 (file)
@@ -4416,7 +4416,7 @@ static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv,
        if (!is_channel_valid(ch_info))
                return 0;
 
-       if (extension_chan_offset == IWL_EXT_CHANNEL_OFFSET_AUTO)
+       if (extension_chan_offset == IWL_EXT_CHANNEL_OFFSET_NONE)
                return 0;
 
        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) ||
           (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;
 
        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:
                rxon->flags |= RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK;
                break;
-       case IWL_EXT_CHANNEL_OFFSET_AUTO:
-               rxon->flags &= ~RXON_FLG_CHANNEL_MODE_MIXED_MSK;
-               break;
+       case IWL_EXT_CHANNEL_OFFSET_NONE:
        default:
                rxon->flags &= ~RXON_FLG_CHANNEL_MODE_MIXED_MSK;
                break;
index 4b3def31a9c17331a807e531445c2cd28cfa7272..de79816c00681ad09376822658f888de580cd424 100644 (file)
@@ -798,11 +798,10 @@ struct iwl4965_kw {
 #define IWL_OPERATION_MODE_MIXED    2
 #define IWL_OPERATION_MODE_20MHZ    3
 
-#define IWL_EXT_CHANNEL_OFFSET_AUTO   0
-#define IWL_EXT_CHANNEL_OFFSET_ABOVE  1
-#define IWL_EXT_CHANNEL_OFFSET_       2
-#define IWL_EXT_CHANNEL_OFFSET_BELOW  3
-#define IWL_EXT_CHANNEL_OFFSET_MAX    4
+#define IWL_EXT_CHANNEL_OFFSET_NONE      0
+#define IWL_EXT_CHANNEL_OFFSET_ABOVE     1
+#define IWL_EXT_CHANNEL_OFFSET_RESERVE1  2
+#define IWL_EXT_CHANNEL_OFFSET_BELOW     3
 
 #define NRG_NUM_PREV_STAT_L     20
 #define NUM_RX_CHAINS           (3)
index 2ed69376c96e45b359a52194b9506f99a5c50f93..b0f6044fd6ebcc18c9e96195be2dbdcc28e0cf61 100644 (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->max_amsdu_size =
                !!(ht_conf->cap & IEEE80211_HT_CAP_MAX_AMSDU);
+
        iwl_conf->supported_chan_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 =
                (u8)((ht_conf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2);
        memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16);
 
        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 =
                !!(ht_bss_conf->bss_cap & IEEE80211_HT_IE_CHA_WIDTH);
        iwl_conf->ht_protection =