From 63436cbc141f82e88e1a2a754d04d811f80964f2 Mon Sep 17 00:00:00 2001 From: mentor Date: Mon, 5 May 2008 01:00:11 +0000 Subject: [PATCH] Kill dead uptime calculating code; not needed in a driver... git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3600 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath_hal/ah_os.c | 44 -------------------------------------------- ath_hal/ah_os.h | 6 ++---- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/ath_hal/ah_os.c b/ath_hal/ah_os.c index f0e1a81..e22ed21 100644 --- a/ath_hal/ah_os.c +++ b/ath_hal/ah_os.c @@ -948,50 +948,6 @@ ath_hal_delay(int n) udelay(n); } -u_int32_t __ahdecl -ath_hal_getuptime(struct ath_hal *ah) -{ - /* NB: Original uptime logic was totally wrong for Linux. - * - * Linux systems use unsigned long and special detection of rollover - * using macros like time_before, time_after, ... - * - * Linux initializes jiffies to cause rollover 5m after boot (to detect - * bugs earlier). - * - */ - static unsigned long last_uptime_seconds = 0; - unsigned long uptime_jiffies = (jiffies - INITIAL_JIFFIES); - unsigned long uptime_seconds = ((uptime_jiffies / HZ) * 1000) + - (uptime_jiffies % HZ) * (1000 / HZ); - -#define TEST_ROLLOVER_THEORY -#ifdef TEST_ROLLOVER_THEORY - static unsigned long last_old_uptime_seconds = 0; - unsigned long old_uptime_jiffies = jiffies; - unsigned long old_uptime_seconds = ((old_uptime_jiffies / HZ) * 1000) + - (old_uptime_jiffies % HZ) * (1000 / HZ); - - if (old_uptime_seconds < last_old_uptime_seconds) { - printk("ROLLOVER ROLLOVER ROLLOVER\n"); - printk("ROLLOVER ROLLOVER ROLLOVER\n"); - printk("ROLLOVER ROLLOVER ROLLOVER\n"); - printk("Expect bugs to follow...\n"); - } - last_old_uptime_seconds = old_uptime_seconds; -#endif - if (uptime_seconds < last_uptime_seconds) { - printk("ROLLOVER ROLLOVER ROLLOVER\n"); - printk("ROLLOVER ROLLOVER ROLLOVER\n"); - printk("ROLLOVER ROLLOVER ROLLOVER\n"); - printk("Expect bugs to follow...\n"); - // XXX: Replace stupid message with a HAL reset?? - } - last_uptime_seconds = uptime_seconds; - return uptime_seconds; -} -EXPORT_SYMBOL(ath_hal_getuptime); - /* * Allocate/free memory. */ diff --git a/ath_hal/ah_os.h b/ath_hal/ah_os.h index 09ac5a0..62f41d8 100644 --- a/ath_hal/ah_os.h +++ b/ath_hal/ah_os.h @@ -96,6 +96,8 @@ typedef unsigned int u_int; typedef void* va_list; #endif /* !_LINUX_TYPES_H */ +struct ath_hal; + extern int ath_hal_dma_beacon_response_time; extern int ath_hal_sw_beacon_response_time; extern int ath_hal_additional_swba_backoff; @@ -128,10 +130,6 @@ extern void *__ahdecl ath_hal_memcpy(void *, const void *, size_t); #define labs(_a) __builtin_labs(_a) #endif -struct ath_hal; -extern u_int32_t __ahdecl ath_hal_getuptime(struct ath_hal *); -#define OS_GETUPTIME(_ah) ath_hal_getuptime(_ah) - /* Byte order/swapping support. */ #define AH_LITTLE_ENDIAN 1234 #define AH_BIG_ENDIAN 4321 -- 2.35.1