aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/ath9k.h
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-06-04 20:23:55 +0530
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 15:20:31 -0400
commit781b14a3153a722fec820374271316537881076e (patch)
tree40361dfbb1ed7cf5827ec7a156f338dc676ae964 /drivers/net/wireless/ath/ath9k/ath9k.h
parent8da07830e10a91cbe7badf9767230aafdd520b9c (diff)
ath9k: Use atomic operations
The 'sc_flags' variable is being used in a number of places with no locking whatsoever. This patch converts the usage of sc_flags to atomic ops. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ath9k.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 4c2ce453af22..ae43de1cbb03 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -604,12 +604,14 @@ void ath_ant_comb_update(struct ath_softc *sc);
#define ATH_TXPOWER_MAX 100 /* .5 dBm units */
#define ATH_RATE_DUMMY_MARKER 0
-#define SC_OP_INVALID BIT(0)
-#define SC_OP_BEACONS BIT(1)
-#define SC_OP_RXFLUSH BIT(2)
-#define SC_OP_TSF_RESET BIT(3)
-#define SC_OP_ANI_RUN BIT(4)
-#define SC_OP_PRIM_STA_VIF BIT(5)
+enum sc_op_flags {
+ SC_OP_INVALID,
+ SC_OP_BEACONS,
+ SC_OP_RXFLUSH,
+ SC_OP_TSF_RESET,
+ SC_OP_ANI_RUN,
+ SC_OP_PRIM_STA_VIF,
+};
/* Powersave flags */
#define PS_WAIT_FOR_BEACON BIT(0)
@@ -655,9 +657,9 @@ struct ath_softc {
struct completion paprd_complete;
unsigned int hw_busy_count;
+ unsigned long sc_flags;
u32 intrstatus;
- u32 sc_flags; /* SC_OP_* */
u16 ps_flags; /* PS_* */
u16 curtxpow;
bool ps_enabled;