ar5416_ani.c (234768) | ar5416_ani.c (234774) |
---|---|
1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 * | 1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 * |
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c 234768 2012-04-28 18:56:17Z adrian $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c 234774 2012-04-28 22:03:19Z adrian $ |
18 */ 19#include "opt_ah.h" 20 21/* 22 * XXX this is virtually the same code as for 5212; we reuse 23 * storage in the 5212 state block; need to refactor. 24 */ 25#include "ah.h" --- 796 unchanged lines hidden (view full) --- 822 823 /* 824 * We shouldn't see ah_curchan be NULL, but just in case.. 825 */ 826 if (AH_PRIVATE(ah)->ah_curchan == AH_NULL) { 827 ath_hal_printf(ah, "%s: ah_curchan = NULL?\n", __func__); 828 return (0); 829 } | 18 */ 19#include "opt_ah.h" 20 21/* 22 * XXX this is virtually the same code as for 5212; we reuse 23 * storage in the 5212 state block; need to refactor. 24 */ 25#include "ah.h" --- 796 unchanged lines hidden (view full) --- 822 823 /* 824 * We shouldn't see ah_curchan be NULL, but just in case.. 825 */ 826 if (AH_PRIVATE(ah)->ah_curchan == AH_NULL) { 827 ath_hal_printf(ah, "%s: ah_curchan = NULL?\n", __func__); 828 return (0); 829 } |
830 /* XXX bounds check? */ 831 if (AH_PRIVATE(ah)->ah_curchan != AH_NULL) 832 cs = 833 &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; | |
834 | 830 |
831 cs = &ahp->ah_chansurvey; 832 |
|
835 /* 836 * Fetch the current statistics, squirrel away the current 837 * sample, bump the sequence/sample counter. 838 */ 839 OS_MEMZERO(&hs, sizeof(hs)); 840 good = ar5416GetMibCycleCounts(ah, &hs); 841 if (cs != AH_NULL) { 842 OS_MEMCPY(&cs->samples[cs->cur_sample], &hs, sizeof(hs)); --- 156 unchanged lines hidden --- | 833 /* 834 * Fetch the current statistics, squirrel away the current 835 * sample, bump the sequence/sample counter. 836 */ 837 OS_MEMZERO(&hs, sizeof(hs)); 838 good = ar5416GetMibCycleCounts(ah, &hs); 839 if (cs != AH_NULL) { 840 OS_MEMCPY(&cs->samples[cs->cur_sample], &hs, sizeof(hs)); --- 156 unchanged lines hidden --- |