aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-04-12 13:49:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 13:49:28 -0400
commit8065248069097dddf9945acfb2081025e9618c16 (patch)
treeeddf3fb0372ba0f65c01382d386942ea8d18932d /drivers/net/wireless/ath
parente66a8ddff72e85605f2212a0ebc666c7e9116641 (diff)
parentb4838d12e1f3cb48c2489a0b08733b5dbf848297 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath5k/debug.c23
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c42
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c37
-rw-r--r--drivers/net/wireless/ath/ath9k/dfs_debug.c9
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_debug.c26
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c8
-rw-r--r--drivers/net/wireless/ath/carl9170/debug.c7
8 files changed, 60 insertions, 104 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index 9be885707e2..9d00dab666a 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -74,13 +74,6 @@ static unsigned int ath5k_debug;
74module_param_named(debug, ath5k_debug, uint, 0); 74module_param_named(debug, ath5k_debug, uint, 0);
75 75
76 76
77static int ath5k_debugfs_open(struct inode *inode, struct file *file)
78{
79 file->private_data = inode->i_private;
80 return 0;
81}
82
83
84/* debugfs: registers */ 77/* debugfs: registers */
85 78
86struct reg { 79struct reg {
@@ -268,7 +261,7 @@ static ssize_t write_file_beacon(struct file *file,
268static const struct file_operations fops_beacon = { 261static const struct file_operations fops_beacon = {
269 .read = read_file_beacon, 262 .read = read_file_beacon,
270 .write = write_file_beacon, 263 .write = write_file_beacon,
271 .open = ath5k_debugfs_open, 264 .open = simple_open,
272 .owner = THIS_MODULE, 265 .owner = THIS_MODULE,
273 .llseek = default_llseek, 266 .llseek = default_llseek,
274}; 267};
@@ -288,7 +281,7 @@ static ssize_t write_file_reset(struct file *file,
288 281
289static const struct file_operations fops_reset = { 282static const struct file_operations fops_reset = {
290 .write = write_file_reset, 283 .write = write_file_reset,
291 .open = ath5k_debugfs_open, 284 .open = simple_open,
292 .owner = THIS_MODULE, 285 .owner = THIS_MODULE,
293 .llseek = noop_llseek, 286 .llseek = noop_llseek,
294}; 287};
@@ -368,7 +361,7 @@ static ssize_t write_file_debug(struct file *file,
368static const struct file_operations fops_debug = { 361static const struct file_operations fops_debug = {
369 .read = read_file_debug, 362 .read = read_file_debug,
370 .write = write_file_debug, 363 .write = write_file_debug,
371 .open = ath5k_debugfs_open, 364 .open = simple_open,
372 .owner = THIS_MODULE, 365 .owner = THIS_MODULE,
373 .llseek = default_llseek, 366 .llseek = default_llseek,
374}; 367};
@@ -480,7 +473,7 @@ static ssize_t write_file_antenna(struct file *file,
480static const struct file_operations fops_antenna = { 473static const struct file_operations fops_antenna = {
481 .read = read_file_antenna, 474 .read = read_file_antenna,
482 .write = write_file_antenna, 475 .write = write_file_antenna,
483 .open = ath5k_debugfs_open, 476 .open = simple_open,
484 .owner = THIS_MODULE, 477 .owner = THIS_MODULE,
485 .llseek = default_llseek, 478 .llseek = default_llseek,
486}; 479};
@@ -535,7 +528,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
535 528
536static const struct file_operations fops_misc = { 529static const struct file_operations fops_misc = {
537 .read = read_file_misc, 530 .read = read_file_misc,
538 .open = ath5k_debugfs_open, 531 .open = simple_open,
539 .owner = THIS_MODULE, 532 .owner = THIS_MODULE,
540}; 533};
541 534
@@ -650,7 +643,7 @@ static ssize_t write_file_frameerrors(struct file *file,
650static const struct file_operations fops_frameerrors = { 643static const struct file_operations fops_frameerrors = {
651 .read = read_file_frameerrors, 644 .read = read_file_frameerrors,
652 .write = write_file_frameerrors, 645 .write = write_file_frameerrors,
653 .open = ath5k_debugfs_open, 646 .open = simple_open,
654 .owner = THIS_MODULE, 647 .owner = THIS_MODULE,
655 .llseek = default_llseek, 648 .llseek = default_llseek,
656}; 649};
@@ -813,7 +806,7 @@ static ssize_t write_file_ani(struct file *file,
813static const struct file_operations fops_ani = { 806static const struct file_operations fops_ani = {
814 .read = read_file_ani, 807 .read = read_file_ani,
815 .write = write_file_ani, 808 .write = write_file_ani,
816 .open = ath5k_debugfs_open, 809 .open = simple_open,
817 .owner = THIS_MODULE, 810 .owner = THIS_MODULE,
818 .llseek = default_llseek, 811 .llseek = default_llseek,
819}; 812};
@@ -884,7 +877,7 @@ static ssize_t write_file_queue(struct file *file,
884static const struct file_operations fops_queue = { 877static const struct file_operations fops_queue = {
885 .read = read_file_queue, 878 .read = read_file_queue,
886 .write = write_file_queue, 879 .write = write_file_queue,
887 .open = ath5k_debugfs_open, 880 .open = simple_open,
888 .owner = THIS_MODULE, 881 .owner = THIS_MODULE,
889 .llseek = default_llseek, 882 .llseek = default_llseek,
890}; 883};
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 552adb3f80d..d01403a263f 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -217,12 +217,6 @@ void dump_cred_dist_stats(struct htc_target *target)
217 target->credit_info->cur_free_credits); 217 target->credit_info->cur_free_credits);
218} 218}
219 219
220static int ath6kl_debugfs_open(struct inode *inode, struct file *file)
221{
222 file->private_data = inode->i_private;
223 return 0;
224}
225
226void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war) 220void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war)
227{ 221{
228 switch (war) { 222 switch (war) {
@@ -263,7 +257,7 @@ static ssize_t read_file_war_stats(struct file *file, char __user *user_buf,
263 257
264static const struct file_operations fops_war_stats = { 258static const struct file_operations fops_war_stats = {
265 .read = read_file_war_stats, 259 .read = read_file_war_stats,
266 .open = ath6kl_debugfs_open, 260 .open = simple_open,
267 .owner = THIS_MODULE, 261 .owner = THIS_MODULE,
268 .llseek = default_llseek, 262 .llseek = default_llseek,
269}; 263};
@@ -488,7 +482,7 @@ static ssize_t ath6kl_fwlog_mask_write(struct file *file,
488} 482}
489 483
490static const struct file_operations fops_fwlog_mask = { 484static const struct file_operations fops_fwlog_mask = {
491 .open = ath6kl_debugfs_open, 485 .open = simple_open,
492 .read = ath6kl_fwlog_mask_read, 486 .read = ath6kl_fwlog_mask_read,
493 .write = ath6kl_fwlog_mask_write, 487 .write = ath6kl_fwlog_mask_write,
494 .owner = THIS_MODULE, 488 .owner = THIS_MODULE,
@@ -634,7 +628,7 @@ static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf,
634 628
635static const struct file_operations fops_tgt_stats = { 629static const struct file_operations fops_tgt_stats = {
636 .read = read_file_tgt_stats, 630 .read = read_file_tgt_stats,
637 .open = ath6kl_debugfs_open, 631 .open = simple_open,
638 .owner = THIS_MODULE, 632 .owner = THIS_MODULE,
639 .llseek = default_llseek, 633 .llseek = default_llseek,
640}; 634};
@@ -699,7 +693,7 @@ static ssize_t read_file_credit_dist_stats(struct file *file,
699 693
700static const struct file_operations fops_credit_dist_stats = { 694static const struct file_operations fops_credit_dist_stats = {
701 .read = read_file_credit_dist_stats, 695 .read = read_file_credit_dist_stats,
702 .open = ath6kl_debugfs_open, 696 .open = simple_open,
703 .owner = THIS_MODULE, 697 .owner = THIS_MODULE,
704 .llseek = default_llseek, 698 .llseek = default_llseek,
705}; 699};
@@ -802,7 +796,7 @@ static ssize_t ath6kl_endpoint_stats_write(struct file *file,
802} 796}
803 797
804static const struct file_operations fops_endpoint_stats = { 798static const struct file_operations fops_endpoint_stats = {
805 .open = ath6kl_debugfs_open, 799 .open = simple_open,
806 .read = ath6kl_endpoint_stats_read, 800 .read = ath6kl_endpoint_stats_read,
807 .write = ath6kl_endpoint_stats_write, 801 .write = ath6kl_endpoint_stats_write,
808 .owner = THIS_MODULE, 802 .owner = THIS_MODULE,
@@ -875,7 +869,7 @@ static ssize_t ath6kl_regread_write(struct file *file,
875static const struct file_operations fops_diag_reg_read = { 869static const struct file_operations fops_diag_reg_read = {
876 .read = ath6kl_regread_read, 870 .read = ath6kl_regread_read,
877 .write = ath6kl_regread_write, 871 .write = ath6kl_regread_write,
878 .open = ath6kl_debugfs_open, 872 .open = simple_open,
879 .owner = THIS_MODULE, 873 .owner = THIS_MODULE,
880 .llseek = default_llseek, 874 .llseek = default_llseek,
881}; 875};
@@ -999,7 +993,7 @@ static ssize_t ath6kl_lrssi_roam_read(struct file *file,
999static const struct file_operations fops_lrssi_roam_threshold = { 993static const struct file_operations fops_lrssi_roam_threshold = {
1000 .read = ath6kl_lrssi_roam_read, 994 .read = ath6kl_lrssi_roam_read,
1001 .write = ath6kl_lrssi_roam_write, 995 .write = ath6kl_lrssi_roam_write,
1002 .open = ath6kl_debugfs_open, 996 .open = simple_open,
1003 .owner = THIS_MODULE, 997 .owner = THIS_MODULE,
1004 .llseek = default_llseek, 998 .llseek = default_llseek,
1005}; 999};
@@ -1061,7 +1055,7 @@ static ssize_t ath6kl_regwrite_write(struct file *file,
1061static const struct file_operations fops_diag_reg_write = { 1055static const struct file_operations fops_diag_reg_write = {
1062 .read = ath6kl_regwrite_read, 1056 .read = ath6kl_regwrite_read,
1063 .write = ath6kl_regwrite_write, 1057 .write = ath6kl_regwrite_write,
1064 .open = ath6kl_debugfs_open, 1058 .open = simple_open,
1065 .owner = THIS_MODULE, 1059 .owner = THIS_MODULE,
1066 .llseek = default_llseek, 1060 .llseek = default_llseek,
1067}; 1061};
@@ -1166,7 +1160,7 @@ static ssize_t ath6kl_roam_table_read(struct file *file, char __user *user_buf,
1166 1160
1167static const struct file_operations fops_roam_table = { 1161static const struct file_operations fops_roam_table = {
1168 .read = ath6kl_roam_table_read, 1162 .read = ath6kl_roam_table_read,
1169 .open = ath6kl_debugfs_open, 1163 .open = simple_open,
1170 .owner = THIS_MODULE, 1164 .owner = THIS_MODULE,
1171 .llseek = default_llseek, 1165 .llseek = default_llseek,
1172}; 1166};
@@ -1204,7 +1198,7 @@ static ssize_t ath6kl_force_roam_write(struct file *file,
1204 1198
1205static const struct file_operations fops_force_roam = { 1199static const struct file_operations fops_force_roam = {
1206 .write = ath6kl_force_roam_write, 1200 .write = ath6kl_force_roam_write,
1207 .open = ath6kl_debugfs_open, 1201 .open = simple_open,
1208 .owner = THIS_MODULE, 1202 .owner = THIS_MODULE,
1209 .llseek = default_llseek, 1203 .llseek = default_llseek,
1210}; 1204};
@@ -1244,7 +1238,7 @@ static ssize_t ath6kl_roam_mode_write(struct file *file,
1244 1238
1245static const struct file_operations fops_roam_mode = { 1239static const struct file_operations fops_roam_mode = {
1246 .write = ath6kl_roam_mode_write, 1240 .write = ath6kl_roam_mode_write,
1247 .open = ath6kl_debugfs_open, 1241 .open = simple_open,
1248 .owner = THIS_MODULE, 1242 .owner = THIS_MODULE,
1249 .llseek = default_llseek, 1243 .llseek = default_llseek,
1250}; 1244};
@@ -1286,7 +1280,7 @@ static ssize_t ath6kl_keepalive_write(struct file *file,
1286} 1280}
1287 1281
1288static const struct file_operations fops_keepalive = { 1282static const struct file_operations fops_keepalive = {
1289 .open = ath6kl_debugfs_open, 1283 .open = simple_open,
1290 .read = ath6kl_keepalive_read, 1284 .read = ath6kl_keepalive_read,
1291 .write = ath6kl_keepalive_write, 1285 .write = ath6kl_keepalive_write,
1292 .owner = THIS_MODULE, 1286 .owner = THIS_MODULE,
@@ -1331,7 +1325,7 @@ static ssize_t ath6kl_disconnect_timeout_write(struct file *file,
1331} 1325}
1332 1326
1333static const struct file_operations fops_disconnect_timeout = { 1327static const struct file_operations fops_disconnect_timeout = {
1334 .open = ath6kl_debugfs_open, 1328 .open = simple_open,
1335 .read = ath6kl_disconnect_timeout_read, 1329 .read = ath6kl_disconnect_timeout_read,
1336 .write = ath6kl_disconnect_timeout_write, 1330 .write = ath6kl_disconnect_timeout_write,
1337 .owner = THIS_MODULE, 1331 .owner = THIS_MODULE,
@@ -1512,7 +1506,7 @@ static ssize_t ath6kl_create_qos_write(struct file *file,
1512 1506
1513static const struct file_operations fops_create_qos = { 1507static const struct file_operations fops_create_qos = {
1514 .write = ath6kl_create_qos_write, 1508 .write = ath6kl_create_qos_write,
1515 .open = ath6kl_debugfs_open, 1509 .open = simple_open,
1516 .owner = THIS_MODULE, 1510 .owner = THIS_MODULE,
1517 .llseek = default_llseek, 1511 .llseek = default_llseek,
1518}; 1512};
@@ -1560,7 +1554,7 @@ static ssize_t ath6kl_delete_qos_write(struct file *file,
1560 1554
1561static const struct file_operations fops_delete_qos = { 1555static const struct file_operations fops_delete_qos = {
1562 .write = ath6kl_delete_qos_write, 1556 .write = ath6kl_delete_qos_write,
1563 .open = ath6kl_debugfs_open, 1557 .open = simple_open,
1564 .owner = THIS_MODULE, 1558 .owner = THIS_MODULE,
1565 .llseek = default_llseek, 1559 .llseek = default_llseek,
1566}; 1560};
@@ -1593,7 +1587,7 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,
1593 1587
1594static const struct file_operations fops_bgscan_int = { 1588static const struct file_operations fops_bgscan_int = {
1595 .write = ath6kl_bgscan_int_write, 1589 .write = ath6kl_bgscan_int_write,
1596 .open = ath6kl_debugfs_open, 1590 .open = simple_open,
1597 .owner = THIS_MODULE, 1591 .owner = THIS_MODULE,
1598 .llseek = default_llseek, 1592 .llseek = default_llseek,
1599}; 1593};
@@ -1651,7 +1645,7 @@ static ssize_t ath6kl_listen_int_read(struct file *file,
1651static const struct file_operations fops_listen_int = { 1645static const struct file_operations fops_listen_int = {
1652 .read = ath6kl_listen_int_read, 1646 .read = ath6kl_listen_int_read,
1653 .write = ath6kl_listen_int_write, 1647 .write = ath6kl_listen_int_write,
1654 .open = ath6kl_debugfs_open, 1648 .open = simple_open,
1655 .owner = THIS_MODULE, 1649 .owner = THIS_MODULE,
1656 .llseek = default_llseek, 1650 .llseek = default_llseek,
1657}; 1651};
@@ -1711,7 +1705,7 @@ static ssize_t ath6kl_power_params_write(struct file *file,
1711 1705
1712static const struct file_operations fops_power_params = { 1706static const struct file_operations fops_power_params = {
1713 .write = ath6kl_power_params_write, 1707 .write = ath6kl_power_params_write,
1714 .open = ath6kl_debugfs_open, 1708 .open = simple_open,
1715 .owner = THIS_MODULE, 1709 .owner = THIS_MODULE,
1716 .llseek = default_llseek, 1710 .llseek = default_llseek,
1717}; 1711};
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 244723a3ed4..04edce941cb 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -26,11 +26,6 @@
26#define REG_READ_D(_ah, _reg) \ 26#define REG_READ_D(_ah, _reg) \
27 ath9k_hw_common(_ah)->ops->read((_ah), (_reg)) 27 ath9k_hw_common(_ah)->ops->read((_ah), (_reg))
28 28
29static int ath9k_debugfs_open(struct inode *inode, struct file *file)
30{
31 file->private_data = inode->i_private;
32 return 0;
33}
34 29
35static ssize_t ath9k_debugfs_read_buf(struct file *file, char __user *user_buf, 30static ssize_t ath9k_debugfs_read_buf(struct file *file, char __user *user_buf,
36 size_t count, loff_t *ppos) 31 size_t count, loff_t *ppos)
@@ -83,7 +78,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf,
83static const struct file_operations fops_debug = { 78static const struct file_operations fops_debug = {
84 .read = read_file_debug, 79 .read = read_file_debug,
85 .write = write_file_debug, 80 .write = write_file_debug,
86 .open = ath9k_debugfs_open, 81 .open = simple_open,
87 .owner = THIS_MODULE, 82 .owner = THIS_MODULE,
88 .llseek = default_llseek, 83 .llseek = default_llseek,
89}; 84};
@@ -129,7 +124,7 @@ static ssize_t write_file_tx_chainmask(struct file *file, const char __user *use
129static const struct file_operations fops_tx_chainmask = { 124static const struct file_operations fops_tx_chainmask = {
130 .read = read_file_tx_chainmask, 125 .read = read_file_tx_chainmask,
131 .write = write_file_tx_chainmask, 126 .write = write_file_tx_chainmask,
132 .open = ath9k_debugfs_open, 127 .open = simple_open,
133 .owner = THIS_MODULE, 128 .owner = THIS_MODULE,
134 .llseek = default_llseek, 129 .llseek = default_llseek,
135}; 130};
@@ -172,7 +167,7 @@ static ssize_t write_file_rx_chainmask(struct file *file, const char __user *use
172static const struct file_operations fops_rx_chainmask = { 167static const struct file_operations fops_rx_chainmask = {
173 .read = read_file_rx_chainmask, 168 .read = read_file_rx_chainmask,
174 .write = write_file_rx_chainmask, 169 .write = write_file_rx_chainmask,
175 .open = ath9k_debugfs_open, 170 .open = simple_open,
176 .owner = THIS_MODULE, 171 .owner = THIS_MODULE,
177 .llseek = default_llseek, 172 .llseek = default_llseek,
178}; 173};
@@ -223,7 +218,7 @@ static ssize_t write_file_disable_ani(struct file *file,
223static const struct file_operations fops_disable_ani = { 218static const struct file_operations fops_disable_ani = {
224 .read = read_file_disable_ani, 219 .read = read_file_disable_ani,
225 .write = write_file_disable_ani, 220 .write = write_file_disable_ani,
226 .open = ath9k_debugfs_open, 221 .open = simple_open,
227 .owner = THIS_MODULE, 222 .owner = THIS_MODULE,
228 .llseek = default_llseek, 223 .llseek = default_llseek,
229}; 224};
@@ -324,7 +319,7 @@ static ssize_t read_file_dma(struct file *file, char __user *user_buf,
324 319
325static const struct file_operations fops_dma = { 320static const struct file_operations fops_dma = {
326 .read = read_file_dma, 321 .read = read_file_dma,
327 .open = ath9k_debugfs_open, 322 .open = simple_open,
328 .owner = THIS_MODULE, 323 .owner = THIS_MODULE,
329 .llseek = default_llseek, 324 .llseek = default_llseek,
330}; 325};
@@ -446,7 +441,7 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
446 441
447static const struct file_operations fops_interrupt = { 442static const struct file_operations fops_interrupt = {
448 .read = read_file_interrupt, 443 .read = read_file_interrupt,
449 .open = ath9k_debugfs_open, 444 .open = simple_open,
450 .owner = THIS_MODULE, 445 .owner = THIS_MODULE,
451 .llseek = default_llseek, 446 .llseek = default_llseek,
452}; 447};
@@ -853,28 +848,28 @@ void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
853 848
854static const struct file_operations fops_xmit = { 849static const struct file_operations fops_xmit = {
855 .read = read_file_xmit, 850 .read = read_file_xmit,
856 .open = ath9k_debugfs_open, 851 .open = simple_open,
857 .owner = THIS_MODULE, 852 .owner = THIS_MODULE,
858 .llseek = default_llseek, 853 .llseek = default_llseek,
859}; 854};
860 855
861static const struct file_operations fops_stations = { 856static const struct file_operations fops_stations = {
862 .read = read_file_stations, 857 .read = read_file_stations,
863 .open = ath9k_debugfs_open, 858 .open = simple_open,
864 .owner = THIS_MODULE, 859 .owner = THIS_MODULE,
865 .llseek = default_llseek, 860 .llseek = default_llseek,
866}; 861};
867 862
868static const struct file_operations fops_misc = { 863static const struct file_operations fops_misc = {
869 .read = read_file_misc, 864 .read = read_file_misc,
870 .open = ath9k_debugfs_open, 865 .open = simple_open,
871 .owner = THIS_MODULE, 866 .owner = THIS_MODULE,
872 .llseek = default_llseek, 867 .llseek = default_llseek,
873}; 868};
874 869
875static const struct file_operations fops_reset = { 870static const struct file_operations fops_reset = {
876 .read = read_file_reset, 871 .read = read_file_reset,
877 .open = ath9k_debugfs_open, 872 .open = simple_open,
878 .owner = THIS_MODULE, 873 .owner = THIS_MODULE,
879 .llseek = default_llseek, 874 .llseek = default_llseek,
880}; 875};
@@ -1036,7 +1031,7 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
1036 1031
1037static const struct file_operations fops_recv = { 1032static const struct file_operations fops_recv = {
1038 .read = read_file_recv, 1033 .read = read_file_recv,
1039 .open = ath9k_debugfs_open, 1034 .open = simple_open,
1040 .owner = THIS_MODULE, 1035 .owner = THIS_MODULE,
1041 .llseek = default_llseek, 1036 .llseek = default_llseek,
1042}; 1037};
@@ -1075,7 +1070,7 @@ static ssize_t write_file_regidx(struct file *file, const char __user *user_buf,
1075static const struct file_operations fops_regidx = { 1070static const struct file_operations fops_regidx = {
1076 .read = read_file_regidx, 1071 .read = read_file_regidx,
1077 .write = write_file_regidx, 1072 .write = write_file_regidx,
1078 .open = ath9k_debugfs_open, 1073 .open = simple_open,
1079 .owner = THIS_MODULE, 1074 .owner = THIS_MODULE,
1080 .llseek = default_llseek, 1075 .llseek = default_llseek,
1081}; 1076};
@@ -1122,7 +1117,7 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
1122static const struct file_operations fops_regval = { 1117static const struct file_operations fops_regval = {
1123 .read = read_file_regval, 1118 .read = read_file_regval,
1124 .write = write_file_regval, 1119 .write = write_file_regval,
1125 .open = ath9k_debugfs_open, 1120 .open = simple_open,
1126 .owner = THIS_MODULE, 1121 .owner = THIS_MODULE,
1127 .llseek = default_llseek, 1122 .llseek = default_llseek,
1128}; 1123};
@@ -1211,7 +1206,7 @@ static ssize_t read_file_dump_nfcal(struct file *file, char __user *user_buf,
1211 1206
1212static const struct file_operations fops_dump_nfcal = { 1207static const struct file_operations fops_dump_nfcal = {
1213 .read = read_file_dump_nfcal, 1208 .read = read_file_dump_nfcal,
1214 .open = ath9k_debugfs_open, 1209 .open = simple_open,
1215 .owner = THIS_MODULE, 1210 .owner = THIS_MODULE,
1216 .llseek = default_llseek, 1211 .llseek = default_llseek,
1217}; 1212};
@@ -1239,7 +1234,7 @@ static ssize_t read_file_base_eeprom(struct file *file, char __user *user_buf,
1239 1234
1240static const struct file_operations fops_base_eeprom = { 1235static const struct file_operations fops_base_eeprom = {
1241 .read = read_file_base_eeprom, 1236 .read = read_file_base_eeprom,
1242 .open = ath9k_debugfs_open, 1237 .open = simple_open,
1243 .owner = THIS_MODULE, 1238 .owner = THIS_MODULE,
1244 .llseek = default_llseek, 1239 .llseek = default_llseek,
1245}; 1240};
@@ -1267,7 +1262,7 @@ static ssize_t read_file_modal_eeprom(struct file *file, char __user *user_buf,
1267 1262
1268static const struct file_operations fops_modal_eeprom = { 1263static const struct file_operations fops_modal_eeprom = {
1269 .read = read_file_modal_eeprom, 1264 .read = read_file_modal_eeprom,
1270 .open = ath9k_debugfs_open, 1265 .open = simple_open,
1271 .owner = THIS_MODULE, 1266 .owner = THIS_MODULE,
1272 .llseek = default_llseek, 1267 .llseek = default_llseek,
1273}; 1268};
diff --git a/drivers/net/wireless/ath/ath9k/dfs_debug.c b/drivers/net/wireless/ath/ath9k/dfs_debug.c
index 106d031d834..4364c103ed3 100644
--- a/drivers/net/wireless/ath/ath9k/dfs_debug.c
+++ b/drivers/net/wireless/ath/ath9k/dfs_debug.c
@@ -60,16 +60,9 @@ static ssize_t read_file_dfs(struct file *file, char __user *user_buf,
60 return retval; 60 return retval;
61} 61}
62 62
63static int ath9k_dfs_debugfs_open(struct inode *inode, struct file *file)
64{
65 file->private_data = inode->i_private;
66
67 return 0;
68}
69
70static const struct file_operations fops_dfs_stats = { 63static const struct file_operations fops_dfs_stats = {
71 .read = read_file_dfs, 64 .read = read_file_dfs,
72 .open = ath9k_dfs_debugfs_open, 65 .open = simple_open,
73 .owner = THIS_MODULE, 66 .owner = THIS_MODULE,
74 .llseek = default_llseek, 67 .llseek = default_llseek,
75}; 68};
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index d3ff33c71aa..3035deb7a0c 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -16,12 +16,6 @@
16 16
17#include "htc.h" 17#include "htc.h"
18 18
19static int ath9k_debugfs_open(struct inode *inode, struct file *file)
20{
21 file->private_data = inode->i_private;
22 return 0;
23}
24
25static ssize_t read_file_tgt_int_stats(struct file *file, char __user *user_buf, 19static ssize_t read_file_tgt_int_stats(struct file *file, char __user *user_buf,
26 size_t count, loff_t *ppos) 20 size_t count, loff_t *ppos)
27{ 21{
@@ -75,7 +69,7 @@ static ssize_t read_file_tgt_int_stats(struct file *file, char __user *user_buf,
75 69
76static const struct file_operations fops_tgt_int_stats = { 70static const struct file_operations fops_tgt_int_stats = {
77 .read = read_file_tgt_int_stats, 71 .read = read_file_tgt_int_stats,
78 .open = ath9k_debugfs_open, 72 .open = simple_open,
79 .owner = THIS_MODULE, 73 .owner = THIS_MODULE,
80 .llseek = default_llseek, 74 .llseek = default_llseek,
81}; 75};
@@ -145,7 +139,7 @@ static ssize_t read_file_tgt_tx_stats(struct file *file, char __user *user_buf,
145 139
146static const struct file_operations fops_tgt_tx_stats = { 140static const struct file_operations fops_tgt_tx_stats = {
147 .read = read_file_tgt_tx_stats, 141 .read = read_file_tgt_tx_stats,
148 .open = ath9k_debugfs_open, 142 .open = simple_open,
149 .owner = THIS_MODULE, 143 .owner = THIS_MODULE,
150 .llseek = default_llseek, 144 .llseek = default_llseek,
151}; 145};
@@ -191,7 +185,7 @@ static ssize_t read_file_tgt_rx_stats(struct file *file, char __user *user_buf,
191 185
192static const struct file_operations fops_tgt_rx_stats = { 186static const struct file_operations fops_tgt_rx_stats = {
193 .read = read_file_tgt_rx_stats, 187 .read = read_file_tgt_rx_stats,
194 .open = ath9k_debugfs_open, 188 .open = simple_open,
195 .owner = THIS_MODULE, 189 .owner = THIS_MODULE,
196 .llseek = default_llseek, 190 .llseek = default_llseek,
197}; 191};
@@ -243,7 +237,7 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
243 237
244static const struct file_operations fops_xmit = { 238static const struct file_operations fops_xmit = {
245 .read = read_file_xmit, 239 .read = read_file_xmit,
246 .open = ath9k_debugfs_open, 240 .open = simple_open,
247 .owner = THIS_MODULE, 241 .owner = THIS_MODULE,
248 .llseek = default_llseek, 242 .llseek = default_llseek,
249}; 243};
@@ -364,7 +358,7 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf,
364 358
365static const struct file_operations fops_recv = { 359static const struct file_operations fops_recv = {
366 .read = read_file_recv, 360 .read = read_file_recv,
367 .open = ath9k_debugfs_open, 361 .open = simple_open,
368 .owner = THIS_MODULE, 362 .owner = THIS_MODULE,
369 .llseek = default_llseek, 363 .llseek = default_llseek,
370}; 364};
@@ -399,7 +393,7 @@ static ssize_t read_file_slot(struct file *file, char __user *user_buf,
399 393
400static const struct file_operations fops_slot = { 394static const struct file_operations fops_slot = {
401 .read = read_file_slot, 395 .read = read_file_slot,
402 .open = ath9k_debugfs_open, 396 .open = simple_open,
403 .owner = THIS_MODULE, 397 .owner = THIS_MODULE,
404 .llseek = default_llseek, 398 .llseek = default_llseek,
405}; 399};
@@ -446,7 +440,7 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
446 440
447static const struct file_operations fops_queue = { 441static const struct file_operations fops_queue = {
448 .read = read_file_queue, 442 .read = read_file_queue,
449 .open = ath9k_debugfs_open, 443 .open = simple_open,
450 .owner = THIS_MODULE, 444 .owner = THIS_MODULE,
451 .llseek = default_llseek, 445 .llseek = default_llseek,
452}; 446};
@@ -487,7 +481,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf,
487static const struct file_operations fops_debug = { 481static const struct file_operations fops_debug = {
488 .read = read_file_debug, 482 .read = read_file_debug,
489 .write = write_file_debug, 483 .write = write_file_debug,
490 .open = ath9k_debugfs_open, 484 .open = simple_open,
491 .owner = THIS_MODULE, 485 .owner = THIS_MODULE,
492 .llseek = default_llseek, 486 .llseek = default_llseek,
493}; 487};
@@ -636,7 +630,7 @@ static ssize_t read_file_base_eeprom(struct file *file, char __user *user_buf,
636 630
637static const struct file_operations fops_base_eeprom = { 631static const struct file_operations fops_base_eeprom = {
638 .read = read_file_base_eeprom, 632 .read = read_file_base_eeprom,
639 .open = ath9k_debugfs_open, 633 .open = simple_open,
640 .owner = THIS_MODULE, 634 .owner = THIS_MODULE,
641 .llseek = default_llseek, 635 .llseek = default_llseek,
642}; 636};
@@ -917,7 +911,7 @@ static ssize_t read_file_modal_eeprom(struct file *file, char __user *user_buf,
917 911
918static const struct file_operations fops_modal_eeprom = { 912static const struct file_operations fops_modal_eeprom = {
919 .read = read_file_modal_eeprom, 913 .read = read_file_modal_eeprom,
920 .open = ath9k_debugfs_open, 914 .open = simple_open,
921 .owner = THIS_MODULE, 915 .owner = THIS_MODULE,
922 .llseek = default_llseek, 916 .llseek = default_llseek,
923}; 917};
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 5de648c243b..c8d12395718 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -118,15 +118,13 @@ void ath9k_ps_restore(struct ath_softc *sc)
118 if (--sc->ps_usecount != 0) 118 if (--sc->ps_usecount != 0)
119 goto unlock; 119 goto unlock;
120 120
121 if (sc->ps_flags & PS_WAIT_FOR_TX_ACK) 121 if (sc->ps_idle && (sc->ps_flags & PS_WAIT_FOR_TX_ACK))
122 goto unlock;
123
124 if (sc->ps_idle)
125 mode = ATH9K_PM_FULL_SLEEP; 122 mode = ATH9K_PM_FULL_SLEEP;
126 else if (sc->ps_enabled && 123 else if (sc->ps_enabled &&
127 !(sc->ps_flags & (PS_WAIT_FOR_BEACON | 124 !(sc->ps_flags & (PS_WAIT_FOR_BEACON |
128 PS_WAIT_FOR_CAB | 125 PS_WAIT_FOR_CAB |
129 PS_WAIT_FOR_PSPOLL_DATA))) 126 PS_WAIT_FOR_PSPOLL_DATA |
127 PS_WAIT_FOR_TX_ACK)))
130 mode = ATH9K_PM_NETWORK_SLEEP; 128 mode = ATH9K_PM_NETWORK_SLEEP;
131 else 129 else
132 goto unlock; 130 goto unlock;
@@ -642,7 +640,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
642 an->sta = sta; 640 an->sta = sta;
643 an->vif = vif; 641 an->vif = vif;
644 642
645 if (sta->ht_cap.ht_supported) { 643 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
646 ath_tx_node_init(sc, an); 644 ath_tx_node_init(sc, an);
647 an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + 645 an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
648 sta->ht_cap.ampdu_factor); 646 sta->ht_cap.ampdu_factor);
@@ -661,7 +659,7 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
661 an->sta = NULL; 659 an->sta = NULL;
662#endif 660#endif
663 661
664 if (sta->ht_cap.ht_supported) 662 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
665 ath_tx_node_cleanup(sc, an); 663 ath_tx_node_cleanup(sc, an);
666} 664}
667 665
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 5fff711fba1..92a6c0a87f8 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1479,12 +1479,6 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
1479 1479
1480#ifdef CONFIG_ATH9K_DEBUGFS 1480#ifdef CONFIG_ATH9K_DEBUGFS
1481 1481
1482static int ath9k_debugfs_open(struct inode *inode, struct file *file)
1483{
1484 file->private_data = inode->i_private;
1485 return 0;
1486}
1487
1488static ssize_t read_file_rcstat(struct file *file, char __user *user_buf, 1482static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
1489 size_t count, loff_t *ppos) 1483 size_t count, loff_t *ppos)
1490{ 1484{
@@ -1552,7 +1546,7 @@ static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
1552 1546
1553static const struct file_operations fops_rcstat = { 1547static const struct file_operations fops_rcstat = {
1554 .read = read_file_rcstat, 1548 .read = read_file_rcstat,
1555 .open = ath9k_debugfs_open, 1549 .open = simple_open,
1556 .owner = THIS_MODULE 1550 .owner = THIS_MODULE
1557}; 1551};
1558 1552
diff --git a/drivers/net/wireless/ath/carl9170/debug.c b/drivers/net/wireless/ath/carl9170/debug.c
index 3c164226687..93fe6003a49 100644
--- a/drivers/net/wireless/ath/carl9170/debug.c
+++ b/drivers/net/wireless/ath/carl9170/debug.c
@@ -48,11 +48,6 @@
48#define ADD(buf, off, max, fmt, args...) \ 48#define ADD(buf, off, max, fmt, args...) \
49 off += snprintf(&buf[off], max - off, fmt, ##args); 49 off += snprintf(&buf[off], max - off, fmt, ##args);
50 50
51static int carl9170_debugfs_open(struct inode *inode, struct file *file)
52{
53 file->private_data = inode->i_private;
54 return 0;
55}
56 51
57struct carl9170_debugfs_fops { 52struct carl9170_debugfs_fops {
58 unsigned int read_bufsize; 53 unsigned int read_bufsize;
@@ -178,7 +173,7 @@ static const struct carl9170_debugfs_fops carl_debugfs_##name ##_ops = {\
178 .attr = _attr, \ 173 .attr = _attr, \
179 .req_dev_state = _dstate, \ 174 .req_dev_state = _dstate, \
180 .fops = { \ 175 .fops = { \
181 .open = carl9170_debugfs_open, \ 176 .open = simple_open, \
182 .read = carl9170_debugfs_read, \ 177 .read = carl9170_debugfs_read, \
183 .write = carl9170_debugfs_write, \ 178 .write = carl9170_debugfs_write, \
184 .owner = THIS_MODULE \ 179 .owner = THIS_MODULE \