summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-11-19 14:24:46 +0530
committerJohn W. Linville <linville@tuxdriver.com>2012-11-19 10:45:40 -0500
commitac46ba4384d2c44c56702d0da591696045fba682 (patch)
treed96d638823d533c9154bfbbe03af834a25518089 /drivers/net/wireless/ath/ath9k/debug.c
parent57527f8d4d71b5167a02fb6713857f55d3974748 (diff)
downloadlinux-ac46ba4384d2c44c56702d0da591696045fba682.tar.bz2
ath9k: Fix BTCOEX debugfs file usage
The debugfs file for dumping btcoex parameters unconditionally assumes a MCI-based device. This will not work for older btcoex chips. Fix this by branching out the routine into separate functions. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index a8be94b2a53a..585aee47860c 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1599,8 +1599,14 @@ static ssize_t read_file_btcoex(struct file *file, char __user *user_buf,
if (buf == NULL)
return -ENOMEM;
- len = ath9k_dump_btcoex(sc, buf, len, size);
+ if (!sc->sc_ah->common.btcoex_enabled) {
+ len = snprintf(buf, size, "%s\n",
+ "BTCOEX is disabled");
+ goto exit;
+ }
+ len = ath9k_dump_btcoex(sc, buf, size);
+exit:
retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
kfree(buf);