From fbbe47a9eab1433f5acf4172e444bf91cf84caab Mon Sep 17 00:00:00 2001 From: Bernhard Schmidt Date: Sun, 13 Mar 2011 11:40:18 +0000 Subject: [PATCH] First step on removing the harcoded RX/TX stream and MCS0-15 assumptions. Initialize ic_rxstream/ic_txstream with 2, for compatibility reasons. Introduce 4 new HTC flags, which are used in addition to ic_rxstream and ic_txstream to compute the hc_mcsset content and also for initializing ni_htrates. The number of spatial streams is enough to determine support for MCS0-31 but not for MCS32-76 as well as some TX parameters in the hc_mcsset field. --- sys/net80211/ieee80211.c | 9 +++++++++ sys/net80211/ieee80211_var.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 306a4b5ddab..c433c2c2ecd 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -205,6 +205,15 @@ ieee80211_chan_init(struct ieee80211com *ic) DEFAULTRATES(IEEE80211_MODE_11NA, ieee80211_rateset_11a); DEFAULTRATES(IEEE80211_MODE_11NG, ieee80211_rateset_11g); + /* + * Setup required information to fill the mcsset field, if driver did + * not. Assume a 2T2R setup for historic reasons. + */ + if (ic->ic_rxstream == 0) + ic->ic_rxstream = 2; + if (ic->ic_txstream == 0) + ic->ic_txstream = 2; + /* * Set auto mode to reset active channel state and any desired channel. */ diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index eea8dbe2855..236883d2fed 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -637,6 +637,10 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_HTC_HT 0x00040000 /* CAPABILITY: HT operation */ #define IEEE80211_HTC_SMPS 0x00080000 /* CAPABILITY: MIMO power save*/ #define IEEE80211_HTC_RIFS 0x00100000 /* CAPABILITY: RIFS support */ +#define IEEE80211_HTC_RXUNEQUAL 0x00200000 /* CAPABILITY: RX unequal MCS */ +#define IEEE80211_HTC_RXMCS32 0x00400000 /* CAPABILITY: MCS32 support */ +#define IEEE80211_HTC_TXUNEQUAL 0x00800000 /* CAPABILITY: TX unequal MCS */ +#define IEEE80211_HTC_TXMCS32 0x01000000 /* CAPABILITY: MCS32 suport */ #define IEEE80211_C_HTCAP_BITS \ "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \