aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-08-04 10:38:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-22 16:29:58 -0400
commit8c5e7a5f59f9d11597bd47de28334da318ea0e80 (patch)
tree46dc69607e8a196fd68b3b040b312bc1e7fc0559 /drivers/net/wireless/rt2x00/rt73usb.h
parent906c110fcc24bdd5bf0fa22d89ac75d99c747e53 (diff)
rt2x00: Gather channel information in structure
Channel information which is read from EEPROM should be read into an array containing per-channel information. This removes the requirement of multiple arrays and makes the channel handling a bit cleaner and easier to expand. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.h b/drivers/net/wireless/rt2x00/rt73usb.h
index 91e04d319d7..868386c457f 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.h
+++ b/drivers/net/wireless/rt2x00/rt73usb.h
@@ -1050,17 +1050,10 @@ struct hw_pairwise_ta_entry {
1050#define MAX_TXPOWER 31 1050#define MAX_TXPOWER 31
1051#define DEFAULT_TXPOWER 24 1051#define DEFAULT_TXPOWER 24
1052 1052
1053#define TXPOWER_FROM_DEV(__txpower) \ 1053#define TXPOWER_FROM_DEV(__txpower) \
1054({ \ 1054 (((u8)(__txpower)) > MAX_TXPOWER) ? DEFAULT_TXPOWER : (__txpower)
1055 ((__txpower) > MAX_TXPOWER) ? \ 1055
1056 DEFAULT_TXPOWER : (__txpower); \ 1056#define TXPOWER_TO_DEV(__txpower) \
1057}) 1057 clamp_t(char, __txpower, MIN_TXPOWER, MAX_TXPOWER)
1058
1059#define TXPOWER_TO_DEV(__txpower) \
1060({ \
1061 ((__txpower) <= MIN_TXPOWER) ? MIN_TXPOWER : \
1062 (((__txpower) >= MAX_TXPOWER) ? MAX_TXPOWER : \
1063 (__txpower)); \
1064})
1065 1058
1066#endif /* RT73USB_H */ 1059#endif /* RT73USB_H */