diff options
author | Pavel Roskin <proski@gnu.org> | 2006-04-07 04:10:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-04-24 16:15:50 -0400 |
commit | 754b1364e78db796bb3a541f6ea8dec2821c745a (patch) | |
tree | 4a522edc2293f202a53ef4ad3220d39b32a45e05 | |
parent | 65b1fe7df71e7ad09e9203b6c3875781c30557e0 (diff) |
[PATCH] orinoco: remove debug buffer code and userspace include support
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/hermes.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/hermes.h | 34 |
2 files changed, 0 insertions, 53 deletions
diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c index 346c6febb033..456d934caad8 100644 --- a/drivers/net/wireless/hermes.c +++ b/drivers/net/wireless/hermes.c | |||
@@ -121,12 +121,6 @@ void hermes_struct_init(hermes_t *hw, void __iomem *address, int reg_spacing) | |||
121 | hw->iobase = address; | 121 | hw->iobase = address; |
122 | hw->reg_spacing = reg_spacing; | 122 | hw->reg_spacing = reg_spacing; |
123 | hw->inten = 0x0; | 123 | hw->inten = 0x0; |
124 | |||
125 | #ifdef HERMES_DEBUG_BUFFER | ||
126 | hw->dbufp = 0; | ||
127 | memset(&hw->dbuf, 0xff, sizeof(hw->dbuf)); | ||
128 | memset(&hw->profile, 0, sizeof(hw->profile)); | ||
129 | #endif | ||
130 | } | 124 | } |
131 | 125 | ||
132 | int hermes_init(hermes_t *hw) | 126 | int hermes_init(hermes_t *hw) |
@@ -347,19 +341,6 @@ static int hermes_bap_seek(hermes_t *hw, int bap, u16 id, u16 offset) | |||
347 | reg = hermes_read_reg(hw, oreg); | 341 | reg = hermes_read_reg(hw, oreg); |
348 | } | 342 | } |
349 | 343 | ||
350 | #ifdef HERMES_DEBUG_BUFFER | ||
351 | hw->profile[HERMES_BAP_BUSY_TIMEOUT - k]++; | ||
352 | |||
353 | if (k < HERMES_BAP_BUSY_TIMEOUT) { | ||
354 | struct hermes_debug_entry *e = | ||
355 | &hw->dbuf[(hw->dbufp++) % HERMES_DEBUG_BUFSIZE]; | ||
356 | e->bap = bap; | ||
357 | e->id = id; | ||
358 | e->offset = offset; | ||
359 | e->cycles = HERMES_BAP_BUSY_TIMEOUT - k; | ||
360 | } | ||
361 | #endif | ||
362 | |||
363 | if (reg & HERMES_OFFSET_BUSY) | 344 | if (reg & HERMES_OFFSET_BUSY) |
364 | return -ETIMEDOUT; | 345 | return -ETIMEDOUT; |
365 | 346 | ||
diff --git a/drivers/net/wireless/hermes.h b/drivers/net/wireless/hermes.h index 7644f72a9f4e..34ccba2d4354 100644 --- a/drivers/net/wireless/hermes.h +++ b/drivers/net/wireless/hermes.h | |||
@@ -328,16 +328,6 @@ struct hermes_multicast { | |||
328 | u8 addr[HERMES_MAX_MULTICAST][ETH_ALEN]; | 328 | u8 addr[HERMES_MAX_MULTICAST][ETH_ALEN]; |
329 | } __attribute__ ((packed)); | 329 | } __attribute__ ((packed)); |
330 | 330 | ||
331 | // #define HERMES_DEBUG_BUFFER 1 | ||
332 | #define HERMES_DEBUG_BUFSIZE 4096 | ||
333 | struct hermes_debug_entry { | ||
334 | int bap; | ||
335 | u16 id, offset; | ||
336 | int cycles; | ||
337 | }; | ||
338 | |||
339 | #ifdef __KERNEL__ | ||
340 | |||
341 | /* Timeouts */ | 331 | /* Timeouts */ |
342 | #define HERMES_BAP_BUSY_TIMEOUT (10000) /* In iterations of ~1us */ | 332 | #define HERMES_BAP_BUSY_TIMEOUT (10000) /* In iterations of ~1us */ |
343 | 333 | ||
@@ -347,14 +337,7 @@ typedef struct hermes { | |||
347 | int reg_spacing; | 337 | int reg_spacing; |
348 | #define HERMES_16BIT_REGSPACING 0 | 338 | #define HERMES_16BIT_REGSPACING 0 |
349 | #define HERMES_32BIT_REGSPACING 1 | 339 | #define HERMES_32BIT_REGSPACING 1 |
350 | |||
351 | u16 inten; /* Which interrupts should be enabled? */ | 340 | u16 inten; /* Which interrupts should be enabled? */ |
352 | |||
353 | #ifdef HERMES_DEBUG_BUFFER | ||
354 | struct hermes_debug_entry dbuf[HERMES_DEBUG_BUFSIZE]; | ||
355 | unsigned long dbufp; | ||
356 | unsigned long profile[HERMES_BAP_BUSY_TIMEOUT+1]; | ||
357 | #endif | ||
358 | } hermes_t; | 341 | } hermes_t; |
359 | 342 | ||
360 | /* Register access convenience macros */ | 343 | /* Register access convenience macros */ |
@@ -462,21 +445,4 @@ static inline int hermes_write_wordrec(hermes_t *hw, int bap, u16 rid, u16 word) | |||
462 | return HERMES_WRITE_RECORD(hw, bap, rid, &rec); | 445 | return HERMES_WRITE_RECORD(hw, bap, rid, &rec); |
463 | } | 446 | } |
464 | 447 | ||
465 | #else /* ! __KERNEL__ */ | ||
466 | |||
467 | /* These are provided for the benefit of userspace drivers and testing programs | ||
468 | which use ioperm() or iopl() */ | ||
469 | |||
470 | #define hermes_read_reg(base, off) (inw((base) + (off))) | ||
471 | #define hermes_write_reg(base, off, val) (outw((val), (base) + (off))) | ||
472 | |||
473 | #define hermes_read_regn(base, name) (hermes_read_reg((base), HERMES_##name)) | ||
474 | #define hermes_write_regn(base, name, val) (hermes_write_reg((base), HERMES_##name, (val))) | ||
475 | |||
476 | /* Note that for the next two, the count is in 16-bit words, not bytes */ | ||
477 | #define hermes_read_data(base, off, buf, count) (insw((base) + (off), (buf), (count))) | ||
478 | #define hermes_write_data(base, off, buf, count) (outsw((base) + (off), (buf), (count))) | ||
479 | |||
480 | #endif /* ! __KERNEL__ */ | ||
481 | |||
482 | #endif /* _HERMES_H */ | 448 | #endif /* _HERMES_H */ |