Add OS_REG_RMW, which mirrors ath9k's REG_RMW.
This macro does a read-modify-write pass with register bits to set and clear.
This commit is contained in:
parent
1c554472de
commit
132163b12f
@ -468,6 +468,8 @@ isBigEndian(void)
|
||||
*/
|
||||
#define SM(_v, _f) (((_v) << _f##_S) & (_f))
|
||||
#define MS(_v, _f) (((_v) & (_f)) >> _f##_S)
|
||||
#define OS_REG_RMW(_a, _r, _set, _clr) \
|
||||
OS_REG_WRITE(_a, _r, (OS_REG_READ(_a, _r) & ~(_clr)) | (_set))
|
||||
#define OS_REG_RMW_FIELD(_a, _r, _f, _v) \
|
||||
OS_REG_WRITE(_a, _r, \
|
||||
(OS_REG_READ(_a, _r) &~ (_f)) | (((_v) << _f##_S) & (_f)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user