From e198220fe8f8edce82d60c3b97c75588583eafd3 Mon Sep 17 00:00:00 2001 From: kevlo Date: Sun, 2 Jul 2017 14:48:19 +0000 Subject: [PATCH] Add the definition of IEEE80211_DUR_DS_SHSLOT. From IEEE Std. 802.11-2016, Table 18-5 "ERP characteristics", p. 2332: aSlotTime characteristic: If dont11OperatingClassesRequired is false: Long = 20 us Short = 9 us ok stsp@ --- sys/dev/ic/rtwn.c | 6 +++--- sys/net80211/ieee80211.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/ic/rtwn.c b/sys/dev/ic/rtwn.c index 19327d8fad6..1481da209e0 100644 --- a/sys/dev/ic/rtwn.c +++ b/sys/dev/ic/rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtwn.c,v 1.24 2017/07/01 15:56:11 kevlo Exp $ */ +/* $OpenBSD: rtwn.c,v 1.25 2017/07/02 14:48:19 kevlo Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -1076,7 +1076,7 @@ rtwn_updateslot(struct ieee80211com *ic) s = splnet(); if (ic->ic_flags & IEEE80211_F_SHSLOT) - rtwn_write_1(sc, R92C_SLOT, 9); + rtwn_write_1(sc, R92C_SLOT, IEEE80211_DUR_DS_SHSLOT); else rtwn_write_1(sc, R92C_SLOT, IEEE80211_DUR_DS_SLOT); splx(s); @@ -1097,7 +1097,7 @@ rtwn_updateedca(struct ieee80211com *ic) uint8_t acm = 0; if (ic->ic_flags & IEEE80211_F_SHSLOT) - slottime = 9; /* XXX needs a macro in ieee80211.h */ + slottime = IEEE80211_DUR_DS_SHSLOT; else slottime = IEEE80211_DUR_DS_SLOT; s = splnet(); diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 19b111f3d3f..d7be80a4562 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.h,v 1.59 2017/04/23 21:04:55 stsp Exp $ */ +/* $OpenBSD: ieee80211.h,v 1.60 2017/07/02 14:48:19 kevlo Exp $ */ /* $NetBSD: ieee80211.h,v 1.6 2004/04/30 23:51:53 dyoung Exp $ */ /*- @@ -922,6 +922,7 @@ enum { #define IEEE80211_DUR_DS_SLOW_CTS 112 #define IEEE80211_DUR_DS_FAST_CTS 56 #define IEEE80211_DUR_DS_SLOT 20 +#define IEEE80211_DUR_DS_SHSLOT 9 #define IEEE80211_DUR_DS_SIFS 10 #define IEEE80211_DUR_DS_PIFS (IEEE80211_DUR_DS_SIFS + IEEE80211_DUR_DS_SLOT) #define IEEE80211_DUR_DS_DIFS (IEEE80211_DUR_DS_SIFS + \ -- 2.20.1