PERFORCE change 133140 for review
Sam Leffler
sam at FreeBSD.org
Sat Jan 12 15:49:50 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=133140
Change 133140 by sam at 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++;
}
More information about the p4-projects
mailing list