From owner-svn-src-projects@FreeBSD.ORG Wed Jan 28 19:42:02 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D55AC106564A; Wed, 28 Jan 2009 19:42:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C23F18FC13; Wed, 28 Jan 2009 19:42:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0SJg2NQ031288; Wed, 28 Jan 2009 19:42:02 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0SJg2Gs031283; Wed, 28 Jan 2009 19:42:02 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901281942.n0SJg2Gs031283@svn.freebsd.org> From: Sam Leffler Date: Wed, 28 Jan 2009 19:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187858 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 19:42:03 -0000 Author: sam Date: Wed Jan 28 19:42:02 2009 New Revision: 187858 URL: http://svn.freebsd.org/changeset/base/187858 Log: merge r187800: hange ic_getradiocaps driver callback Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/ath/if_ath.c projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) projects/vap7/sys/net80211/ieee80211_ioctl.c projects/vap7/sys/net80211/ieee80211_regdomain.c projects/vap7/sys/net80211/ieee80211_var.h Modified: projects/vap7/sys/dev/ath/if_ath.c ============================================================================== --- projects/vap7/sys/dev/ath/if_ath.c Wed Jan 28 19:41:18 2009 (r187857) +++ projects/vap7/sys/dev/ath/if_ath.c Wed Jan 28 19:42:02 2009 (r187858) @@ -205,7 +205,7 @@ static void ath_newassoc(struct ieee8021 static int ath_setregdomain(struct ieee80211com *, struct ieee80211_regdomain *, int, struct ieee80211_channel []); -static void ath_getradiocaps(struct ieee80211com *, int *, +static void ath_getradiocaps(struct ieee80211com *, int, int *, struct ieee80211_channel []); static int ath_getchannels(struct ath_softc *); static void ath_led_event(struct ath_softc *, int); @@ -6332,7 +6332,7 @@ ath_setregdomain(struct ieee80211com *ic static void ath_getradiocaps(struct ieee80211com *ic, - int *nchans, struct ieee80211_channel chans[]) + int maxchans, int *nchans, struct ieee80211_channel chans[]) { struct ath_softc *sc = ic->ic_ifp->if_softc; struct ath_hal *ah = sc->sc_ah; Modified: projects/vap7/sys/net80211/ieee80211_ioctl.c ============================================================================== --- projects/vap7/sys/net80211/ieee80211_ioctl.c Wed Jan 28 19:41:18 2009 (r187857) +++ projects/vap7/sys/net80211/ieee80211_ioctl.c Wed Jan 28 19:42:02 2009 (r187858) @@ -707,7 +707,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80 dc->dc_cryptocaps = ic->ic_cryptocaps; dc->dc_htcaps = ic->ic_htcaps; ci = &dc->dc_chaninfo; - ic->ic_getradiocaps(ic, &ci->ic_nchans, ci->ic_chans); + ic->ic_getradiocaps(ic, IEEE80211_CHAN_MAX, &ci->ic_nchans, ci->ic_chans); ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans); error = copyout(dc, ireq->i_data, sizeof(*dc)); free(dc, M_TEMP); Modified: projects/vap7/sys/net80211/ieee80211_regdomain.c ============================================================================== --- projects/vap7/sys/net80211/ieee80211_regdomain.c Wed Jan 28 19:41:18 2009 (r187857) +++ projects/vap7/sys/net80211/ieee80211_regdomain.c Wed Jan 28 19:42:02 2009 (r187858) @@ -44,12 +44,14 @@ __FBSDID("$FreeBSD$"); #include static void -null_getradiocaps(struct ieee80211com *ic, int *n, struct ieee80211_channel *c) +null_getradiocaps(struct ieee80211com *ic, int maxchan, + int *n, struct ieee80211_channel *c) { /* just feed back the current channel list */ - *n = ic->ic_nchans; - memcpy(c, ic->ic_channels, - ic->ic_nchans*sizeof(struct ieee80211_channel)); + *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)); } static int Modified: projects/vap7/sys/net80211/ieee80211_var.h ============================================================================== --- projects/vap7/sys/net80211/ieee80211_var.h Wed Jan 28 19:41:18 2009 (r187857) +++ projects/vap7/sys/net80211/ieee80211_var.h Wed Jan 28 19:42:02 2009 (r187858) @@ -208,7 +208,7 @@ struct ieee80211com { ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]; /* return hardware/radio capabilities */ void (*ic_getradiocaps)(struct ieee80211com *, - int *, struct ieee80211_channel []); + int, int *, struct ieee80211_channel []); /* check and/or prepare regdomain state change */ int (*ic_setregdomain)(struct ieee80211com *, struct ieee80211_regdomain *,