Author: sam
Date: Sun Jun  7 22:00:22 2009
New Revision: 193655
URL: http://svn.freebsd.org/changeset/base/193655

Log:
  iv_flags_ext is full, make room by moving HT-related flags to a new
  iv_flags_ht word

Modified:
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_hostap.c
  head/sys/net80211/ieee80211_ht.c
  head/sys/net80211/ieee80211_input.c
  head/sys/net80211/ieee80211_ioctl.c
  head/sys/net80211/ieee80211_node.c
  head/sys/net80211/ieee80211_output.c
  head/sys/net80211/ieee80211_proto.h
  head/sys/net80211/ieee80211_scan_sta.c
  head/sys/net80211/ieee80211_sta.c
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/ieee80211.c
==============================================================================
--- head/sys/net80211/ieee80211.c       Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211.c       Sun Jun  7 22:00:22 2009        
(r193655)
@@ -80,6 +80,7 @@ static const uint8_t ieee80211broadcasta
        { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
 static void ieee80211_syncflag_locked(struct ieee80211com *ic, int flag);
+static void ieee80211_syncflag_ht_locked(struct ieee80211com *ic, int flag);
 static void ieee80211_syncflag_ext_locked(struct ieee80211com *ic, int flag);
 static int ieee80211_media_setup(struct ieee80211com *ic,
                struct ifmedia *media, int caps, int addsta,
@@ -520,8 +521,8 @@ ieee80211_vap_attach(struct ieee80211vap
 #endif
        ieee80211_syncflag_locked(ic, IEEE80211_F_PCF);
        ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
-       ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_HT);
-       ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_USEHT40);
+       ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
+       ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
        ieee80211_syncifflag_locked(ic, IFF_PROMISC);
        ieee80211_syncifflag_locked(ic, IFF_ALLMULTI);
        IEEE80211_UNLOCK(ic);
@@ -566,8 +567,8 @@ ieee80211_vap_detach(struct ieee80211vap
 #endif
        ieee80211_syncflag_locked(ic, IEEE80211_F_PCF);
        ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
-       ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_HT);
-       ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_USEHT40);
+       ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
+       ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
        /* NB: this handles the bpfdetach done below */
        ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_BPF);
        ieee80211_syncifflag_locked(ic, IFF_PROMISC);
@@ -678,7 +679,47 @@ ieee80211_syncflag(struct ieee80211vap *
 }
 
 /*
- * Synchronize flag bit state in the com structure
+ * Synchronize flags_ht bit state in the com structure
+ * according to the state of all vap's.  This is used,
+ * for example, to handle state changes via ioctls.
+ */
+static void
+ieee80211_syncflag_ht_locked(struct ieee80211com *ic, int flag)
+{
+       struct ieee80211vap *vap;
+       int bit;
+
+       IEEE80211_LOCK_ASSERT(ic);
+
+       bit = 0;
+       TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
+               if (vap->iv_flags_ht & flag) {
+                       bit = 1;
+                       break;
+               }
+       if (bit)
+               ic->ic_flags_ht |= flag;
+       else
+               ic->ic_flags_ht &= ~flag;
+}
+
+void
+ieee80211_syncflag_ht(struct ieee80211vap *vap, int flag)
+{
+       struct ieee80211com *ic = vap->iv_ic;
+
+       IEEE80211_LOCK(ic);
+       if (flag < 0) {
+               flag = -flag;
+               vap->iv_flags_ht &= ~flag;
+       } else
+               vap->iv_flags_ht |= flag;
+       ieee80211_syncflag_ht_locked(ic, flag);
+       IEEE80211_UNLOCK(ic);
+}
+
+/*
+ * Synchronize flags_ext bit state in the com structure
  * according to the state of all vap's.  This is used,
  * for example, to handle state changes via ioctls.
  */

Modified: head/sys/net80211/ieee80211_hostap.c
==============================================================================
--- head/sys/net80211/ieee80211_hostap.c        Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_hostap.c        Sun Jun  7 22:00:22 2009        
(r193655)
@@ -201,7 +201,7 @@ hostap_newstate(struct ieee80211vap *vap
                         * is set before doing anything so this is sufficient.
                         */
                        ic->ic_flags_ext &= ~IEEE80211_FEXT_NONERP_PR;
-                       ic->ic_flags_ext &= ~IEEE80211_FEXT_NONHT_PR;
+                       ic->ic_flags_ht &= ~IEEE80211_FHT_NONHT_PR;
                        /* fall thru... */
                case IEEE80211_S_CAC:
                        /*
@@ -272,7 +272,7 @@ hostap_newstate(struct ieee80211vap *vap
                         */
                        ieee80211_create_ibss(vap,
                            ieee80211_ht_adjust_channel(ic,
-                               ic->ic_curchan, vap->iv_flags_ext));
+                               ic->ic_curchan, vap->iv_flags_ht));
                        /* NB: iv_bss is changed on return */
                        break;
                case IEEE80211_S_CAC:
@@ -1995,7 +1995,7 @@ hostap_recv_mgmt(struct ieee80211_node *
                                else if (isatherosoui(frm))
                                        ath = frm;
 #endif
-                               else if (vap->iv_flags_ext & 
IEEE80211_FEXT_HTCOMPAT) {
+                               else if (vap->iv_flags_ht & 
IEEE80211_FHT_HTCOMPAT) {
                                        if (ishtcapoui(frm) && htcap == NULL)
                                                htcap = frm;
                                }
@@ -2103,7 +2103,7 @@ hostap_recv_mgmt(struct ieee80211_node *
                /*
                 * If constrained to 11n-only stations reject legacy stations.
                 */
-               if ((vap->iv_flags_ext & IEEE80211_FEXT_PUREN) &&
+               if ((vap->iv_flags_ht & IEEE80211_FHT_PUREN) &&
                    (ni->ni_flags & IEEE80211_NODE_HT) == 0) {
                        htcapmismatch(ni, wh, reassoc, resp);
                        vap->iv_stats.is_ht_assoc_nohtcap++;

Modified: head/sys/net80211/ieee80211_ht.c
==============================================================================
--- head/sys/net80211/ieee80211_ht.c    Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_ht.c    Sun Jun  7 22:00:22 2009        
(r193655)
@@ -183,32 +183,32 @@ ieee80211_ht_vattach(struct ieee80211vap
                 * facilities by default.
                 * XXX these choices may be too aggressive.
                 */
-               vap->iv_flags_ext |= IEEE80211_FEXT_HT
-                                 |  IEEE80211_FEXT_HTCOMPAT
-                                 ;
+               vap->iv_flags_ht |= IEEE80211_FHT_HT
+                                |  IEEE80211_FHT_HTCOMPAT
+                                ;
                if (vap->iv_htcaps & IEEE80211_HTCAP_SHORTGI20)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_SHORTGI20;
+                       vap->iv_flags_ht |= IEEE80211_FHT_SHORTGI20;
                /* XXX infer from channel list? */
                if (vap->iv_htcaps & IEEE80211_HTCAP_CHWIDTH40) {
-                       vap->iv_flags_ext |= IEEE80211_FEXT_USEHT40;
+                       vap->iv_flags_ht |= IEEE80211_FHT_USEHT40;
                        if (vap->iv_htcaps & IEEE80211_HTCAP_SHORTGI40)
-                               vap->iv_flags_ext |= IEEE80211_FEXT_SHORTGI40;
+                               vap->iv_flags_ht |= IEEE80211_FHT_SHORTGI40;
                }
                /* enable RIFS if capable */
                if (vap->iv_htcaps & IEEE80211_HTC_RIFS)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_RIFS;
+                       vap->iv_flags_ht |= IEEE80211_FHT_RIFS;
 
                /* NB: A-MPDU and A-MSDU rx are mandated, these are tx only */
-               vap->iv_flags_ext |= IEEE80211_FEXT_AMPDU_RX;
+               vap->iv_flags_ht |= IEEE80211_FHT_AMPDU_RX;
                if (vap->iv_htcaps & IEEE80211_HTC_AMPDU)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_AMPDU_TX;
-               vap->iv_flags_ext |= IEEE80211_FEXT_AMSDU_RX;
+                       vap->iv_flags_ht |= IEEE80211_FHT_AMPDU_TX;
+               vap->iv_flags_ht |= IEEE80211_FHT_AMSDU_RX;
                if (vap->iv_htcaps & IEEE80211_HTC_AMSDU)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_AMSDU_TX;
+                       vap->iv_flags_ht |= IEEE80211_FHT_AMSDU_TX;
        }
        /* NB: disable default legacy WDS, too many issues right now */
        if (vap->iv_flags_ext & IEEE80211_FEXT_WDSLEGACY)
-               vap->iv_flags_ext &= ~IEEE80211_FEXT_HT;
+               vap->iv_flags_ht &= ~IEEE80211_FHT_HT;
 }
 
 void
@@ -921,9 +921,9 @@ ieee80211_ht_adjust_channel(struct ieee8
 {
        struct ieee80211_channel *c;
 
-       if (flags & IEEE80211_FEXT_HT) {
+       if (flags & IEEE80211_FHT_HT) {
                /* promote to HT if possible */
-               if (flags & IEEE80211_FEXT_USEHT40) {
+               if (flags & IEEE80211_FHT_USEHT40) {
                        if (!IEEE80211_IS_CHAN_HT40(chan)) {
                                /* NB: arbitrarily pick ht40+ over ht40- */
                                c = findhtchan(ic, chan, IEEE80211_CHAN_HT40U);
@@ -961,7 +961,7 @@ ieee80211_ht_wds_init(struct ieee80211_n
        struct ieee80211_tx_ampdu *tap;
        int ac;
 
-       KASSERT(vap->iv_flags_ext & IEEE80211_FEXT_HT, ("no HT requested"));
+       KASSERT(vap->iv_flags_ht & IEEE80211_FHT_HT, ("no HT requested"));
 
        /* XXX check scan cache in case peer has an ap and we have info */
        /*
@@ -974,7 +974,7 @@ ieee80211_ht_wds_init(struct ieee80211_n
            ni->ni_chan, ieee80211_htchanflags(ni->ni_chan));
 
        ni->ni_htcap = 0;
-       if (vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI20)
+       if (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20)
                ni->ni_htcap |= IEEE80211_HTCAP_SHORTGI20;
        if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) {
                ni->ni_htcap |= IEEE80211_HTCAP_CHWIDTH40;
@@ -983,14 +983,14 @@ ieee80211_ht_wds_init(struct ieee80211_n
                        ni->ni_ht2ndchan = IEEE80211_HTINFO_2NDCHAN_ABOVE;
                else if (IEEE80211_IS_CHAN_HT40D(ni->ni_chan))
                        ni->ni_ht2ndchan = IEEE80211_HTINFO_2NDCHAN_BELOW;
-               if (vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI40)
+               if (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40)
                        ni->ni_htcap |= IEEE80211_HTCAP_SHORTGI40;
        } else {
                ni->ni_chw = 20;
                ni->ni_ht2ndchan = IEEE80211_HTINFO_2NDCHAN_NONE;
        }
        ni->ni_htctlchan = ni->ni_chan->ic_ieee;
-       if (vap->iv_flags_ext & IEEE80211_FEXT_RIFS)
+       if (vap->iv_flags_ht & IEEE80211_FHT_RIFS)
                ni->ni_flags |= IEEE80211_NODE_RIFS;
        /* XXX does it make sense to enable SMPS? */
 
@@ -1001,7 +1001,7 @@ ieee80211_ht_wds_init(struct ieee80211_n
                tap = &ni->ni_tx_ampdu[ac];
                tap->txa_ac = ac;
        }
-       /* NB: AMPDU tx/rx governed by IEEE80211_FEXT_AMPDU_{TX,RX} */
+       /* NB: AMPDU tx/rx governed by IEEE80211_FHT_AMPDU_{TX,RX} */
        ni->ni_flags |= IEEE80211_NODE_HT | IEEE80211_NODE_AMPDU;
 }
 
@@ -1031,7 +1031,7 @@ htinfo_notify(struct ieee80211com *ic)
                            , ic->ic_sta_assoc
                            , ic->ic_ht_sta_assoc
                            , ic->ic_ht40_sta_assoc
-                           , (ic->ic_flags_ext & IEEE80211_FEXT_NONHT_PR) ?
+                           , (ic->ic_flags_ht & IEEE80211_FHT_NONHT_PR) ?
                                 ", non-HT sta present" : ""
                            , ic->ic_curhtprotmode);
                        first = 0;
@@ -1052,7 +1052,7 @@ htinfo_update(struct ieee80211com *ic)
        if (ic->ic_sta_assoc != ic->ic_ht_sta_assoc) {
                protmode = IEEE80211_HTINFO_OPMODE_MIXED
                         | IEEE80211_HTINFO_NONHT_PRESENT;
-       } else if (ic->ic_flags_ext & IEEE80211_FEXT_NONHT_PR) {
+       } else if (ic->ic_flags_ht & IEEE80211_FHT_NONHT_PR) {
                protmode = IEEE80211_HTINFO_OPMODE_PROTOPT
                         | IEEE80211_HTINFO_NONHT_PRESENT;
        } else if (ic->ic_bsschan != IEEE80211_CHAN_ANYC &&
@@ -1125,7 +1125,7 @@ ieee80211_htprot_update(struct ieee80211
        /* track non-HT station presence */
        KASSERT(protmode & IEEE80211_HTINFO_NONHT_PRESENT,
            ("protmode 0x%x", protmode));
-       ic->ic_flags_ext |= IEEE80211_FEXT_NONHT_PR;
+       ic->ic_flags_ht |= IEEE80211_FHT_NONHT_PR;
        ic->ic_lastnonht = ticks;
 
        if (protmode != ic->ic_curhtprotmode &&
@@ -1152,13 +1152,13 @@ ieee80211_ht_timeout(struct ieee80211com
 {
        IEEE80211_LOCK_ASSERT(ic);
 
-       if ((ic->ic_flags_ext & IEEE80211_FEXT_NONHT_PR) &&
+       if ((ic->ic_flags_ht & IEEE80211_FHT_NONHT_PR) &&
            time_after(ticks, ic->ic_lastnonht + IEEE80211_NONHT_PRESENT_AGE)) {
 #if 0
                IEEE80211_NOTE(vap, IEEE80211_MSG_11N, ni,
                    "%s", "time out non-HT STA present on channel");
 #endif
-               ic->ic_flags_ext &= ~IEEE80211_FEXT_NONHT_PR;
+               ic->ic_flags_ht &= ~IEEE80211_FHT_NONHT_PR;
                htinfo_update(ic);
        }
 }
@@ -1303,10 +1303,10 @@ htcap_update_shortgi(struct ieee80211_no
 
        ni->ni_flags &= ~(IEEE80211_NODE_SGI20|IEEE80211_NODE_SGI40);
        if ((ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20) &&
-           (vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI20))
+           (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20))
                ni->ni_flags |= IEEE80211_NODE_SGI20;
        if ((ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) &&
-           (vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI40))
+           (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40))
                ni->ni_flags |= IEEE80211_NODE_SGI40;
 }
 
@@ -1332,11 +1332,11 @@ ieee80211_ht_updateparams(struct ieee802
        htinfo = (const struct ieee80211_ie_htinfo *) htinfoie;
        htinfo_parse(ni, htinfo);
 
-       htflags = (vap->iv_flags_ext & IEEE80211_FEXT_HT) ?
+       htflags = (vap->iv_flags_ht & IEEE80211_FHT_HT) ?
            IEEE80211_CHAN_HT20 : 0;
        /* NB: honor operating mode constraint */
        if ((htinfo->hi_byte1 & IEEE80211_HTINFO_TXWIDTH_2040) &&
-           (vap->iv_flags_ext & IEEE80211_FEXT_USEHT40)) {
+           (vap->iv_flags_ht & IEEE80211_FHT_USEHT40)) {
                if (ni->ni_ht2ndchan == IEEE80211_HTINFO_2NDCHAN_ABOVE)
                        htflags = IEEE80211_CHAN_HT40U;
                else if (ni->ni_ht2ndchan == IEEE80211_HTINFO_2NDCHAN_BELOW)
@@ -1345,7 +1345,7 @@ ieee80211_ht_updateparams(struct ieee802
        htinfo_update_chw(ni, htflags);
 
        if ((htinfo->hi_byte1 & IEEE80211_HTINFO_RIFSMODE_PERM) &&
-           (vap->iv_flags_ext & IEEE80211_FEXT_RIFS))
+           (vap->iv_flags_ht & IEEE80211_FHT_RIFS))
                ni->ni_flags |= IEEE80211_NODE_RIFS;
        else
                ni->ni_flags &= ~IEEE80211_NODE_RIFS;
@@ -1368,10 +1368,10 @@ ieee80211_ht_updatehtcap(struct ieee8021
 
        /* NB: honor operating mode constraint */
        /* XXX 40 MHZ intolerant */
-       htflags = (vap->iv_flags_ext & IEEE80211_FEXT_HT) ?
+       htflags = (vap->iv_flags_ht & IEEE80211_FHT_HT) ?
            IEEE80211_CHAN_HT20 : 0;
        if ((ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) &&
-           (vap->iv_flags_ext & IEEE80211_FEXT_USEHT40)) {
+           (vap->iv_flags_ht & IEEE80211_FHT_USEHT40)) {
                if (IEEE80211_IS_CHAN_HT40U(vap->iv_bss->ni_chan))
                        htflags = IEEE80211_CHAN_HT40U;
                else if (IEEE80211_IS_CHAN_HT40D(vap->iv_bss->ni_chan))
@@ -1627,7 +1627,7 @@ ieee80211_aggr_recv_action(struct ieee80
                         * violates the 11n spec and is mostly for testing).
                         */
                        if ((ni->ni_flags & IEEE80211_NODE_AMPDU_RX) &&
-                           (vap->iv_flags_ext & IEEE80211_FEXT_AMPDU_RX)) {
+                           (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_RX)) {
                                /* XXX handle ampdu_rx_start failure */
                                ic->ic_ampdu_rx_start(ni, rap,
                                    baparamset, batimeout, baseqctl);
@@ -2298,7 +2298,7 @@ ieee80211_add_htcap_body(uint8_t *frm, s
         */
        if (vap->iv_opmode == IEEE80211_M_STA) {
                /* override 20/40 use based on config */
-               if (vap->iv_flags_ext & IEEE80211_FEXT_USEHT40)
+               if (vap->iv_flags_ht & IEEE80211_FHT_USEHT40)
                        caps |= IEEE80211_HTCAP_CHWIDTH40;
                else
                        caps &= ~IEEE80211_HTCAP_CHWIDTH40;
@@ -2315,9 +2315,9 @@ ieee80211_add_htcap_body(uint8_t *frm, s
                density = vap->iv_ampdu_density;
        }
        /* adjust short GI based on channel and config */
-       if ((vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI20) == 0)
+       if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) == 0)
                caps &= ~IEEE80211_HTCAP_SHORTGI20;
-       if ((vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI40) == 0 ||
+       if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40) == 0 ||
            (caps & IEEE80211_HTCAP_CHWIDTH40) == 0)
                caps &= ~IEEE80211_HTCAP_SHORTGI40;
        ADDSHORT(frm, caps);
@@ -2408,7 +2408,7 @@ ieee80211_ht_update_beacon(struct ieee80
 
        /* XXX only update on channel change */
        ht->hi_ctrlchannel = ieee80211_chan2ieee(ic, bsschan);
-       if (vap->iv_flags_ext & IEEE80211_FEXT_RIFS)
+       if (vap->iv_flags_ht & IEEE80211_FHT_RIFS)
                ht->hi_byte1 = IEEE80211_HTINFO_RIFSMODE_PERM;
        else
                ht->hi_byte1 = IEEE80211_HTINFO_RIFSMODE_PROH;
@@ -2447,7 +2447,7 @@ ieee80211_add_htinfo_body(uint8_t *frm, 
        /* primary/control channel center */
        *frm++ = ieee80211_chan2ieee(ic, ni->ni_chan);
 
-       if (vap->iv_flags_ext & IEEE80211_FEXT_RIFS)
+       if (vap->iv_flags_ht & IEEE80211_FHT_RIFS)
                frm[0] = IEEE80211_HTINFO_RIFSMODE_PERM;
        else
                frm[0] = IEEE80211_HTINFO_RIFSMODE_PROH;

Modified: head/sys/net80211/ieee80211_input.c
==============================================================================
--- head/sys/net80211/ieee80211_input.c Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_input.c Sun Jun  7 22:00:22 2009        
(r193655)
@@ -572,7 +572,7 @@ ieee80211_parse_beacon(struct ieee80211_
                        else if (istdmaoui(frm))
                                scan->tdma = frm;
 #endif
-                       else if (vap->iv_flags_ext & IEEE80211_FEXT_HTCOMPAT) {
+                       else if (vap->iv_flags_ht & IEEE80211_FHT_HTCOMPAT) {
                                /*
                                 * Accept pre-draft HT ie's if the
                                 * standard ones have not been seen.

Modified: head/sys/net80211/ieee80211_ioctl.c
==============================================================================
--- head/sys/net80211/ieee80211_ioctl.c Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_ioctl.c Sun Jun  7 22:00:22 2009        
(r193655)
@@ -990,16 +990,16 @@ ieee80211_ioctl_get80211(struct ieee8021
                break;
        case IEEE80211_IOC_SHORTGI:
                ireq->i_val = 0;
-               if (vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI20)
+               if (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20)
                        ireq->i_val |= IEEE80211_HTCAP_SHORTGI20;
-               if (vap->iv_flags_ext & IEEE80211_FEXT_SHORTGI40)
+               if (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40)
                        ireq->i_val |= IEEE80211_HTCAP_SHORTGI40;
                break;
        case IEEE80211_IOC_AMPDU:
                ireq->i_val = 0;
-               if (vap->iv_flags_ext & IEEE80211_FEXT_AMPDU_TX)
+               if (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX)
                        ireq->i_val |= 1;
-               if (vap->iv_flags_ext & IEEE80211_FEXT_AMPDU_RX)
+               if (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_RX)
                        ireq->i_val |= 2;
                break;
        case IEEE80211_IOC_AMPDU_LIMIT:
@@ -1021,16 +1021,16 @@ ieee80211_ioctl_get80211(struct ieee8021
                break;
        case IEEE80211_IOC_AMSDU:
                ireq->i_val = 0;
-               if (vap->iv_flags_ext & IEEE80211_FEXT_AMSDU_TX)
+               if (vap->iv_flags_ht & IEEE80211_FHT_AMSDU_TX)
                        ireq->i_val |= 1;
-               if (vap->iv_flags_ext & IEEE80211_FEXT_AMSDU_RX)
+               if (vap->iv_flags_ht & IEEE80211_FHT_AMSDU_RX)
                        ireq->i_val |= 2;
                break;
        case IEEE80211_IOC_AMSDU_LIMIT:
                ireq->i_val = vap->iv_amsdu_limit;      /* XXX truncation? */
                break;
        case IEEE80211_IOC_PUREN:
-               ireq->i_val = (vap->iv_flags_ext & IEEE80211_FEXT_PUREN) != 0;
+               ireq->i_val = (vap->iv_flags_ht & IEEE80211_FHT_PUREN) != 0;
                break;
        case IEEE80211_IOC_DOTH:
                ireq->i_val = (vap->iv_flags & IEEE80211_F_DOTH) != 0;
@@ -1045,7 +1045,7 @@ ieee80211_ioctl_get80211(struct ieee8021
                error = ieee80211_ioctl_gettxparams(vap, ireq);
                break;
        case IEEE80211_IOC_HTCOMPAT:
-               ireq->i_val = (vap->iv_flags_ext & IEEE80211_FEXT_HTCOMPAT) != 
0;
+               ireq->i_val = (vap->iv_flags_ht & IEEE80211_FHT_HTCOMPAT) != 0;
                break;
        case IEEE80211_IOC_DWDS:
                ireq->i_val = (vap->iv_flags & IEEE80211_F_DWDS) != 0;
@@ -1075,9 +1075,9 @@ ieee80211_ioctl_get80211(struct ieee8021
                ireq->i_val = ic->ic_htprotmode;
                break;
        case IEEE80211_IOC_HTCONF:
-               if (vap->iv_flags_ext & IEEE80211_FEXT_HT) {
+               if (vap->iv_flags_ht & IEEE80211_FHT_HT) {
                        ireq->i_val = 1;
-                       if (vap->iv_flags_ext & IEEE80211_FEXT_USEHT40)
+                       if (vap->iv_flags_ht & IEEE80211_FHT_USEHT40)
                                ireq->i_val |= 2;
                } else
                        ireq->i_val = 0;
@@ -1104,7 +1104,7 @@ ieee80211_ioctl_get80211(struct ieee8021
                            (vap->iv_bss->ni_flags & IEEE80211_NODE_RIFS) != 0;
                else
                        ireq->i_val =
-                           (vap->iv_flags_ext & IEEE80211_FEXT_RIFS) != 0;
+                           (vap->iv_flags_ht & IEEE80211_FHT_RIFS) != 0;
                break;
        default:
                error = ieee80211_ioctl_getdefault(vap, ireq);
@@ -2815,13 +2815,13 @@ ieee80211_ioctl_set80211(struct ieee8021
                break;
        case IEEE80211_IOC_HTCONF:
                if (ireq->i_val & 1)
-                       ieee80211_syncflag_ext(vap, IEEE80211_FEXT_HT);
+                       ieee80211_syncflag_ht(vap, IEEE80211_FHT_HT);
                else
-                       ieee80211_syncflag_ext(vap, -IEEE80211_FEXT_HT);
+                       ieee80211_syncflag_ht(vap, -IEEE80211_FHT_HT);
                if (ireq->i_val & 2)
-                       ieee80211_syncflag_ext(vap, IEEE80211_FEXT_USEHT40);
+                       ieee80211_syncflag_ht(vap, IEEE80211_FHT_USEHT40);
                else
-                       ieee80211_syncflag_ext(vap, -IEEE80211_FEXT_USEHT40);
+                       ieee80211_syncflag_ht(vap, -IEEE80211_FHT_USEHT40);
                error = ENETRESET;
                break;
        case IEEE80211_IOC_ADDMAC:
@@ -2938,26 +2938,26 @@ ieee80211_ioctl_set80211(struct ieee8021
                        if (((ireq->i_val ^ vap->iv_htcaps) & 
IEEE80211_HTCAP_SHORTGI) != 0)
                                return EINVAL;
                        if (ireq->i_val & IEEE80211_HTCAP_SHORTGI20)
-                               vap->iv_flags_ext |= IEEE80211_FEXT_SHORTGI20;
+                               vap->iv_flags_ht |= IEEE80211_FHT_SHORTGI20;
                        if (ireq->i_val & IEEE80211_HTCAP_SHORTGI40)
-                               vap->iv_flags_ext |= IEEE80211_FEXT_SHORTGI40;
+                               vap->iv_flags_ht |= IEEE80211_FHT_SHORTGI40;
 #undef IEEE80211_HTCAP_SHORTGI
                } else
-                       vap->iv_flags_ext &=
-                           ~(IEEE80211_FEXT_SHORTGI20 | 
IEEE80211_FEXT_SHORTGI40);
+                       vap->iv_flags_ht &=
+                           ~(IEEE80211_FHT_SHORTGI20 | 
IEEE80211_FHT_SHORTGI40);
                error = ERESTART;
                break;
        case IEEE80211_IOC_AMPDU:
                if (ireq->i_val && (vap->iv_htcaps & IEEE80211_HTC_AMPDU) == 0)
                        return EINVAL;
                if (ireq->i_val & 1)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_AMPDU_TX;
+                       vap->iv_flags_ht |= IEEE80211_FHT_AMPDU_TX;
                else
-                       vap->iv_flags_ext &= ~IEEE80211_FEXT_AMPDU_TX;
+                       vap->iv_flags_ht &= ~IEEE80211_FHT_AMPDU_TX;
                if (ireq->i_val & 2)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_AMPDU_RX;
+                       vap->iv_flags_ht |= IEEE80211_FHT_AMPDU_RX;
                else
-                       vap->iv_flags_ext &= ~IEEE80211_FEXT_AMPDU_RX;
+                       vap->iv_flags_ht &= ~IEEE80211_FHT_AMPDU_RX;
                /* NB: reset only if we're operating on an 11n channel */
                if (isvapht(vap))
                        error = ERESTART;
@@ -2983,13 +2983,13 @@ ieee80211_ioctl_set80211(struct ieee8021
                if (ireq->i_val && (vap->iv_htcaps & IEEE80211_HTC_AMSDU) == 0)
                        return EINVAL;
                if (ireq->i_val & 1)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_AMSDU_TX;
+                       vap->iv_flags_ht |= IEEE80211_FHT_AMSDU_TX;
                else
-                       vap->iv_flags_ext &= ~IEEE80211_FEXT_AMSDU_TX;
+                       vap->iv_flags_ht &= ~IEEE80211_FHT_AMSDU_TX;
                if (ireq->i_val & 2)
-                       vap->iv_flags_ext |= IEEE80211_FEXT_AMSDU_RX;
+                       vap->iv_flags_ht |= IEEE80211_FHT_AMSDU_RX;
                else
-                       vap->iv_flags_ext &= ~IEEE80211_FEXT_AMSDU_RX;
+                       vap->iv_flags_ht &= ~IEEE80211_FHT_AMSDU_RX;
                /* NB: reset only if we're operating on an 11n channel */
                if (isvapht(vap))
                        error = ERESTART;
@@ -3000,11 +3000,11 @@ ieee80211_ioctl_set80211(struct ieee8021
                break;
        case IEEE80211_IOC_PUREN:
                if (ireq->i_val) {
-                       if ((vap->iv_flags_ext & IEEE80211_FEXT_HT) == 0)
+                       if ((vap->iv_flags_ht & IEEE80211_FHT_HT) == 0)
                                return EINVAL;
-                       vap->iv_flags_ext |= IEEE80211_FEXT_PUREN;
+                       vap->iv_flags_ht |= IEEE80211_FHT_PUREN;
                } else
-                       vap->iv_flags_ext &= ~IEEE80211_FEXT_PUREN;
+                       vap->iv_flags_ht &= ~IEEE80211_FHT_PUREN;
                /* NB: reset only if we're operating on an 11n channel */
                if (isvapht(vap))
                        error = ERESTART;
@@ -3032,11 +3032,11 @@ ieee80211_ioctl_set80211(struct ieee8021
                break;
        case IEEE80211_IOC_HTCOMPAT:
                if (ireq->i_val) {
-                       if ((vap->iv_flags_ext & IEEE80211_FEXT_HT) == 0)
+                       if ((vap->iv_flags_ht & IEEE80211_FHT_HT) == 0)
                                return EOPNOTSUPP;
-                       vap->iv_flags_ext |= IEEE80211_FEXT_HTCOMPAT;
+                       vap->iv_flags_ht |= IEEE80211_FHT_HTCOMPAT;
                } else
-                       vap->iv_flags_ext &= ~IEEE80211_FEXT_HTCOMPAT;
+                       vap->iv_flags_ht &= ~IEEE80211_FHT_HTCOMPAT;
                /* NB: reset only if we're operating on an 11n channel */
                if (isvapht(vap))
                        error = ERESTART;
@@ -3135,9 +3135,9 @@ ieee80211_ioctl_set80211(struct ieee8021
                if (ireq->i_val != 0) {
                        if ((vap->iv_htcaps & IEEE80211_HTC_RIFS) == 0)
                                return EOPNOTSUPP;
-                       vap->iv_flags_ext |= IEEE80211_FEXT_RIFS;
+                       vap->iv_flags_ht |= IEEE80211_FHT_RIFS;
                } else
-                       vap->iv_flags_ext &= ~IEEE80211_FEXT_RIFS;
+                       vap->iv_flags_ht &= ~IEEE80211_FHT_RIFS;
                /* NB: if not operating in 11n this can wait */
                if (isvapht(vap))
                        error = ERESTART;

Modified: head/sys/net80211/ieee80211_node.c
==============================================================================
--- head/sys/net80211/ieee80211_node.c  Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_node.c  Sun Jun  7 22:00:22 2009        
(r193655)
@@ -287,10 +287,10 @@ ieee80211_node_set_chan(struct ieee80211
                 * and non-ERP rates in 11g for mixed ERP+non-ERP bss.
                 */
                if (mode == IEEE80211_MODE_11NA &&
-                   (vap->iv_flags_ext & IEEE80211_FEXT_PUREN) == 0)
+                   (vap->iv_flags_ht & IEEE80211_FHT_PUREN) == 0)
                        mode = IEEE80211_MODE_11A;
                else if (mode == IEEE80211_MODE_11NG &&
-                   (vap->iv_flags_ext & IEEE80211_FEXT_PUREN) == 0)
+                   (vap->iv_flags_ht & IEEE80211_FHT_PUREN) == 0)
                        mode = IEEE80211_MODE_11G;
                if (mode == IEEE80211_MODE_11G &&
                    (vap->iv_flags & IEEE80211_F_PUREG) == 0)
@@ -650,7 +650,7 @@ ieee80211_setupcurchan(struct ieee80211c
                 * set of running vap's.  This assumes we are called
                 * after ni_chan is setup for each vap.
                 */
-               /* NB: this assumes IEEE80211_FEXT_USEHT40 > IEEE80211_FEXT_HT 
*/
+               /* NB: this assumes IEEE80211_FHT_USEHT40 > IEEE80211_FHT_HT */
                if (flags > ieee80211_htchanflags(c))
                        c = ieee80211_ht_adjust_channel(ic, c, flags);
        }
@@ -1204,7 +1204,7 @@ ieee80211_node_create_wds(struct ieee802
                        ni->ni_flags |= IEEE80211_NODE_FF;
 #endif
                if ((ic->ic_htcaps & IEEE80211_HTC_HT) &&
-                   (vap->iv_flags_ext & IEEE80211_FEXT_HT)) {
+                   (vap->iv_flags_ht & IEEE80211_FHT_HT)) {
                        /*
                         * Device is HT-capable and HT is enabled for
                         * the vap; setup HT operation.  On return

Modified: head/sys/net80211/ieee80211_output.c
==============================================================================
--- head/sys/net80211/ieee80211_output.c        Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_output.c        Sun Jun  7 22:00:22 2009        
(r193655)
@@ -266,7 +266,7 @@ ieee80211_start(struct ifnet *ifp)
                 * otherwise unable to establish a BA stream.
                 */
                if ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) &&
-                   (vap->iv_flags_ext & IEEE80211_FEXT_AMPDU_TX) &&
+                   (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX) &&
                    (m->m_flags & M_EAPOL) == 0) {
                        const int ac = M_WME_GETAC(m);
                        struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[ac];
@@ -1853,7 +1853,7 @@ ieee80211_send_mgmt(struct ieee80211_nod
                            ic->ic_curchan);
                        frm = ieee80211_add_supportedchannels(frm, ic);
                }
-               if ((vap->iv_flags_ext & IEEE80211_FEXT_HT) &&
+               if ((vap->iv_flags_ht & IEEE80211_FHT_HT) &&
                    ni->ni_ies.htcap_ie != NULL &&
                    ni->ni_ies.htcap_ie[0] == IEEE80211_ELEMID_HTCAP)
                        frm = ieee80211_add_htcap(frm, ni);
@@ -1865,7 +1865,7 @@ ieee80211_send_mgmt(struct ieee80211_nod
                if ((ic->ic_flags & IEEE80211_F_WME) &&
                    ni->ni_ies.wme_ie != NULL)
                        frm = ieee80211_add_wme_info(frm, &ic->ic_wme);
-               if ((vap->iv_flags_ext & IEEE80211_FEXT_HT) &&
+               if ((vap->iv_flags_ht & IEEE80211_FHT_HT) &&
                    ni->ni_ies.htcap_ie != NULL &&
                    ni->ni_ies.htcap_ie[0] == IEEE80211_ELEMID_VENDOR)
                        frm = ieee80211_add_htcap_vendor(frm, ni);
@@ -2138,7 +2138,7 @@ ieee80211_alloc_proberesp(struct ieee802
        if (vap->iv_flags & IEEE80211_F_WME)
                frm = ieee80211_add_wme_param(frm, &ic->ic_wme);
        if (IEEE80211_IS_CHAN_HT(bss->ni_chan) &&
-           (vap->iv_flags_ext & IEEE80211_FEXT_HTCOMPAT) &&
+           (vap->iv_flags_ht & IEEE80211_FHT_HTCOMPAT) &&
            legacy != IEEE80211_SEND_LEGACY_11B) {
                frm = ieee80211_add_htcap_vendor(frm, bss);
                frm = ieee80211_add_htinfo_vendor(frm, bss);
@@ -2427,7 +2427,7 @@ ieee80211_beacon_construct(struct mbuf *
                frm = ieee80211_add_wme_param(frm, &ic->ic_wme);
        }
        if (IEEE80211_IS_CHAN_HT(ni->ni_chan) &&
-           (vap->iv_flags_ext & IEEE80211_FEXT_HTCOMPAT)) {
+           (vap->iv_flags_ht & IEEE80211_FHT_HTCOMPAT)) {
                frm = ieee80211_add_htcap_vendor(frm, ni);
                frm = ieee80211_add_htinfo_vendor(frm, ni);
        }

Modified: head/sys/net80211/ieee80211_proto.h
==============================================================================
--- head/sys/net80211/ieee80211_proto.h Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_proto.h Sun Jun  7 22:00:22 2009        
(r193655)
@@ -58,6 +58,7 @@ void  ieee80211_proto_vdetach(struct ieee
 
 void   ieee80211_syncifflag_locked(struct ieee80211com *, int flag);
 void   ieee80211_syncflag(struct ieee80211vap *, int flag);
+void   ieee80211_syncflag_ht(struct ieee80211vap *, int flag);
 void   ieee80211_syncflag_ext(struct ieee80211vap *, int flag);
 
 #define        ieee80211_input(ni, m, rssi, nf) \

Modified: head/sys/net80211/ieee80211_scan_sta.c
==============================================================================
--- head/sys/net80211/ieee80211_scan_sta.c      Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_scan_sta.c      Sun Jun  7 22:00:22 2009        
(r193655)
@@ -1561,7 +1561,7 @@ notfound:
                                chan = adhoc_pick_channel(ss, 0);
                                if (chan != NULL)
                                        chan = ieee80211_ht_adjust_channel(ic,
-                                           chan, vap->iv_flags_ext);
+                                           chan, vap->iv_flags_ht);
                        } else
                                chan = vap->iv_des_chan;
                        if (chan != NULL) {
@@ -1761,7 +1761,7 @@ ap_end(struct ieee80211_scan_state *ss, 
                return 1;
        }
        ieee80211_create_ibss(vap,
-           ieee80211_ht_adjust_channel(ic, bestchan, vap->iv_flags_ext));
+           ieee80211_ht_adjust_channel(ic, bestchan, vap->iv_flags_ht));
        return 1;
 }
 

Modified: head/sys/net80211/ieee80211_sta.c
==============================================================================
--- head/sys/net80211/ieee80211_sta.c   Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_sta.c   Sun Jun  7 22:00:22 2009        
(r193655)
@@ -1342,7 +1342,7 @@ sta_recv_mgmt(struct ieee80211_node *ni,
                                ieee80211_parse_athparams(ni, scan.ath, wh);
 #endif
                        if (scan.htcap != NULL && scan.htinfo != NULL &&
-                           (vap->iv_flags_ext & IEEE80211_FEXT_HT)) {
+                           (vap->iv_flags_ht & IEEE80211_FHT_HT)) {
                                ieee80211_ht_updateparams(ni,
                                    scan.htcap, scan.htinfo);
                                /* XXX state changes? */
@@ -1532,7 +1532,7 @@ sta_recv_mgmt(struct ieee80211_node *ni,
                        case IEEE80211_ELEMID_VENDOR:
                                if (iswmeoui(frm))
                                        wme = frm;
-                               else if (vap->iv_flags_ext & 
IEEE80211_FEXT_HTCOMPAT) {
+                               else if (vap->iv_flags_ht & 
IEEE80211_FHT_HTCOMPAT) {
                                        /*
                                         * Accept pre-draft HT ie's if the
                                         * standard ones have not been seen.
@@ -1588,7 +1588,7 @@ sta_recv_mgmt(struct ieee80211_node *ni,
                 *     are HT capable in our AssocReq.
                 */
                if (htcap != NULL && htinfo != NULL &&
-                   (vap->iv_flags_ext & IEEE80211_FEXT_HT)) {
+                   (vap->iv_flags_ht & IEEE80211_FHT_HT)) {
                        ieee80211_ht_node_init(ni);
                        ieee80211_ht_updateparams(ni, htcap, htinfo);
                        ieee80211_setup_htrates(ni, htcap,

Modified: head/sys/net80211/ieee80211_var.h
==============================================================================
--- head/sys/net80211/ieee80211_var.h   Sun Jun  7 21:50:42 2009        
(r193654)
+++ head/sys/net80211/ieee80211_var.h   Sun Jun  7 22:00:22 2009        
(r193655)
@@ -131,6 +131,7 @@ struct ieee80211com {
 
        uint32_t                ic_flags;       /* state flags */
        uint32_t                ic_flags_ext;   /* extended state flags */
+       uint32_t                ic_flags_ht;    /* HT state flags */
        uint32_t                ic_flags_ven;   /* vendor state flags */
        uint32_t                ic_caps;        /* capabilities */
        uint32_t                ic_htcaps;      /* HT capabilities */
@@ -329,6 +330,7 @@ struct ieee80211vap {
        uint8_t                 iv_myaddr[IEEE80211_ADDR_LEN];
        uint32_t                iv_flags;       /* state flags */
        uint32_t                iv_flags_ext;   /* extended state flags */
+       uint32_t                iv_flags_ht;    /* HT state flags */
        uint32_t                iv_flags_ven;   /* vendor state flags */
        uint32_t                iv_caps;        /* capabilities */
        uint32_t                iv_htcaps;      /* HT capabilities */
@@ -516,7 +518,6 @@ MALLOC_DECLARE(M_80211_VAP);
        ((vap)->iv_flags & (ni)->ni_ath_flags & (bit))
 
 /* ic_flags_ext/iv_flags_ext */
-#define        IEEE80211_FEXT_NONHT_PR  0x00000001     /* STATUS: non-HT sta 
present */
 #define        IEEE80211_FEXT_INACT     0x00000002     /* CONF: sta inact 
handling */
 #define        IEEE80211_FEXT_SCANWAIT  0x00000004     /* STATUS: awaiting 
scan */
 /* 0x00000006 reserved */
@@ -536,25 +537,32 @@ MALLOC_DECLARE(M_80211_VAP);
 /* NB: immutable: should be set only when creating a vap */
 #define        IEEE80211_FEXT_WDSLEGACY 0x00010000     /* CONF: legacy WDS 
operation */
 #define        IEEE80211_FEXT_PROBECHAN 0x00020000     /* CONF: probe passive 
channel*/
-#define        IEEE80211_FEXT_GF        0x00040000     /* CONF: Greenfield 
enabled */
-#define        IEEE80211_FEXT_HT        0x00080000     /* CONF: HT supported */
-#define        IEEE80211_FEXT_AMPDU_TX  0x00100000     /* CONF: A-MPDU tx 
supported */
-#define        IEEE80211_FEXT_AMPDU_RX  0x00200000     /* CONF: A-MPDU rx 
supported */
-#define        IEEE80211_FEXT_AMSDU_TX  0x00400000     /* CONF: A-MSDU tx 
supported */
-#define        IEEE80211_FEXT_AMSDU_RX  0x00800000     /* CONF: A-MSDU rx 
supported */
-#define        IEEE80211_FEXT_USEHT40   0x01000000     /* CONF: 20/40 use 
enabled */
-#define        IEEE80211_FEXT_PUREN     0x02000000     /* CONF: 11n w/o legacy 
sta's */
-#define        IEEE80211_FEXT_SHORTGI20 0x04000000     /* CONF: short GI in 
HT20 */
-#define        IEEE80211_FEXT_SHORTGI40 0x08000000     /* CONF: short GI in 
HT40 */
-#define        IEEE80211_FEXT_HTCOMPAT  0x10000000     /* CONF: HT vendor 
OUI's */
-#define        IEEE80211_FEXT_RIFS      0x20000000     /* CONF: RIFS enabled */
-#define        IEEE80211_FEXT_STBC_TX   0x40000000     /* CONF: STBC tx 
enabled */
-#define        IEEE80211_FEXT_STBC_RX   0x80000000     /* CONF: STBC rx 
enabled */
 
 #define        IEEE80211_FEXT_BITS \
-       "\20\1NONHT_PR\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \
+       "\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \
        "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \
-       "\20BPF\21WDSLEGACY\22PROBECHAN\23GF\24HT\25AMDPU_TX\26AMPDU_TX" \
+       "\20BPF\21WDSLEGACY\22PROBECHAN"
+
+/* ic_flags_ht/iv_flags_ht */
+#define        IEEE80211_FHT_NONHT_PR   0x00000001     /* STATUS: non-HT sta 
present */
+#define        IEEE80211_FHT_GF         0x00040000     /* CONF: Greenfield 
enabled */
+#define        IEEE80211_FHT_HT         0x00080000     /* CONF: HT supported */
+#define        IEEE80211_FHT_AMPDU_TX   0x00100000     /* CONF: A-MPDU tx 
supported */
+#define        IEEE80211_FHT_AMPDU_RX   0x00200000     /* CONF: A-MPDU rx 
supported */
+#define        IEEE80211_FHT_AMSDU_TX   0x00400000     /* CONF: A-MSDU tx 
supported */
+#define        IEEE80211_FHT_AMSDU_RX   0x00800000     /* CONF: A-MSDU rx 
supported */
+#define        IEEE80211_FHT_USEHT40    0x01000000     /* CONF: 20/40 use 
enabled */
+#define        IEEE80211_FHT_PUREN      0x02000000     /* CONF: 11n w/o legacy 
sta's */
+#define        IEEE80211_FHT_SHORTGI20  0x04000000     /* CONF: short GI in 
HT20 */
+#define        IEEE80211_FHT_SHORTGI40  0x08000000     /* CONF: short GI in 
HT40 */
+#define        IEEE80211_FHT_HTCOMPAT   0x10000000     /* CONF: HT vendor 
OUI's */
+#define        IEEE80211_FHT_RIFS       0x20000000     /* CONF: RIFS enabled */
+#define        IEEE80211_FHT_STBC_TX    0x40000000     /* CONF: STBC tx 
enabled */
+#define        IEEE80211_FHT_STBC_RX    0x80000000     /* CONF: STBC rx 
enabled */
+
+#define        IEEE80211_FHT_BITS \
+       "\20\1NONHT_PR" \
+       "\23GF\24HT\25AMDPU_TX\26AMPDU_TX" \
        "\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN\33SHORTGI20\34SHORTGI40" \
        "\35HTCOMPAT\36RIFS\37STBC_TX\40STBC_RX"
 
@@ -751,14 +759,14 @@ ieee80211_beacon_notify(struct ieee80211
 
 /*
  * Calculate HT channel promotion flags for a channel.
- * XXX belongs in ieee80211_ht.h but needs IEEE80211_FEXT_*
+ * XXX belongs in ieee80211_ht.h but needs IEEE80211_FHT_*
  */
 static __inline int
 ieee80211_htchanflags(const struct ieee80211_channel *c)
 {
        return IEEE80211_IS_CHAN_HT40(c) ?
-           IEEE80211_FEXT_HT | IEEE80211_FEXT_USEHT40 :
-           IEEE80211_IS_CHAN_HT(c) ?  IEEE80211_FEXT_HT : 0;
+           IEEE80211_FHT_HT | IEEE80211_FHT_USEHT40 :
+           IEEE80211_IS_CHAN_HT(c) ?  IEEE80211_FHT_HT : 0;
 }
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to