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>
This commit is contained in:
Sujith Manoharan
2012-06-04 20:23:55 +05:30
کامیت شده توسط John W. Linville
والد 8da07830e1
کامیت 781b14a315
9فایلهای تغییر یافته به همراه52 افزوده شده و 50 حذف شده

مشاهده پرونده

@@ -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;