aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-05-06 15:21:40 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-05-13 13:45:24 -0400
commitc213d745b25b24b68f790fe55fc0a2159218a079 (patch)
tree0167dab957cdea2fde74386410cd74ec7ec6c803 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parentd73e4923d1b3311dda4cd1bd5d3596d75af1d1c3 (diff)
iwlwifi: use proper short slot/preamble settings
The short preamble setting might change on the fly, and then we already use the right mac80211 variable. However, in other places we don't, which is especially wrong in the AP code since in that case the assoc_capability is invalid. Also, the IBSS special case is not needed since "use_short_slot" will be properly cleared, but the "assoc_capability" might be invalid (which must be the reason for the special case). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 82beeb5a2af9..09f8acae48d3 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3096,19 +3096,16 @@ void iwl3945_post_associate(struct iwl_priv *priv, struct ieee80211_vif *vif)
3096 IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n", 3096 IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n",
3097 vif->bss_conf.aid, vif->bss_conf.beacon_int); 3097 vif->bss_conf.aid, vif->bss_conf.beacon_int);
3098 3098
3099 if (vif->bss_conf.assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE) 3099 if (vif->bss_conf.use_short_preamble)
3100 priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; 3100 priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
3101 else 3101 else
3102 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; 3102 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
3103 3103
3104 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) { 3104 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) {
3105 if (vif->bss_conf.assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) 3105 if (vif->bss_conf.use_short_slot)
3106 priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; 3106 priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
3107 else 3107 else
3108 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 3108 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
3109
3110 if (vif->type == NL80211_IFTYPE_ADHOC)
3111 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
3112 } 3109 }
3113 3110
3114 iwlcore_commit_rxon(priv); 3111 iwlcore_commit_rxon(priv);
@@ -3272,8 +3269,7 @@ void iwl3945_config_ap(struct iwl_priv *priv, struct ieee80211_vif *vif)
3272 3269
3273 priv->staging_rxon.assoc_id = 0; 3270 priv->staging_rxon.assoc_id = 0;
3274 3271
3275 if (vif->bss_conf.assoc_capability & 3272 if (vif->bss_conf.use_short_preamble)
3276 WLAN_CAPABILITY_SHORT_PREAMBLE)
3277 priv->staging_rxon.flags |= 3273 priv->staging_rxon.flags |=
3278 RXON_FLG_SHORT_PREAMBLE_MSK; 3274 RXON_FLG_SHORT_PREAMBLE_MSK;
3279 else 3275 else
@@ -3281,17 +3277,12 @@ void iwl3945_config_ap(struct iwl_priv *priv, struct ieee80211_vif *vif)
3281 ~RXON_FLG_SHORT_PREAMBLE_MSK; 3277 ~RXON_FLG_SHORT_PREAMBLE_MSK;
3282 3278
3283 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) { 3279 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) {
3284 if (vif->bss_conf.assoc_capability & 3280 if (vif->bss_conf.use_short_slot)
3285 WLAN_CAPABILITY_SHORT_SLOT_TIME)
3286 priv->staging_rxon.flags |= 3281 priv->staging_rxon.flags |=
3287 RXON_FLG_SHORT_SLOT_MSK; 3282 RXON_FLG_SHORT_SLOT_MSK;
3288 else 3283 else
3289 priv->staging_rxon.flags &= 3284 priv->staging_rxon.flags &=
3290 ~RXON_FLG_SHORT_SLOT_MSK; 3285 ~RXON_FLG_SHORT_SLOT_MSK;
3291
3292 if (vif->type == NL80211_IFTYPE_ADHOC)
3293 priv->staging_rxon.flags &=
3294 ~RXON_FLG_SHORT_SLOT_MSK;
3295 } 3286 }
3296 /* restore RXON assoc */ 3287 /* restore RXON assoc */
3297 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; 3288 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;