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>
This commit is contained in:

committed by
John W. Linville

parent
57527f8d4d
commit
ac46ba4384
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user