svn commit: r311574 - head/sys/net80211
Adrian Chadd
adrian at FreeBSD.org
Sat Jan 7 01:51:55 UTC 2017
Author: adrian
Date: Sat Jan 7 01:51:54 2017
New Revision: 311574
URL: https://svnweb.freebsd.org/changeset/base/311574
Log:
[net80211] add FVHT flags for channel widths.
The 11n code uses these bits for both configuration /and/ controlling
the channel width on softmac chips - it uses it to find the widest
width for all VAPs (eg a HT20 vap and a HT40 vap) to know what to
configure the ic_curchan.
For fullmac devices it isn't /as/ important, as each virtual device
exposed by the firmware will likely have its own configuration and the
firmware figures out what to do to enable it.
Modified:
head/sys/net80211/ieee80211_var.h
Modified: head/sys/net80211/ieee80211_var.h
==============================================================================
--- head/sys/net80211/ieee80211_var.h Sat Jan 7 01:49:34 2017 (r311573)
+++ head/sys/net80211/ieee80211_var.h Sat Jan 7 01:51:54 2017 (r311574)
@@ -653,8 +653,12 @@ MALLOC_DECLARE(M_80211_VAP);
#define IEEE80211_FVEN_BITS "\20"
#define IEEE80211_FVHT_VHT 0x000000001 /* CONF: VHT supported */
+#define IEEE80211_FVHT_USEVHT40 0x000000002 /* CONF: Use VHT40 */
+#define IEEE80211_FVHT_USEVHT80 0x000000004 /* CONF: Use VHT80 */
+#define IEEE80211_FVHT_USEVHT80P80 0x000000008 /* CONF: Use VHT 80+80 */
+#define IEEE80211_FVHT_USEVHT160 0x000000010 /* CONF: Use VHT160 */
#define IEEE80211_VFHT_BITS \
- "\20\1VHT"
+ "\20\1VHT\2VHT40\3VHT80\4VHT80P80\5VHT160"
int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3);
void ieee80211_ifattach(struct ieee80211com *);
@@ -830,6 +834,27 @@ ieee80211_htchanflags(const struct ieee8
}
/*
+ * Calculate VHT channel promotion flags for a channel.
+ * XXX belongs in ieee80211_vht.h but needs IEEE80211_FVHT_*
+ */
+static __inline int
+ieee80211_vhtchanflags(const struct ieee80211_channel *c)
+{
+
+ if (IEEE80211_IS_CHAN_VHT160(c))
+ return IEEE80211_FVHT_USEVHT160;
+ if (IEEE80211_IS_CHAN_VHT80_80(c))
+ return IEEE80211_FVHT_USEVHT80P80;
+ if (IEEE80211_IS_CHAN_VHT80(c))
+ return IEEE80211_FVHT_USEVHT80;
+ if (IEEE80211_IS_CHAN_VHT40(c))
+ return IEEE80211_FVHT_USEVHT40;
+ if (IEEE80211_IS_CHAN_VHT(c))
+ return IEEE80211_FVHT_VHT;
+ return (0);
+}
+
+/*
* Fetch the current TX power (cap) for the given node.
*
* This includes the node and ic/vap TX power limit as needed,
More information about the svn-src-all
mailing list