PERFORCE change 151524 for review
Sam Leffler
sam at FreeBSD.org
Sat Oct 18 23:15:59 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=151524
Change 151524 by sam at sam_ebb on 2008/10/18 23:15:52
remove driver-private txparms tracking, net80211 does
this for us now
Affected files ...
.. //depot/projects/vap/sys/dev/mwl/if_mwl.c#18 edit
.. //depot/projects/vap/sys/dev/mwl/if_mwlvar.h#3 edit
Differences ...
==== //depot/projects/vap/sys/dev/mwl/if_mwl.c#18 (text+ko) ====
@@ -1068,31 +1068,20 @@
{
struct mwl_vap *mvp = MWL_VAP(vap);
struct ieee80211_node *ni = vap->iv_bss;
- enum ieee80211_phymode mode;
+ const struct ieee80211_txparam *tp = ni->ni_txparms;
MWL_HAL_TXRATE rates;
KASSERT(vap->iv_state == IEEE80211_S_RUN, ("state %d", vap->iv_state));
- mode = ieee80211_chan2mode(ni->ni_chan);
/*
- * Use legacy rates when operating a mixed HT+non-HT bss.
- * NB: this may violate POLA for sta and wds vap's.
- */
- if (mode == IEEE80211_MODE_11NA &&
- (vap->iv_flags_ext & IEEE80211_FEXT_PUREN) == 0)
- mode = IEEE80211_MODE_11A;
- else if (mode == IEEE80211_MODE_11NG &&
- (vap->iv_flags_ext & IEEE80211_FEXT_PUREN) == 0)
- mode = IEEE80211_MODE_11G;
- /*
* Update the h/w rate map.
* NB: 0x80 for MCS is passed through unchanged
*/
memset(&rates, 0, sizeof(rates));
/* rate used to send management frames */
- rates.MgtRate = vap->iv_txparms[mode].mgmtrate;
+ rates.MgtRate = tp->mgmtrate;
/* rate used to send multicast frames */
- rates.McastRate = vap->iv_txparms[mode].mcastrate;
+ rates.McastRate = tp->mcastrate;
/* while here calculate EAPOL fixed rate cookie */
mvp->mv_eapolformat = htole16(mwl_calcformat(rates.MgtRate, ni));
@@ -2663,8 +2652,6 @@
/* XXX stat+msg */
return NULL;
}
- /* XXX setup initial mn_tp */
-
DPRINTF(sc, MWL_DEBUG_NODE, "%s: mn %p\n", __func__, mn);
return &mn->mn_node;
}
@@ -3688,7 +3675,7 @@
break;
case IEEE80211_FC0_TYPE_DATA:
if (!ismcast) {
- const struct ieee80211_txparam *tp = mn->mn_tp;
+ const struct ieee80211_txparam *tp = ni->ni_txparms;
/*
* EAPOL frames get forced to a fixed rate and w/o
* aggregation; otherwise check for any fixed rate
@@ -4737,22 +4724,6 @@
__func__, error);
/* XXX how to deal with error? */
}
- /*
- * Setup fixed rate state; it may change on re-associate (?).
- */
- if (ni->ni_flags & IEEE80211_NODE_HT) {
- if (IEEE80211_IS_CHAN_5GHZ(ni->ni_chan))
- mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11NA];
- else
- mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11NG];
- } else { /* legacy rate handling */
- if (IEEE80211_IS_CHAN_A(ni->ni_chan))
- mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11A];
- else if (ni->ni_flags & IEEE80211_NODE_ERP)
- mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11G];
- else
- mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11B];
- }
}
/*
==== //depot/projects/vap/sys/dev/mwl/if_mwlvar.h#3 (text+ko) ====
@@ -218,7 +218,6 @@
uint16_t mn_staid; /* firmware station id */
struct mwl_bastate mn_ba[MWL_MAXBA];
struct mwl_hal_vap *mn_hvap; /* hal vap handle */
- const struct ieee80211_txparam *mn_tp;
};
#define MWL_NODE(ni) ((struct mwl_node *)(ni))
#define MWL_NODE_CONST(ni) ((const struct mwl_node *)(ni))
More information about the p4-projects
mailing list