Date: Fri, 14 Nov 2003 09:12:15 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 42339 for review Message-ID: <200311141712.hAEHCFw7051458@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=42339 Change 42339 by sam@sam_ebb on 2003/11/14 09:11:13 mods for forthcoming hal api changes Affected files ... .. //depot/projects/netperf/sys/dev/ath/if_ath.c#35 edit .. //depot/projects/netperf/sys/dev/ath/if_athioctl.h#6 edit .. //depot/projects/netperf/sys/dev/ath/if_athvar.h#7 edit Differences ... ==== //depot/projects/netperf/sys/dev/ath/if_ath.c#35 (text+ko) ==== @@ -898,8 +898,25 @@ ath_mode_init(sc); break; case SIOCGATHSTATS: - copyout(&sc->sc_stats, ifr->ifr_data, sizeof (sc->sc_stats)); + error = copyout(&sc->sc_stats, + ifr->ifr_data, sizeof (sc->sc_stats)); + break; + case SIOCGATHDIAG: { + struct ath_diag *ad = (struct ath_diag *)data; + struct ath_hal *ah = sc->sc_ah; + void *data; + u_int size; + + if (ath_hal_getdiagstate(ah, ad->ad_id, &data, &size)) { + if (size > ad->ad_size) + size = ad->ad_size; + error = copyout(data, ad->ad_data, size); + if (error == 0) + ad->ad_size = size; + } else + error = EINVAL; break; + } default: error = ieee80211_ioctl(ifp, cmd, data); if (error == ENETRESET) { @@ -2772,12 +2789,6 @@ sc = ifp->if_softc; if (strcmp(dmode, "hal") == 0) ath_hal_dumpstate(sc->sc_ah); - else if (strcmp(dmode, "eeprom") == 0) - ath_hal_dumpeeprom(sc->sc_ah); - else if (strcmp(dmode, "rfgain") == 0) - ath_hal_dumprfgain(sc->sc_ah); - else if (strcmp(dmode, "ani") == 0) - ath_hal_dumpani(sc->sc_ah); else return EINVAL; } ==== //depot/projects/netperf/sys/dev/ath/if_athioctl.h#6 (text+ko) ==== @@ -91,6 +91,15 @@ #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) +struct ath_diag { + char ad_name[IFNAMSIZ]; /* if name, e.g. "ath0" */ + u_int ad_id; + caddr_t ad_data; + u_int ad_size; + +}; +#define SIOCGATHDIAG _IOWR('i', 138, struct ath_diag) + /* * Radio capture format. */ ==== //depot/projects/netperf/sys/dev/ath/if_athvar.h#7 (text+ko) ==== @@ -274,12 +274,8 @@ ((*(_ah)->ah_stopDmaReceive)((_ah))) #define ath_hal_dumpstate(_ah) \ ((*(_ah)->ah_dumpState)((_ah))) -#define ath_hal_dumpeeprom(_ah) \ - ((*(_ah)->ah_dumpEeprom)((_ah))) -#define ath_hal_dumprfgain(_ah) \ - ((*(_ah)->ah_dumpRfGain)((_ah))) -#define ath_hal_dumpani(_ah) \ - ((*(_ah)->ah_dumpAni)((_ah))) +#define ath_hal_getdiagstate(_ah, _id, _data, _size) \ + ((*(_ah)->ah_getDiagState)((_ah), (_id), (_data), (_size))) #define ath_hal_setuptxqueue(_ah, _type, _irq) \ ((*(_ah)->ah_setupTxQueue)((_ah), (_type), (_irq))) #define ath_hal_resettxqueue(_ah, _q) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311141712.hAEHCFw7051458>