summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith2009-03-09 05:02:01 +0100
committerJohn W. Linville2009-03-16 23:09:38 +0100
commit62b4fb66c5611c4e2b9279810c2d037fb5b5fa68 (patch)
tree9040289449937542a1833365debac2a8fa45ca12 /drivers
parentath9k: Fix bug in TX aggregation (diff)
downloadkernel-qcow2-linux-62b4fb66c5611c4e2b9279810c2d037fb5b5fa68.tar.gz
kernel-qcow2-linux-62b4fb66c5611c4e2b9279810c2d037fb5b5fa68.tar.xz
kernel-qcow2-linux-62b4fb66c5611c4e2b9279810c2d037fb5b5fa68.zip
ath9k: Fix bug in reading debugfs file 'rcstat'
The rate table would not have been chosen before the interface has been brought up. Reading 'rcstat' in this case would result in an oops, fix this. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/debug.c b/drivers/net/wireless/ath9k/debug.c
index b0ff4792546e..82573cadb1ab 100644
--- a/drivers/net/wireless/ath9k/debug.c
+++ b/drivers/net/wireless/ath9k/debug.c
@@ -322,6 +322,9 @@ static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
{
struct ath_softc *sc = file->private_data;
+ if (sc->cur_rate_table == NULL)
+ return 0;
+
if (conf_is_ht(&sc->hw->conf))
return ath_read_file_stat_11n_rc(file, user_buf, count, ppos);
else