aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/debug.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-03-18 20:30:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 14:52:13 -0400
commit516304b0f45614fb8967dc86ff681499204cdbb1 (patch)
tree0bbd4315ab59c25451e0d8baeecd69ff9f7c9f31 /drivers/net/wireless/ath/ath5k/debug.c
parent47107e84446f4724d25c724493679cc50eeef53c (diff)
ath: Add and use pr_fmt, convert printks to pr_<level>
Use a more current logging style. Make sure all output is prefixed appropriately. 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.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index 8c5ce8b0c734..9be885707e20 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -57,6 +57,9 @@
57 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 57 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
58 * THE POSSIBILITY OF SUCH DAMAGES. 58 * THE POSSIBILITY OF SUCH DAMAGES.
59 */ 59 */
60
61#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
62
60#include <linux/export.h> 63#include <linux/export.h>
61#include <linux/moduleparam.h> 64#include <linux/moduleparam.h>
62 65
@@ -254,10 +257,10 @@ static ssize_t write_file_beacon(struct file *file,
254 257
255 if (strncmp(buf, "disable", 7) == 0) { 258 if (strncmp(buf, "disable", 7) == 0) {
256 AR5K_REG_DISABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE); 259 AR5K_REG_DISABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE);
257 printk(KERN_INFO "debugfs disable beacons\n"); 260 pr_info("debugfs disable beacons\n");
258 } else if (strncmp(buf, "enable", 6) == 0) { 261 } else if (strncmp(buf, "enable", 6) == 0) {
259 AR5K_REG_ENABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE); 262 AR5K_REG_ENABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE);
260 printk(KERN_INFO "debugfs enable beacons\n"); 263 pr_info("debugfs enable beacons\n");
261 } 264 }
262 return count; 265 return count;
263} 266}
@@ -457,19 +460,19 @@ static ssize_t write_file_antenna(struct file *file,
457 460
458 if (strncmp(buf, "diversity", 9) == 0) { 461 if (strncmp(buf, "diversity", 9) == 0) {
459 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT); 462 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);
460 printk(KERN_INFO "ath5k debug: enable diversity\n"); 463 pr_info("debug: enable diversity\n");
461 } else if (strncmp(buf, "fixed-a", 7) == 0) { 464 } else if (strncmp(buf, "fixed-a", 7) == 0) {
462 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_A); 465 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_A);
463 printk(KERN_INFO "ath5k debugfs: fixed antenna A\n"); 466 pr_info("debug: fixed antenna A\n");
464 } else if (strncmp(buf, "fixed-b", 7) == 0) { 467 } else if (strncmp(buf, "fixed-b", 7) == 0) {
465 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_B); 468 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_B);
466 printk(KERN_INFO "ath5k debug: fixed antenna B\n"); 469 pr_info("debug: fixed antenna B\n");
467 } else if (strncmp(buf, "clear", 5) == 0) { 470 } else if (strncmp(buf, "clear", 5) == 0) {
468 for (i = 0; i < ARRAY_SIZE(ah->stats.antenna_rx); i++) { 471 for (i = 0; i < ARRAY_SIZE(ah->stats.antenna_rx); i++) {
469 ah->stats.antenna_rx[i] = 0; 472 ah->stats.antenna_rx[i] = 0;
470 ah->stats.antenna_tx[i] = 0; 473 ah->stats.antenna_tx[i] = 0;
471 } 474 }
472 printk(KERN_INFO "ath5k debug: cleared antenna stats\n"); 475 pr_info("debug: cleared antenna stats\n");
473 } 476 }
474 return count; 477 return count;
475} 478}
@@ -639,7 +642,7 @@ static ssize_t write_file_frameerrors(struct file *file,
639 st->txerr_fifo = 0; 642 st->txerr_fifo = 0;
640 st->txerr_filt = 0; 643 st->txerr_filt = 0;
641 st->tx_all_count = 0; 644 st->tx_all_count = 0;
642 printk(KERN_INFO "ath5k debug: cleared frameerrors stats\n"); 645 pr_info("debug: cleared frameerrors stats\n");
643 } 646 }
644 return count; 647 return count;
645} 648}