aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-14 21:00:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-15 17:02:07 -0500
commit43d3534344bbdcfa9c61a6b38490cd4cbb2f6bb6 (patch)
tree66b87eb3d8c1751af37cf66afde977bb100db4a8 /net
parent84920e3e47f654a22b540606fb8c1ab90b870942 (diff)
mac80211: force use_short_slot=true for 5GHz
Normally 5GHz does not have a concept of long vs short slot time, however the slot time that it ends up using is the same as for 2.4 GHZ and use_short_slot == true Because of that, it makes more sense to force use_short_slot = true whenever 5 GHz is being used, so that this particular check does not have to be in every single driver that uses this flag. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c7
-rw-r--r--net/mac80211/mlme.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 8286df5822d5..b0102c538b30 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1085,6 +1085,13 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
1085 params->use_short_preamble; 1085 params->use_short_preamble;
1086 changed |= BSS_CHANGED_ERP_PREAMBLE; 1086 changed |= BSS_CHANGED_ERP_PREAMBLE;
1087 } 1087 }
1088
1089 if (!sdata->vif.bss_conf.use_short_slot &&
1090 sdata->local->hw.conf.channel->band == IEEE80211_BAND_5GHZ) {
1091 sdata->vif.bss_conf.use_short_slot = true;
1092 changed |= BSS_CHANGED_ERP_SLOT;
1093 }
1094
1088 if (params->use_short_slot_time >= 0) { 1095 if (params->use_short_slot_time >= 0) {
1089 sdata->vif.bss_conf.use_short_slot = 1096 sdata->vif.bss_conf.use_short_slot =
1090 params->use_short_slot_time; 1097 params->use_short_slot_time;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2746391248d3..a82564e73d91 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -670,6 +670,8 @@ static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
670 } 670 }
671 671
672 use_short_slot = !!(capab & WLAN_CAPABILITY_SHORT_SLOT_TIME); 672 use_short_slot = !!(capab & WLAN_CAPABILITY_SHORT_SLOT_TIME);
673 if (sdata->local->hw.conf.channel->band == IEEE80211_BAND_5GHZ)
674 use_short_slot = true;
673 675
674 if (use_protection != bss_conf->use_cts_prot) { 676 if (use_protection != bss_conf->use_cts_prot) {
675 bss_conf->use_cts_prot = use_protection; 677 bss_conf->use_cts_prot = use_protection;