diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-04-16 02:23:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-16 15:47:06 -0400 |
commit | 20b3efd979c0d5d9fdf497a98668a806266a63e4 (patch) | |
tree | aac4c37cfc10645ce9aa030754ee8bd1f6cf2801 /drivers/net/wireless/ath/ath9k/hw.h | |
parent | 4a22fe108e62367c10c3abeb469d6972ba3299f5 (diff) |
ath9k_hw: Add macros for multiple register writes
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 7ce5420966a4..8158e8e6a53d 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -68,6 +68,24 @@ | |||
68 | #define REG_READ(_ah, _reg) \ | 68 | #define REG_READ(_ah, _reg) \ |
69 | ath9k_hw_common(_ah)->ops->read((_ah), (_reg)) | 69 | ath9k_hw_common(_ah)->ops->read((_ah), (_reg)) |
70 | 70 | ||
71 | #define ENABLE_REGWRITE_BUFFER(_ah) \ | ||
72 | do { \ | ||
73 | if (AR_SREV_9271(_ah)) \ | ||
74 | ath9k_hw_common(_ah)->ops->enable_write_buffer((_ah)); \ | ||
75 | } while (0) | ||
76 | |||
77 | #define DISABLE_REGWRITE_BUFFER(_ah) \ | ||
78 | do { \ | ||
79 | if (AR_SREV_9271(_ah)) \ | ||
80 | ath9k_hw_common(_ah)->ops->disable_write_buffer((_ah)); \ | ||
81 | } while (0) | ||
82 | |||
83 | #define REGWRITE_BUFFER_FLUSH(_ah) \ | ||
84 | do { \ | ||
85 | if (AR_SREV_9271(_ah)) \ | ||
86 | ath9k_hw_common(_ah)->ops->write_flush((_ah)); \ | ||
87 | } while (0) | ||
88 | |||
71 | #define SM(_v, _f) (((_v) << _f##_S) & _f) | 89 | #define SM(_v, _f) (((_v) << _f##_S) & _f) |
72 | #define MS(_v, _f) (((_v) & _f) >> _f##_S) | 90 | #define MS(_v, _f) (((_v) & _f) >> _f##_S) |
73 | #define REG_RMW(_a, _r, _set, _clr) \ | 91 | #define REG_RMW(_a, _r, _set, _clr) \ |