From owner-svn-src-all@FreeBSD.ORG Sun Mar 13 11:40:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18988106566C; Sun, 13 Mar 2011 11:40:19 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E180B8FC0C; Sun, 13 Mar 2011 11:40:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2DBeIsZ053441; Sun, 13 Mar 2011 11:40:18 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2DBeI8v053438; Sun, 13 Mar 2011 11:40:18 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201103131140.p2DBeI8v053438@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 13 Mar 2011 11:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219596 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 11:40:19 -0000 Author: bschmidt Date: Sun Mar 13 11:40:18 2011 New Revision: 219596 URL: http://svn.freebsd.org/changeset/base/219596 Log: 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. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Sun Mar 13 10:08:02 2011 (r219595) +++ head/sys/net80211/ieee80211.c Sun Mar 13 11:40:18 2011 (r219596) @@ -206,6 +206,15 @@ ieee80211_chan_init(struct ieee80211com 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. */ (void) ieee80211_setmode(ic, IEEE80211_MODE_AUTO); Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Sun Mar 13 10:08:02 2011 (r219595) +++ head/sys/net80211/ieee80211_var.h Sun Mar 13 11:40:18 2011 (r219596) @@ -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" \