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>
This commit is contained in:
parent
cd0b8d89c7
commit
f7e014dac2
1 changed files with 5 additions and 0 deletions
|
@ -1373,6 +1373,9 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file)
|
||||||
u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
|
u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
|
||||||
u8 nread;
|
u8 nread;
|
||||||
|
|
||||||
|
if (sc->sc_flags & SC_OP_INVALID)
|
||||||
|
return -EAGAIN;
|
||||||
|
|
||||||
buf = vmalloc(size);
|
buf = vmalloc(size);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -1381,6 +1384,8 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file)
|
||||||
vfree(buf);
|
vfree(buf);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
/* Account the current state too */
|
||||||
|
ath9k_debug_samp_bb_mac(sc);
|
||||||
|
|
||||||
spin_lock_bh(&sc->debug.samp_lock);
|
spin_lock_bh(&sc->debug.samp_lock);
|
||||||
memcpy(bb_mac_samp, sc->debug.bb_mac_samp,
|
memcpy(bb_mac_samp, sc->debug.bb_mac_samp,
|
||||||
|
|
Loading…
Add table
Reference in a new issue