svn commit: r188774 - head/sys/net80211

Sam Leffler sam at FreeBSD.org
Wed Feb 18 20:33:37 PST 2009


Author: sam
Date: Thu Feb 19 04:33:36 2009
New Revision: 188774
URL: http://svn.freebsd.org/changeset/base/188774

Log:
  instead of special casing lookups for the 11na/g legacy rate set, just
  install the rates once when creating the com structure

Modified:
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_ioctl.c

Modified: head/sys/net80211/ieee80211.c
==============================================================================
--- head/sys/net80211/ieee80211.c	Thu Feb 19 04:24:22 2009	(r188773)
+++ head/sys/net80211/ieee80211.c	Thu Feb 19 04:33:36 2009	(r188774)
@@ -185,6 +185,8 @@ ieee80211_chan_init(struct ieee80211com 
 	DEFAULTRATES(IEEE80211_MODE_TURBO_A,	 ieee80211_rateset_11a);
 	DEFAULTRATES(IEEE80211_MODE_TURBO_G,	 ieee80211_rateset_11g);
 	DEFAULTRATES(IEEE80211_MODE_STURBO_A,	 ieee80211_rateset_11a);
+	DEFAULTRATES(IEEE80211_MODE_11NA,	 ieee80211_rateset_11a);
+	DEFAULTRATES(IEEE80211_MODE_11NG,	 ieee80211_rateset_11g);
 
 	/*
 	 * Set auto mode to reset active channel state and any desired channel.
@@ -1011,12 +1013,7 @@ ieee80211_get_suprates(struct ieee80211c
 		return &ieee80211_rateset_half;
 	if (IEEE80211_IS_CHAN_QUARTER(c))
 		return &ieee80211_rateset_quarter;
-	if (IEEE80211_IS_CHAN_HTA(c))
-		return &ic->ic_sup_rates[IEEE80211_MODE_11A];
-	if (IEEE80211_IS_CHAN_HTG(c)) {
-		/* XXX does this work for basic rates? */
-		return &ic->ic_sup_rates[IEEE80211_MODE_11G];
-	}
+	/* XXX does this work for 11ng basic rates? */
 	return &ic->ic_sup_rates[ieee80211_chan2mode(c)];
 }
 

Modified: head/sys/net80211/ieee80211_ioctl.c
==============================================================================
--- head/sys/net80211/ieee80211_ioctl.c	Thu Feb 19 04:24:22 2009	(r188773)
+++ head/sys/net80211/ieee80211_ioctl.c	Thu Feb 19 04:33:36 2009	(r188774)
@@ -2121,8 +2121,7 @@ ieee80211_ioctl_settxparams(struct ieee8
 			continue;
 		src = &parms.params[i];
 		dst = &vap->iv_txparms[i];
-		rs = &ic->ic_sup_rates[i == IEEE80211_MODE_11NA ?
-		    IEEE80211_MODE_11A : IEEE80211_MODE_11G];
+		rs = &ic->ic_sup_rates[i];
 		if (src->ucastrate != dst->ucastrate) {
 			if (!checkmcs(src->ucastrate) &&
 			    !checkrate(rs, src->ucastrate))


More information about the svn-src-all mailing list