Date: Tue, 23 Mar 2010 12:03:09 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r205513 - head/sys/net80211 Message-ID: <201003231203.o2NC39gt065978@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Tue Mar 23 12:03:09 2010 New Revision: 205513 URL: http://svn.freebsd.org/changeset/base/205513 Log: Add a new field for extended HT capabilities. Submitted by: Alexander Egorenkov <egorenar at gmail.com> MFC after: 2 weeks Sponsored by: iXsystems, inc. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Tue Mar 23 11:33:08 2010 (r205512) +++ head/sys/net80211/ieee80211.c Tue Mar 23 12:03:09 2010 (r205513) @@ -404,6 +404,7 @@ ieee80211_vap_setup(struct ieee80211com vap->iv_flags_ven = ic->ic_flags_ven; vap->iv_caps = ic->ic_caps &~ IEEE80211_C_OPMODE; vap->iv_htcaps = ic->ic_htcaps; + vap->iv_htextcaps = ic->ic_htextcaps; vap->iv_opmode = opmode; vap->iv_caps |= ieee80211_opcap[opmode]; switch (opmode) { Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Tue Mar 23 11:33:08 2010 (r205512) +++ head/sys/net80211/ieee80211_ht.c Tue Mar 23 12:03:09 2010 (r205513) @@ -2346,7 +2346,7 @@ ieee80211_add_htcap_body(uint8_t *frm, s frm += 2; \ } while (0) struct ieee80211vap *vap = ni->ni_vap; - uint16_t caps; + uint16_t caps, extcaps; int rxmax, density; /* HT capabilities */ @@ -2404,8 +2404,17 @@ ieee80211_add_htcap_body(uint8_t *frm, s */ ieee80211_set_htrates(frm, &ieee80211_rateset_11n); - frm += sizeof(struct ieee80211_ie_htcap) - + frm += __offsetof(struct ieee80211_ie_htcap, hc_extcap) - __offsetof(struct ieee80211_ie_htcap, hc_mcsset); + + /* HT extended capabilities */ + extcaps = vap->iv_htextcaps & 0xffff; + + ADDSHORT(frm, extcaps); + + frm += sizeof(struct ieee80211_ie_htcap) - + __offsetof(struct ieee80211_ie_htcap, hc_txbf); + return frm; #undef ADDSHORT } Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Mar 23 11:33:08 2010 (r205512) +++ head/sys/net80211/ieee80211_var.h Tue Mar 23 12:03:09 2010 (r205513) @@ -137,6 +137,7 @@ struct ieee80211com { uint32_t ic_flags_ven; /* vendor state flags */ uint32_t ic_caps; /* capabilities */ uint32_t ic_htcaps; /* HT capabilities */ + uint32_t ic_htextcaps; /* HT extended capabilities */ uint32_t ic_cryptocaps; /* crypto capabilities */ uint8_t ic_modecaps[2]; /* set of mode capabilities */ uint8_t ic_promisc; /* vap's needing promisc mode */ @@ -313,7 +314,8 @@ struct ieee80211com { int batimeout, int baseqctl); void (*ic_ampdu_rx_stop)(struct ieee80211_node *, struct ieee80211_rx_ampdu *); - uint64_t ic_spare[8]; + uint64_t ic_spare[7]; + uint32_t ic_spare2; }; struct ieee80211_aclator; @@ -340,6 +342,7 @@ struct ieee80211vap { uint32_t iv_flags_ven; /* vendor state flags */ uint32_t iv_caps; /* capabilities */ uint32_t iv_htcaps; /* HT capabilities */ + uint32_t iv_htextcaps; /* HT extended capabilities */ enum ieee80211_opmode iv_opmode; /* operation mode */ enum ieee80211_state iv_state; /* state machine state */ enum ieee80211_state iv_nstate; /* pending state */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003231203.o2NC39gt065978>