summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/debug.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-10-12 11:07:44 -0700
committerJohn W. Linville <linville@tuxdriver.com>2010-10-12 16:05:30 -0400
commit908ebfb95d16bdf7f5f37ad911ccd9b7350ba780 (patch)
tree4a11c71816c2c545e8beabc4cc5c64d713d4f83e /drivers/net/wireless/ath/ath5k/debug.c
parentcfd8e12f42746df396ecbdf7a1d8e92e8e4dbb97 (diff)
downloadblackbird-op-linux-908ebfb95d16bdf7f5f37ad911ccd9b7350ba780.tar.gz
blackbird-op-linux-908ebfb95d16bdf7f5f37ad911ccd9b7350ba780.zip
ath5k: fix build break from "ath5k: Print out opmode in debugfs"
Also improve ath_opmode_to_string usage by having it return UNKNOWN rather than NULL in the event of failure to map the opmode value to a representative string. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/debug.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index a3b217125331..7c77e5b7c9af 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -493,7 +493,6 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
char buf[700];
unsigned int len = 0;
u32 filt = ath5k_hw_get_rx_filter(sc->ah);
- const char *tmp;
len += snprintf(buf+len, sizeof(buf)-len, "bssid-mask: %pM\n",
sc->bssidmask);
@@ -522,17 +521,10 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
if (filt & AR5K_RX_FILTER_PHYERR_5211)
snprintf(buf+len, sizeof(buf)-len, " PHYERR-5211");
if (filt & AR5K_RX_FILTER_RADARERR_5211)
- len += snprintf(buf+len, sizeof(buf)-len, " RADARERR-5211\n");
- else
- len += snprintf(buf+len, sizeof(buf)-len, "\n");
-
- tmp = ath_opmode_to_string(sc->opmode);
- if (tmp)
- len += snprintf(buf+len, sizeof(buf)-len, "opmode: %s\n",
- tmp);
- else
- len += snprintf(buf+len, sizeof(buf)-len,
- "opmode: UNKNOWN-%i\n", sc->opmode);
+ len += snprintf(buf+len, sizeof(buf)-len, " RADARERR-5211");
+
+ len += snprintf(buf+len, sizeof(buf)-len, "\nopmode: %s (%d)\n",
+ ath_opmode_to_string(sc->opmode), sc->opmode);
if (len > sizeof(buf))
len = sizeof(buf);
OpenPOWER on IntegriCloud