diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2011-09-06 11:30:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-14 13:56:32 -0400 |
commit | f7e014dac29b1abe5c8fa8d721d43928633340ab (patch) | |
tree | 62219ac0683c04873bf577bec8e1cfe54825e84e | |
parent | cd0b8d89c75233d8468f3c585e4e022f6779ac84 (diff) |
ath9k: Take the samples in unassociated state
Currently the samples debugfs which maintains the snapshorts of
mac/bb only on associated state. Hence to cover issues on idle
state, the samples are taken whenever the driver is ready.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 19ef559ac78f..556032762693 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -1373,6 +1373,9 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file) | |||
1373 | u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask; | 1373 | u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask; |
1374 | u8 nread; | 1374 | u8 nread; |
1375 | 1375 | ||
1376 | if (sc->sc_flags & SC_OP_INVALID) | ||
1377 | return -EAGAIN; | ||
1378 | |||
1376 | buf = vmalloc(size); | 1379 | buf = vmalloc(size); |
1377 | if (!buf) | 1380 | if (!buf) |
1378 | return -ENOMEM; | 1381 | return -ENOMEM; |
@@ -1381,6 +1384,8 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file) | |||
1381 | vfree(buf); | 1384 | vfree(buf); |
1382 | return -ENOMEM; | 1385 | return -ENOMEM; |
1383 | } | 1386 | } |
1387 | /* Account the current state too */ | ||
1388 | ath9k_debug_samp_bb_mac(sc); | ||
1384 | 1389 | ||
1385 | spin_lock_bh(&sc->debug.samp_lock); | 1390 | spin_lock_bh(&sc->debug.samp_lock); |
1386 | memcpy(bb_mac_samp, sc->debug.bb_mac_samp, | 1391 | memcpy(bb_mac_samp, sc->debug.bb_mac_samp, |