aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-11-19 03:54:46 -0500
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)
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,
1599 if (buf == NULL) 1599 if (buf == NULL)
1600 return -ENOMEM; 1600 return -ENOMEM;
1601 1601
1602 len = ath9k_dump_btcoex(sc, buf, len, size); 1602 if (!sc->sc_ah->common.btcoex_enabled) {
1603 len = snprintf(buf, size, "%s\n",
1604 "BTCOEX is disabled");
1605 goto exit;
1606 }
1603 1607
1608 len = ath9k_dump_btcoex(sc, buf, size);
1609exit:
1604 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); 1610 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
1605 kfree(buf); 1611 kfree(buf);
1606 1612