Deleted Added
full compact
athstats.c (184453) athstats.c (186904)
1/*-
1/*-
2 * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer,
10 * without modification.

--- 10 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer,
10 * without modification.

--- 10 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
29 * $FreeBSD: head/tools/tools/ath/athstats/athstats.c 184453 2008-10-29 20:19:54Z sam $
29 * $FreeBSD: head/tools/tools/ath/athstats/athstats.c 186904 2009-01-08 17:12:47Z sam $
30 */
31
32/*
33 * ath statistics class.
34 */
35#include <sys/types.h>
36#include <sys/file.h>
37#include <sys/sockio.h>

--- 172 unchanged lines hidden (view full) ---

210 { 4, "prfga", "prfga", "rfgain value change" },
211#if ATH_SUPPORT_TDMA
212#define S_TDMA_UPDATE AFTER(S_PER_RFGAIN)
213 { 5, "tdmau", "tdmau", "TDMA slot timing updates" },
214#define S_TDMA_TIMERS AFTER(S_TDMA_UPDATE)
215 { 5, "tdmab", "tdmab", "TDMA slot update set beacon timers" },
216#define S_TDMA_TSF AFTER(S_TDMA_TIMERS)
217 { 5, "tdmat", "tdmat", "TDMA slot update set TSF" },
30 */
31
32/*
33 * ath statistics class.
34 */
35#include <sys/types.h>
36#include <sys/file.h>
37#include <sys/sockio.h>

--- 172 unchanged lines hidden (view full) ---

210 { 4, "prfga", "prfga", "rfgain value change" },
211#if ATH_SUPPORT_TDMA
212#define S_TDMA_UPDATE AFTER(S_PER_RFGAIN)
213 { 5, "tdmau", "tdmau", "TDMA slot timing updates" },
214#define S_TDMA_TIMERS AFTER(S_TDMA_UPDATE)
215 { 5, "tdmab", "tdmab", "TDMA slot update set beacon timers" },
216#define S_TDMA_TSF AFTER(S_TDMA_TIMERS)
217 { 5, "tdmat", "tdmat", "TDMA slot update set TSF" },
218#define S_RATE_CALLS AFTER(S_TDMA_TSF)
218#define S_TDMA_TSFADJ AFTER(S_TDMA_TSF)
219 { 8, "tdmadj", "tdmadj", "TDMA slot adjust (usecs, smoothed)" },
220#define S_RATE_CALLS AFTER(S_TDMA_TSFADJ)
219#else
220#define S_RATE_CALLS AFTER(S_PER_RFGAIN)
221#endif
222 { 5, "ratec", "ratec", "rate control checks" },
223#define S_RATE_RAISE AFTER(S_RATE_CALLS)
224 { 5, "rate+", "rate+", "rate control raised xmit rate" },
225#define S_RATE_DROP AFTER(S_RATE_RAISE)
226 { 5, "rate-", "rate-", "rate control dropped xmit rate" },

--- 371 unchanged lines hidden (view full) ---

598 case S_BE_NOMBUF: STAT(be_nombuf);
599 case S_PER_CAL: STAT(per_cal);
600 case S_PER_CALFAIL: STAT(per_calfail);
601 case S_PER_RFGAIN: STAT(per_rfgain);
602#ifdef S_TDMA_UPDATE
603 case S_TDMA_UPDATE: STAT(tdma_update);
604 case S_TDMA_TIMERS: STAT(tdma_timers);
605 case S_TDMA_TSF: STAT(tdma_tsf);
221#else
222#define S_RATE_CALLS AFTER(S_PER_RFGAIN)
223#endif
224 { 5, "ratec", "ratec", "rate control checks" },
225#define S_RATE_RAISE AFTER(S_RATE_CALLS)
226 { 5, "rate+", "rate+", "rate control raised xmit rate" },
227#define S_RATE_DROP AFTER(S_RATE_RAISE)
228 { 5, "rate-", "rate-", "rate control dropped xmit rate" },

--- 371 unchanged lines hidden (view full) ---

600 case S_BE_NOMBUF: STAT(be_nombuf);
601 case S_PER_CAL: STAT(per_cal);
602 case S_PER_CALFAIL: STAT(per_calfail);
603 case S_PER_RFGAIN: STAT(per_rfgain);
604#ifdef S_TDMA_UPDATE
605 case S_TDMA_UPDATE: STAT(tdma_update);
606 case S_TDMA_TIMERS: STAT(tdma_timers);
607 case S_TDMA_TSF: STAT(tdma_tsf);
608 case S_TDMA_TSFADJ:
609 snprintf(b, bs, "-%d/+%d",
610 wf->cur.ath.ast_tdma_tsfadjm, wf->cur.ath.ast_tdma_tsfadjp);
611 return 1;
606#endif
607 case S_RATE_CALLS: STAT(rate_calls);
608 case S_RATE_RAISE: STAT(rate_raise);
609 case S_RATE_DROP: STAT(rate_drop);
610 case S_ANT_DEFSWITCH: STAT(ant_defswitch);
611 case S_ANT_TXSWITCH: STAT(ant_txswitch);
612#ifdef S_ANI_NOISE
613 case S_ANI_NOISE: ANI(noiseImmunityLevel);

--- 194 unchanged lines hidden (view full) ---

808 case S_BE_NOMBUF: STAT(be_nombuf);
809 case S_PER_CAL: STAT(per_cal);
810 case S_PER_CALFAIL: STAT(per_calfail);
811 case S_PER_RFGAIN: STAT(per_rfgain);
812#ifdef S_TDMA_UPDATE
813 case S_TDMA_UPDATE: STAT(tdma_update);
814 case S_TDMA_TIMERS: STAT(tdma_timers);
815 case S_TDMA_TSF: STAT(tdma_tsf);
612#endif
613 case S_RATE_CALLS: STAT(rate_calls);
614 case S_RATE_RAISE: STAT(rate_raise);
615 case S_RATE_DROP: STAT(rate_drop);
616 case S_ANT_DEFSWITCH: STAT(ant_defswitch);
617 case S_ANT_TXSWITCH: STAT(ant_txswitch);
618#ifdef S_ANI_NOISE
619 case S_ANI_NOISE: ANI(noiseImmunityLevel);

--- 194 unchanged lines hidden (view full) ---

814 case S_BE_NOMBUF: STAT(be_nombuf);
815 case S_PER_CAL: STAT(per_cal);
816 case S_PER_CALFAIL: STAT(per_calfail);
817 case S_PER_RFGAIN: STAT(per_rfgain);
818#ifdef S_TDMA_UPDATE
819 case S_TDMA_UPDATE: STAT(tdma_update);
820 case S_TDMA_TIMERS: STAT(tdma_timers);
821 case S_TDMA_TSF: STAT(tdma_tsf);
822 case S_TDMA_TSFADJ:
823 snprintf(b, bs, "-%d/+%d",
824 wf->total.ath.ast_tdma_tsfadjm,
825 wf->total.ath.ast_tdma_tsfadjp);
826 return 1;
816#endif
817 case S_RATE_CALLS: STAT(rate_calls);
818 case S_RATE_RAISE: STAT(rate_raise);
819 case S_RATE_DROP: STAT(rate_drop);
820 case S_ANT_DEFSWITCH: STAT(ant_defswitch);
821 case S_ANT_TXSWITCH: STAT(ant_txswitch);
822#ifdef S_ANI_NOISE
823 case S_ANI_NOISE: ANI(noiseImmunityLevel);

--- 157 unchanged lines hidden ---
827#endif
828 case S_RATE_CALLS: STAT(rate_calls);
829 case S_RATE_RAISE: STAT(rate_raise);
830 case S_RATE_DROP: STAT(rate_drop);
831 case S_ANT_DEFSWITCH: STAT(ant_defswitch);
832 case S_ANT_TXSWITCH: STAT(ant_txswitch);
833#ifdef S_ANI_NOISE
834 case S_ANI_NOISE: ANI(noiseImmunityLevel);

--- 157 unchanged lines hidden ---