mirror of https://gitee.com/openkylin/linux.git
ath9k: ath9k_hw_analog_shift_rmw: use REG_RMW
use REG_RMW in ath9k_hw_analog_shift_rmw. It will double execution speed on usb bus. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
18d6616f1b
commit
2028523b6d
|
@ -27,12 +27,7 @@ void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val)
|
||||||
void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask,
|
void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask,
|
||||||
u32 shift, u32 val)
|
u32 shift, u32 val)
|
||||||
{
|
{
|
||||||
u32 regVal;
|
REG_RMW(ah, reg, ((val << shift) & mask), mask);
|
||||||
|
|
||||||
regVal = REG_READ(ah, reg) & ~mask;
|
|
||||||
regVal |= (val << shift) & mask;
|
|
||||||
|
|
||||||
REG_WRITE(ah, reg, regVal);
|
|
||||||
|
|
||||||
if (ah->config.analog_shiftreg)
|
if (ah->config.analog_shiftreg)
|
||||||
udelay(100);
|
udelay(100);
|
||||||
|
|
Loading…
Reference in New Issue