Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jan 2008 23:49:47 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 133140 for review
Message-ID:  <200801122349.m0CNnlCD050831@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133140

Change 133140 by sam@sam_ebb on 2008/01/12 23:49:20

	11n fixed rates can be either mcs or legacy

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#20 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#20 (text+ko) ====

@@ -2030,6 +2030,7 @@
 	struct ieee80211com *ic = vap->iv_ic;
 	struct ieee80211_txparams_req parms;	/* XXX stack use? */
 	struct ieee80211_txparam *src, *dst;
+	const struct ieee80211_rateset *rs;
 	int error, i, changed;
 
 	if (ireq->i_len != sizeof(parms))
@@ -2044,18 +2045,19 @@
 			continue;
 		src = &parms.params[i];
 		dst = &vap->iv_txparms[i];
+		rs = &ic->ic_sup_rates[i];
 		if (src->ucastrate != dst->ucastrate) {
-			if (!checkrate(&ic->ic_sup_rates[i], src->ucastrate))
+			if (!checkrate(rs, src->ucastrate))
 				return EINVAL;
 			changed++;
 		}
 		if (src->mcastrate != dst->mcastrate) {
-			if (!checkrate(&ic->ic_sup_rates[i], src->mcastrate))
+			if (!checkrate(rs, src->mcastrate))
 				return EINVAL;
 			changed++;
 		}
 		if (src->mgmtrate != dst->mgmtrate) {
-			if (!checkrate(&ic->ic_sup_rates[i], src->mgmtrate))
+			if (!checkrate(rs, src->mgmtrate))
 				return EINVAL;
 			changed++;
 		}
@@ -2068,18 +2070,23 @@
 			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];
 		if (src->ucastrate != dst->ucastrate) {
-			if (!checkmcs(src->ucastrate))
+			if (!checkmcs(src->ucastrate) &&
+			    !checkrate(rs, src->ucastrate))
 				return EINVAL;
 			changed++;
 		}
 		if (src->mcastrate != dst->mcastrate) {
-			if (!checkmcs(src->mcastrate))
+			if (!checkmcs(src->mcastrate) &&
+			    !checkrate(rs, src->mcastrate))
 				return EINVAL;
 			changed++;
 		}
 		if (src->mgmtrate != dst->mgmtrate) {
-			if (!checkmcs(src->mgmtrate))
+			if (!checkmcs(src->mgmtrate) &&
+			    !checkrate(rs, src->mgmtrate))
 				return EINVAL;
 			changed++;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801122349.m0CNnlCD050831>