diff options
| author | Sujith Manoharan <[email protected]> | 2012-11-19 14:24:46 +0530 | 
|---|---|---|
| committer | John W. Linville <[email protected]> | 2012-11-19 10:45:40 -0500 | 
| commit | ac46ba4384d2c44c56702d0da591696045fba682 (patch) | |
| tree | d96d638823d533c9154bfbbe03af834a25518089 /drivers/net/wireless/ath/ath9k/debug.c | |
| parent | 57527f8d4d71b5167a02fb6713857f55d3974748 (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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 8 | 
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); |