Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Sep 2008 21:45:18 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 149284 for review
Message-ID:  <200809052145.m85LjIkn019660@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=149284

Change 149284 by sam@sam_ebb on 2008/09/05 21:44:52

	MIMO power save and RIFS support

Affected files ...

.. //depot/projects/vap/sbin/ifconfig/ifconfig.8#17 edit
.. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#27 edit

Differences ...

==== //depot/projects/vap/sbin/ifconfig/ifconfig.8#17 (text+ko) ====

@@ -28,7 +28,7 @@
 .\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
 .\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.153 2008/08/28 22:13:44 jfv Exp $
 .\"
-.Dd August 27, 2008
+.Dd September 5, 2008
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -1396,6 +1396,13 @@
 .Cm outdoor ,
 and
 .Cm anywhere .
+.It Cm rifs
+Enable use of Reduced InterFrame Spacing (RIFS) when operating in 802.11n
+on an HT channel.
+Note that RIFS must be supported by both the station and access point
+for it to be used.
+To disable RIFS use
+.Fl rifs .
 .It Cm roam:rate Ar rate
 Set the threshold for controlling roaming when operating in a BSS.
 The
@@ -1497,6 +1504,23 @@
 NB: this currently enables Short GI on both HT40 and HT20 channels.
 To disable Short GI use
 .Fl shortgi .
+.It Cm smps
+Enable use of Static Spatial Multiplexing Power Save (SMPS)
+when operating in 802.11n.
+A station operating with Static SMPS maintains only a single
+receive chain active (this can significantly reduce power consumption).
+To disable SMPS use
+.Fl smps .
+.It Cm smpsdyn
+Enable use of Dynamic Spatial Multiplexing Power Save (SMPS)
+when operating in 802.11n.
+A station operating with Dynamic SMPS maintains only a single
+receive chain active but switches to multiple receive chains when it
+receives an RTS frame (this can significantly reduce power consumption).
+Note that stations cannot distinguish between RTS/CTS intended to
+enable multiple receive chains and those used for other purposes.
+To disable SMPS use
+.Fl smps .
 .It Cm ssid Ar ssid
 Set the desired Service Set Identifier (aka network name).
 The SSID is a string up to 32 characters

==== //depot/projects/vap/sbin/ifconfig/ifieee80211.c#27 (text+ko) ====

@@ -112,6 +112,11 @@
 #define	IEEE80211_NODE_HTCOMPAT	0x0080		/* HT setup w/ vendor OUI's */
 #define	IEEE80211_NODE_WPS	0x0100		/* WPS association */
 #define	IEEE80211_NODE_TSN	0x0200		/* TSN association */
+#define	IEEE80211_NODE_AMPDU_RX	0x0400		/* AMPDU rx enabled */
+#define	IEEE80211_NODE_AMPDU_TX	0x0800		/* AMPDU tx enabled */
+#define	IEEE80211_NODE_MIMO_PS	0x1000		/* MIMO power save enabled */
+#define	IEEE80211_NODE_MIMO_RTS	0x2000		/* send RTS in MIMO PS */
+#define	IEEE80211_NODE_RIFS	0x4000		/* RIFS enabled */
 #endif
 
 #define	MAXCOL	78
@@ -1694,6 +1699,18 @@
 	set80211(s, IEEE80211_IOC_DOTD, d, 0, NULL);
 }
 
+static void
+set80211smps(const char *val, int d, int s, const struct afswtch *rafp)
+{
+	set80211(s, IEEE80211_IOC_SMPS, d, 0, NULL);
+}
+
+static void
+set80211rifs(const char *val, int d, int s, const struct afswtch *rafp)
+{
+	set80211(s, IEEE80211_IOC_RIFS, d, 0, NULL);
+}
+
 static int
 regdomain_sort(const void *a, const void *b)
 {
@@ -2092,7 +2109,18 @@
 	if (flags & IEEE80211_NODE_WPS)
 		*cp++ = 'W';
 	if (flags & IEEE80211_NODE_TSN)
+		*cp++ = 'N';
+	if (flags & IEEE80211_NODE_AMPDU_TX)
 		*cp++ = 'T';
+	if (flags & IEEE80211_NODE_AMPDU_RX)
+		*cp++ = 'R';
+	if (flags & IEEE80211_NODE_MIMO_PS) {
+		*cp++ = 'M';
+		if (flags & IEEE80211_NODE_MIMO_RTS)
+			*cp++ = '+';
+	}
+	if (flags & IEEE80211_NODE_RIFS)
+		*cp++ = 'I';
 	*cp = '\0';
 	return flagstring;
 }
@@ -4110,6 +4138,20 @@
 			else if (verbose)
 				LINE_CHECK("-puren");
 		}
+		if (get80211val(s, IEEE80211_IOC_SMPS, &val) != -1) {
+			if (val == IEEE80211_HTCAP_SMPS_DYNAMIC)
+				LINE_CHECK("smpsdyn");
+			else if (val == IEEE80211_HTCAP_SMPS_ENA)
+				LINE_CHECK("smps");
+			else if (verbose)
+				LINE_CHECK("-smps");
+		}
+		if (get80211val(s, IEEE80211_IOC_RIFS, &val) != -1) {
+			if (val)
+				LINE_CHECK("rifs");
+			else if (verbose)
+				LINE_CHECK("-rifs");
+		}
 	}
 
 	if (get80211val(s, IEEE80211_IOC_WME, &wme) != -1) {
@@ -4592,6 +4634,11 @@
 	DEF_CMD("-ht40",	0,	set80211htconf),
 	DEF_CMD("ht",		3,	set80211htconf),	/* NB: 20+40 */
 	DEF_CMD("-ht",		0,	set80211htconf),
+	DEF_CMD("rifs",		1,	set80211rifs),
+	DEF_CMD("-rifs",	0,	set80211rifs),
+	DEF_CMD("smps",		IEEE80211_HTCAP_SMPS_ENA,	set80211smps),
+	DEF_CMD("smpsdyn",	IEEE80211_HTCAP_SMPS_DYNAMIC,	set80211smps),
+	DEF_CMD("-smps",	IEEE80211_HTCAP_SMPS_OFF,	set80211smps),
 	/* XXX for testing */
 	DEF_CMD_ARG("chanswitch",	set80211chanswitch),
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809052145.m85LjIkn019660>