Date: Sat, 27 Nov 2004 18:37:39 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 65927 for review Message-ID: <200411271837.iARIbddl029541@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65927 Change 65927 by sam@sam_ebb on 2004/11/27 18:37:10 o update stats to reflect current code o remove RID fetch of rssi, it's already in the ath stats block Affected files ... .. //depot/projects/wifi/tools/tools/ath/athstats.c#3 edit Differences ... ==== //depot/projects/wifi/tools/tools/ath/athstats.c#3 (text+ko) ==== @@ -102,13 +102,13 @@ STAT(rxorn, "recv overrun interrupts"); STAT(rxeol, "recv eol interrupts"); STAT(txurn, "txmit underrun interrupts"); + STAT(mib, "mib overflow interrupts"); STAT(intrcoal, "interrupts coalesced"); - STAT(rx_orn, "rx overrun interrupts"); STAT(tx_mgmt, "tx management frames"); STAT(tx_discard, "tx frames discarded prior to association"); + STAT(tx_qstop, "tx stopped 'cuz no xmit buffer"); STAT(tx_encap, "tx encapsulation failed"); STAT(tx_nonode, "tx failed 'cuz no node"); - STAT(tx_qstop, "tx stopped 'cuz no xmit buffer"); STAT(tx_nombuf, "tx failed 'cuz no mbuf"); STAT(tx_nomcl, "tx failed 'cuz no cluster"); STAT(tx_linear, "tx linearized to cluster"); @@ -134,6 +134,7 @@ STAT(rx_badcrypt, "rx failed 'cuz decryption"); STAT(rx_badmic, "rx failed 'cuz MIC failure"); STAT(rx_tooshort, "rx failed 'cuz frame too short"); + STAT(rx_toobig, "rx failed 'cuz frame too large"); STAT(rx_mgt, "rx management frames"); STAT(rx_ctl, "rx control frames"); STAT(rx_phyerr, "rx failed 'cuz of PHY err"); @@ -164,7 +165,7 @@ if (stats->ast_tx_rssi) fprintf(fd, "rssi of last ack: %u\n", stats->ast_tx_rssi); if (stats->ast_rx_rssi) - fprintf(fd, "rssi of last rcv: %u\n", stats->ast_rx_rssi); + fprintf(fd, "avg recv rssi: %u\n", stats->ast_rx_rssi); STAT(ant_defswitch, "switched default/rx antenna"); STAT(ant_txswitch, "tx used alternate antenna"); fprintf(fd, "Antenna profile:\n"); @@ -214,37 +215,6 @@ #undef N } -#define WI_RID_COMMS_QUALITY 0xFD43 -/* - * Technically I don't think there's a limit to a record - * length. The largest record is the one that contains the CIS - * data, which is 240 words long, so 256 should be a safe - * value. - */ -#define WI_MAX_DATALEN 512 - -struct wi_req { - u_int16_t wi_len; - u_int16_t wi_type; - u_int16_t wi_val[WI_MAX_DATALEN]; -}; - -static u_int -getrssi(int s, const char *iface) -{ - struct ifreq ifr; - struct wi_req wreq; - - bzero(&wreq, sizeof(wreq)); - wreq.wi_len = WI_MAX_DATALEN; - wreq.wi_type = WI_RID_COMMS_QUALITY; - - bzero(&ifr, sizeof(ifr)); - strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); - ifr.ifr_data = (caddr_t)&wreq; - return ioctl(s, SIOCGIFGENERIC, &ifr) == -1 ? 0 : wreq.wi_val[1]; -} - static kvm_t *kvmd; static char *nlistf = NULL; static char *memf = NULL; @@ -395,7 +365,7 @@ , cur.ast_rx_crcerr - total.ast_rx_crcerr , cur.ast_rx_badcrypt - total.ast_rx_badcrypt , cur.ast_rx_phyerr - total.ast_rx_phyerr - , getrssi(s, ifr.ifr_name) + , cur.ast_rx_rssi , rate ); total = cur; @@ -417,7 +387,7 @@ , total.ast_rx_crcerr , total.ast_rx_badcrypt , total.ast_rx_phyerr - , getrssi(s, ifr.ifr_name) + , total.ast_rx_rssi , rate ); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411271837.iARIbddl029541>