This diff enables short slot time, accidentally left disabled in 11n mode.
Short vs. long slot time controls the (very small) amount of time devices
spend waiting between frame transmissions.

The only wifi devices which do not support short slot time are 11b ones.

Index: ieee80211_proto.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_proto.c,v
retrieving revision 1.71
diff -u -p -r1.71 ieee80211_proto.c
--- ieee80211_proto.c   2 Feb 2017 16:47:53 -0000       1.71
+++ ieee80211_proto.c   7 Feb 2017 09:20:27 -0000
@@ -310,23 +310,23 @@ ieee80211_reset_erp(struct ieee80211com 
 {
        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

Reply via email to