Kill dead uptime calculating code; not needed in a driver...
authormentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 5 May 2008 01:00:11 +0000 (01:00 +0000)
committermentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 5 May 2008 01:00:11 +0000 (01:00 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3600 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath_hal/ah_os.c
ath_hal/ah_os.h

index f0e1a8153a93147c9812c8769ed8bf30b99bbf3a..e22ed2186697b8559c75c076d990b9cba6dacb0d 100644 (file)
@@ -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.
  */
index 09ac5a02b25e3b253545e306128f3ac788dd8dca..62f41d8297732dd75ed739d316b96c6ea8189510 100644 (file)
@@ -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