summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_regdomain.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-01-28 18:37:46 +0000
committersam <sam@FreeBSD.org>2009-01-28 18:37:46 +0000
commitdce44e3d8e39301c140e60680785c7df919261e5 (patch)
tree33e692d802681c595f1157f674d42673d838dd54 /sys/net80211/ieee80211_regdomain.c
parent49cfcf2ff6a7f13d887e194cc8d79ddfba094479 (diff)
downloadFreeBSD-src-dce44e3d8e39301c140e60680785c7df919261e5.zip
FreeBSD-src-dce44e3d8e39301c140e60680785c7df919261e5.tar.gz
change null_getradiocaps to return the actual count of channels instead
of the true number; otherwise the caller may use the count to do things with the data it should not (e.g. sort the channel table)
Diffstat (limited to 'sys/net80211/ieee80211_regdomain.c')
-rw-r--r--sys/net80211/ieee80211_regdomain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_regdomain.c b/sys/net80211/ieee80211_regdomain.c
index 03c263b..da3bfcc 100644
--- a/sys/net80211/ieee80211_regdomain.c
+++ b/sys/net80211/ieee80211_regdomain.c
@@ -48,10 +48,10 @@ null_getradiocaps(struct ieee80211com *ic, int maxchan,
int *n, struct ieee80211_channel *c)
{
/* just feed back the current channel list */
- *n = ic->ic_nchans; /* XXX return count copied? */
if (maxchan > ic->ic_nchans)
maxchan = ic->ic_nchans;
memcpy(c, ic->ic_channels, maxchan*sizeof(struct ieee80211_channel));
+ *n = maxchan;
}
static int
OpenPOWER on IntegriCloud