Changeset 3600

Show
Ignore:
Timestamp:
05/05/08 03:00:11 (4 years ago)
Author:
mentor
Message:

Kill dead uptime calculating code; not needed in a driver...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/trunk/ath_hal/ah_os.c

    r3598 r3600  
    949949} 
    950950 
    951 u_int32_t __ahdecl 
    952 ath_hal_getuptime(struct ath_hal *ah) 
    953 { 
    954         /* NB: Original uptime logic was totally wrong for Linux. 
    955          *  
    956          * Linux systems use unsigned long and special detection of rollover 
    957          * using macros like time_before, time_after, ... 
    958          * 
    959          * Linux initializes jiffies to cause rollover 5m after boot (to detect  
    960          * bugs earlier). 
    961          *  
    962         */ 
    963         static unsigned long last_uptime_seconds = 0; 
    964         unsigned long uptime_jiffies = (jiffies - INITIAL_JIFFIES); 
    965         unsigned long uptime_seconds = ((uptime_jiffies / HZ) * 1000) +  
    966                 (uptime_jiffies % HZ) * (1000 / HZ); 
    967  
    968 #define TEST_ROLLOVER_THEORY 
    969 #ifdef TEST_ROLLOVER_THEORY 
    970         static unsigned long last_old_uptime_seconds = 0; 
    971         unsigned long old_uptime_jiffies = jiffies; 
    972         unsigned long old_uptime_seconds = ((old_uptime_jiffies / HZ) * 1000) +  
    973                 (old_uptime_jiffies % HZ) * (1000 / HZ); 
    974  
    975         if (old_uptime_seconds < last_old_uptime_seconds) { 
    976                 printk("ROLLOVER ROLLOVER ROLLOVER\n"); 
    977                 printk("ROLLOVER ROLLOVER ROLLOVER\n"); 
    978                 printk("ROLLOVER ROLLOVER ROLLOVER\n"); 
    979                 printk("Expect bugs to follow...\n"); 
    980         } 
    981         last_old_uptime_seconds = old_uptime_seconds; 
    982 #endif 
    983         if (uptime_seconds < last_uptime_seconds) { 
    984                 printk("ROLLOVER ROLLOVER ROLLOVER\n"); 
    985                 printk("ROLLOVER ROLLOVER ROLLOVER\n"); 
    986                 printk("ROLLOVER ROLLOVER ROLLOVER\n"); 
    987                 printk("Expect bugs to follow...\n"); 
    988                 // XXX: Replace stupid message with a HAL reset?? 
    989         } 
    990         last_uptime_seconds = uptime_seconds; 
    991         return uptime_seconds; 
    992 } 
    993 EXPORT_SYMBOL(ath_hal_getuptime); 
    994  
    995951/* 
    996952 * Allocate/free memory. 
  • madwifi/trunk/ath_hal/ah_os.h

    r3481 r3600  
    9797#endif                          /* !_LINUX_TYPES_H */ 
    9898 
     99struct ath_hal; 
     100 
    99101extern int ath_hal_dma_beacon_response_time; 
    100102extern int ath_hal_sw_beacon_response_time; 
     
    128130#define labs(_a)                __builtin_labs(_a) 
    129131#endif 
    130  
    131 struct ath_hal; 
    132 extern u_int32_t __ahdecl ath_hal_getuptime(struct ath_hal *); 
    133 #define OS_GETUPTIME(_ah)       ath_hal_getuptime(_ah) 
    134132 
    135133/* Byte order/swapping support. */