projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c37452b
)
ath9k: Fix bug in reading debugfs file 'rcstat'
author
Sujith
<Sujith.Manoharan@atheros.com>
Mon, 9 Mar 2009 04:02:01 +0000
(09:32 +0530)
committer
John W. Linville
<linville@tuxdriver.com>
Mon, 16 Mar 2009 22:09:38 +0000
(18:09 -0400)
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>
drivers/net/wireless/ath9k/debug.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ath9k/debug.c
b/drivers/net/wireless/ath9k/debug.c
index
b0ff479
..
82573ca
100644
(file)
--- 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