提交 62b4fb66 编写于 作者: S Sujith 提交者: John W. Linville

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: NSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c37452b0
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册