aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-06-04 10:53:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 15:20:31 -0400
commit781b14a3153a722fec820374271316537881076e (patch)
tree40361dfbb1ed7cf5827ec7a156f338dc676ae964 /drivers/net/wireless/ath/ath9k/debug.c
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/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index c134ddaa10a..2831258d950 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -205,10 +205,10 @@ static ssize_t write_file_disable_ani(struct file *file,
205 common->disable_ani = !!disable_ani; 205 common->disable_ani = !!disable_ani;
206 206
207 if (disable_ani) { 207 if (disable_ani) {
208 sc->sc_flags &= ~SC_OP_ANI_RUN; 208 clear_bit(SC_OP_ANI_RUN, &sc->sc_flags);
209 del_timer_sync(&common->ani.timer); 209 del_timer_sync(&common->ani.timer);
210 } else { 210 } else {
211 sc->sc_flags |= SC_OP_ANI_RUN; 211 set_bit(SC_OP_ANI_RUN, &sc->sc_flags);
212 ath_start_ani(common); 212 ath_start_ani(common);
213 } 213 }
214 214
@@ -1321,7 +1321,7 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file)
1321 u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask; 1321 u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
1322 u8 nread; 1322 u8 nread;
1323 1323
1324 if (sc->sc_flags & SC_OP_INVALID) 1324 if (test_bit(SC_OP_INVALID, &sc->sc_flags))
1325 return -EAGAIN; 1325 return -EAGAIN;
1326 1326
1327 buf = vmalloc(size); 1327 buf = vmalloc(size);