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.
*/
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;
#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