ath9k: remove ah->mask_reg, it's never used properly
authorPavel Roskin <proski@gnu.org>
Wed, 31 Mar 2010 22:05:37 +0000 (18:05 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 6 Apr 2010 20:55:08 +0000 (16:55 -0400)
commit152d530d9edbb08424dc1b6561252597a7932c49
tree2fd5f34a59e76a11bd683cf5dcd925ac09f90533
parent3069168c82d65f88e4ac76eda09baff02adfd743
ath9k: remove ah->mask_reg, it's never used properly

ah->mask_reg was used to hold different data throughout the driver.
ath9k_hw_init_interrupt_masks() used it to save the value written to
AR_IMR.  ath9k_hw_set_interrupts() used it to hold the interrupt mask as
defined in enum ath9k_int.  Those masks differ in many bits.

Use ah->imask instead of ah->mask_reg in ath9k_hw_set_interrupts() and
ath9k_hw_updatetxtriglevel().  That's what the code was meant to do.
ah->imask is initialized in ath9k_start(), so we don't need to
initialize it from ah->mask_reg.

Once it's done, ah->mask_reg becomes write-only, so it's replaced with a
local variable in ath9k_hw_init_interrupt_masks().

Signed-off-by: Pavel Roskin <proski@gnu.org>
Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/mac.c