ath9k_hw: Add macros for multiple register writes
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 16 Apr 2010 06:23:55 +0000 (11:53 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 Apr 2010 19:47:06 +0000 (15:47 -0400)
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.h

index 7ce5420966a40bcd319b225c8a10f4ccc895ac1f..8158e8e6a53ddede80fa1bb9562fe0869a96e6c4 100644 (file)
 #define REG_READ(_ah, _reg) \
        ath9k_hw_common(_ah)->ops->read((_ah), (_reg))
 
+#define ENABLE_REGWRITE_BUFFER(_ah)                                    \
+       do {                                                            \
+               if (AR_SREV_9271(_ah))                                  \
+                       ath9k_hw_common(_ah)->ops->enable_write_buffer((_ah)); \
+       } while (0)
+
+#define DISABLE_REGWRITE_BUFFER(_ah)                                   \
+       do {                                                            \
+               if (AR_SREV_9271(_ah))                                  \
+                       ath9k_hw_common(_ah)->ops->disable_write_buffer((_ah)); \
+       } while (0)
+
+#define REGWRITE_BUFFER_FLUSH(_ah)                                     \
+       do {                                                            \
+               if (AR_SREV_9271(_ah))                                  \
+                       ath9k_hw_common(_ah)->ops->write_flush((_ah));  \
+       } while (0)
+
 #define SM(_v, _f)  (((_v) << _f##_S) & _f)
 #define MS(_v, _f)  (((_v) & _f) >> _f##_S)
 #define REG_RMW(_a, _r, _set, _clr)    \