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>
This commit is contained in:
committed by
John W. Linville
parent
906c110fcc
commit
8c5e7a5f59
@ -1482,17 +1482,10 @@ struct hw_pairwise_ta_entry {
|
||||
#define MAX_TXPOWER 31
|
||||
#define DEFAULT_TXPOWER 24
|
||||
|
||||
#define TXPOWER_FROM_DEV(__txpower) \
|
||||
({ \
|
||||
((__txpower) > MAX_TXPOWER) ? \
|
||||
DEFAULT_TXPOWER : (__txpower); \
|
||||
})
|
||||
#define TXPOWER_FROM_DEV(__txpower) \
|
||||
(((u8)(__txpower)) > MAX_TXPOWER) ? DEFAULT_TXPOWER : (__txpower)
|
||||
|
||||
#define TXPOWER_TO_DEV(__txpower) \
|
||||
({ \
|
||||
((__txpower) <= MIN_TXPOWER) ? MIN_TXPOWER : \
|
||||
(((__txpower) >= MAX_TXPOWER) ? MAX_TXPOWER : \
|
||||
(__txpower)); \
|
||||
})
|
||||
#define TXPOWER_TO_DEV(__txpower) \
|
||||
clamp_t(char, __txpower, MIN_TXPOWER, MAX_TXPOWER)
|
||||
|
||||
#endif /* RT61PCI_H */
|
||||
|
Reference in New Issue
Block a user