aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_debugfs.c
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2009-06-12 07:17:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 14:57:50 -0400
commit80301cdcfe44e3533175be23d7d52a9fc8c3fdb0 (patch)
tree624d018b822016a8f83d49588012519a4e9a4d16 /drivers/net/wireless/wl12xx/wl1251_debugfs.c
parent1e6f172fccbf1194bad4b2aeae437ec3189a3f08 (diff)
wl1251: use wl1251 prefix everywhere
Last we can change all code prefixes from wl12xx/WL12XX to wl1251/WL1251. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_debugfs.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_debugfs.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_debugfs.c b/drivers/net/wireless/wl12xx/wl1251_debugfs.c
index 866303dd6877..a00723059f83 100644
--- a/drivers/net/wireless/wl12xx/wl1251_debugfs.c
+++ b/drivers/net/wireless/wl12xx/wl1251_debugfs.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * This file is part of wl12xx 2 * This file is part of wl1251
3 * 3 *
4 * Copyright (C) 2009 Nokia Corporation 4 * Copyright (C) 2009 Nokia Corporation
5 * 5 *
@@ -30,7 +30,7 @@
30#include "wl1251_ps.h" 30#include "wl1251_ps.h"
31 31
32/* ms */ 32/* ms */
33#define WL12XX_DEBUGFS_STATS_LIFETIME 1000 33#define WL1251_DEBUGFS_STATS_LIFETIME 1000
34 34
35/* debugfs macros idea from mac80211 */ 35/* debugfs macros idea from mac80211 */
36 36
@@ -38,7 +38,7 @@
38static ssize_t name## _read(struct file *file, char __user *userbuf, \ 38static ssize_t name## _read(struct file *file, char __user *userbuf, \
39 size_t count, loff_t *ppos) \ 39 size_t count, loff_t *ppos) \
40{ \ 40{ \
41 struct wl12xx *wl = file->private_data; \ 41 struct wl1251 *wl = file->private_data; \
42 char buf[buflen]; \ 42 char buf[buflen]; \
43 int res; \ 43 int res; \
44 \ 44 \
@@ -48,7 +48,7 @@ static ssize_t name## _read(struct file *file, char __user *userbuf, \
48 \ 48 \
49static const struct file_operations name## _ops = { \ 49static const struct file_operations name## _ops = { \
50 .read = name## _read, \ 50 .read = name## _read, \
51 .open = wl12xx_open_file_generic, \ 51 .open = wl1251_open_file_generic, \
52}; 52};
53 53
54#define DEBUGFS_ADD(name, parent) \ 54#define DEBUGFS_ADD(name, parent) \
@@ -71,11 +71,11 @@ static ssize_t sub## _ ##name## _read(struct file *file, \
71 char __user *userbuf, \ 71 char __user *userbuf, \
72 size_t count, loff_t *ppos) \ 72 size_t count, loff_t *ppos) \
73{ \ 73{ \
74 struct wl12xx *wl = file->private_data; \ 74 struct wl1251 *wl = file->private_data; \
75 char buf[buflen]; \ 75 char buf[buflen]; \
76 int res; \ 76 int res; \
77 \ 77 \
78 wl12xx_debugfs_update_stats(wl); \ 78 wl1251_debugfs_update_stats(wl); \
79 \ 79 \
80 res = scnprintf(buf, buflen, fmt "\n", \ 80 res = scnprintf(buf, buflen, fmt "\n", \
81 wl->stats.fw_stats->sub.name); \ 81 wl->stats.fw_stats->sub.name); \
@@ -84,7 +84,7 @@ static ssize_t sub## _ ##name## _read(struct file *file, \
84 \ 84 \
85static const struct file_operations sub## _ ##name## _ops = { \ 85static const struct file_operations sub## _ ##name## _ops = { \
86 .read = sub## _ ##name## _read, \ 86 .read = sub## _ ##name## _read, \
87 .open = wl12xx_open_file_generic, \ 87 .open = wl1251_open_file_generic, \
88}; 88};
89 89
90#define DEBUGFS_FWSTATS_ADD(sub, name) \ 90#define DEBUGFS_FWSTATS_ADD(sub, name) \
@@ -93,30 +93,30 @@ static const struct file_operations sub## _ ##name## _ops = { \
93#define DEBUGFS_FWSTATS_DEL(sub, name) \ 93#define DEBUGFS_FWSTATS_DEL(sub, name) \
94 DEBUGFS_DEL(sub## _ ##name) 94 DEBUGFS_DEL(sub## _ ##name)
95 95
96static void wl12xx_debugfs_update_stats(struct wl12xx *wl) 96static void wl1251_debugfs_update_stats(struct wl1251 *wl)
97{ 97{
98 int ret; 98 int ret;
99 99
100 mutex_lock(&wl->mutex); 100 mutex_lock(&wl->mutex);
101 101
102 ret = wl12xx_ps_elp_wakeup(wl); 102 ret = wl1251_ps_elp_wakeup(wl);
103 if (ret < 0) 103 if (ret < 0)
104 goto out; 104 goto out;
105 105
106 if (wl->state == WL12XX_STATE_ON && 106 if (wl->state == WL1251_STATE_ON &&
107 time_after(jiffies, wl->stats.fw_stats_update + 107 time_after(jiffies, wl->stats.fw_stats_update +
108 msecs_to_jiffies(WL12XX_DEBUGFS_STATS_LIFETIME))) { 108 msecs_to_jiffies(WL1251_DEBUGFS_STATS_LIFETIME))) {
109 wl12xx_acx_statistics(wl, wl->stats.fw_stats); 109 wl1251_acx_statistics(wl, wl->stats.fw_stats);
110 wl->stats.fw_stats_update = jiffies; 110 wl->stats.fw_stats_update = jiffies;
111 } 111 }
112 112
113 wl12xx_ps_elp_sleep(wl); 113 wl1251_ps_elp_sleep(wl);
114 114
115out: 115out:
116 mutex_unlock(&wl->mutex); 116 mutex_unlock(&wl->mutex);
117} 117}
118 118
119static int wl12xx_open_file_generic(struct inode *inode, struct file *file) 119static int wl1251_open_file_generic(struct inode *inode, struct file *file)
120{ 120{
121 file->private_data = inode->i_private; 121 file->private_data = inode->i_private;
122 return 0; 122 return 0;
@@ -221,7 +221,7 @@ DEBUGFS_READONLY_FILE(excessive_retries, 20, "%u",
221static ssize_t tx_queue_len_read(struct file *file, char __user *userbuf, 221static ssize_t tx_queue_len_read(struct file *file, char __user *userbuf,
222 size_t count, loff_t *ppos) 222 size_t count, loff_t *ppos)
223{ 223{
224 struct wl12xx *wl = file->private_data; 224 struct wl1251 *wl = file->private_data;
225 u32 queue_len; 225 u32 queue_len;
226 char buf[20]; 226 char buf[20];
227 int res; 227 int res;
@@ -234,10 +234,10 @@ static ssize_t tx_queue_len_read(struct file *file, char __user *userbuf,
234 234
235static const struct file_operations tx_queue_len_ops = { 235static const struct file_operations tx_queue_len_ops = {
236 .read = tx_queue_len_read, 236 .read = tx_queue_len_read,
237 .open = wl12xx_open_file_generic, 237 .open = wl1251_open_file_generic,
238}; 238};
239 239
240static void wl12xx_debugfs_delete_files(struct wl12xx *wl) 240static void wl1251_debugfs_delete_files(struct wl1251 *wl)
241{ 241{
242 DEBUGFS_FWSTATS_DEL(tx, internal_desc_overflow); 242 DEBUGFS_FWSTATS_DEL(tx, internal_desc_overflow);
243 243
@@ -335,7 +335,7 @@ static void wl12xx_debugfs_delete_files(struct wl12xx *wl)
335 DEBUGFS_DEL(excessive_retries); 335 DEBUGFS_DEL(excessive_retries);
336} 336}
337 337
338static int wl12xx_debugfs_add_files(struct wl12xx *wl) 338static int wl1251_debugfs_add_files(struct wl1251 *wl)
339{ 339{
340 int ret = 0; 340 int ret = 0;
341 341
@@ -436,19 +436,19 @@ static int wl12xx_debugfs_add_files(struct wl12xx *wl)
436 436
437out: 437out:
438 if (ret < 0) 438 if (ret < 0)
439 wl12xx_debugfs_delete_files(wl); 439 wl1251_debugfs_delete_files(wl);
440 440
441 return ret; 441 return ret;
442} 442}
443 443
444void wl12xx_debugfs_reset(struct wl12xx *wl) 444void wl1251_debugfs_reset(struct wl1251 *wl)
445{ 445{
446 memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats)); 446 memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats));
447 wl->stats.retry_count = 0; 447 wl->stats.retry_count = 0;
448 wl->stats.excessive_retries = 0; 448 wl->stats.excessive_retries = 0;
449} 449}
450 450
451int wl12xx_debugfs_init(struct wl12xx *wl) 451int wl1251_debugfs_init(struct wl1251 *wl)
452{ 452{
453 int ret; 453 int ret;
454 454
@@ -479,7 +479,7 @@ int wl12xx_debugfs_init(struct wl12xx *wl)
479 479
480 wl->stats.fw_stats_update = jiffies; 480 wl->stats.fw_stats_update = jiffies;
481 481
482 ret = wl12xx_debugfs_add_files(wl); 482 ret = wl1251_debugfs_add_files(wl);
483 483
484 if (ret < 0) 484 if (ret < 0)
485 goto err_file; 485 goto err_file;
@@ -502,9 +502,9 @@ err:
502 return ret; 502 return ret;
503} 503}
504 504
505void wl12xx_debugfs_exit(struct wl12xx *wl) 505void wl1251_debugfs_exit(struct wl1251 *wl)
506{ 506{
507 wl12xx_debugfs_delete_files(wl); 507 wl1251_debugfs_delete_files(wl);
508 508
509 kfree(wl->stats.fw_stats); 509 kfree(wl->stats.fw_stats);
510 wl->stats.fw_stats = NULL; 510 wl->stats.fw_stats = NULL;