summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2017-02-07 15:07:14 +0000
committerstsp <stsp@openbsd.org>2017-02-07 15:07:14 +0000
commit2a2e3a391f1f28d556cdb1037b71d313c40d16aa (patch)
treeb765f082ce0b3fc08e2cb7f6831ac5371cc794bb
parentUnfortunately DECFRA does not handle default colours properly (it does (diff)
downloadwireguard-openbsd-2a2e3a391f1f28d556cdb1037b71d313c40d16aa.tar.xz
wireguard-openbsd-2a2e3a391f1f28d556cdb1037b71d313c40d16aa.zip
Enable the short slot time feature in 802.11n mode.
ok mpi@
-rw-r--r--sys/net80211/ieee80211_proto.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index b5d4055b847..776c2e85270 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_proto.c,v 1.71 2017/02/02 16:47:53 stsp Exp $ */
+/* $OpenBSD: ieee80211_proto.c,v 1.72 2017/02/07 15:07:14 stsp Exp $ */
/* $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $ */
/*-
@@ -310,23 +310,23 @@ ieee80211_reset_erp(struct ieee80211com *ic)
{
ic->ic_flags &= ~IEEE80211_F_USEPROT;
- /*
- * Enable short slot time iff:
- * - we're operating in 802.11a or
- * - we're operating in 802.11g and we're not in IBSS mode and
- * the device supports short slot time
- */
ieee80211_set_shortslottime(ic,
- ic->ic_curmode == IEEE80211_MODE_11A
+ ic->ic_curmode == IEEE80211_MODE_11A ||
+ (ic->ic_curmode == IEEE80211_MODE_11N &&
+ IEEE80211_IS_CHAN_5GHZ(ic->ic_ibss_chan))
#ifndef IEEE80211_STA_ONLY
||
- (ic->ic_curmode == IEEE80211_MODE_11G &&
+ ((ic->ic_curmode == IEEE80211_MODE_11G ||
+ (ic->ic_curmode == IEEE80211_MODE_11N &&
+ IEEE80211_IS_CHAN_2GHZ(ic->ic_ibss_chan))) &&
ic->ic_opmode == IEEE80211_M_HOSTAP &&
(ic->ic_caps & IEEE80211_C_SHSLOT))
#endif
);
if (ic->ic_curmode == IEEE80211_MODE_11A ||
+ (ic->ic_curmode == IEEE80211_MODE_11N &&
+ IEEE80211_IS_CHAN_5GHZ(ic->ic_ibss_chan)) ||
(ic->ic_caps & IEEE80211_C_SHPREAMBLE))
ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
else