diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-04-23 17:25:51 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-04-23 17:27:56 -0400 |
commit | 56322f5e0d08476f72981f84dd0c784a830163a2 (patch) | |
tree | 8a6b430ad767ff7e47c333e4cd71b05e80b35747 /drivers/net/wireless | |
parent | 063c51667f4f1f17e277add5cefb4cbe97108d40 (diff) |
iwlwifi: remove TX/RX frame statistics
Keeping statistics per frame type really isn't
very useful, and needs a huge amount of code
so remove it. Since that is the only thing in
iwl-core.{c,h} now, those files can be killed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless')
23 files changed, 1 insertions, 417 deletions
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index f2cd67874cf4..406f297a9a56 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -5,7 +5,7 @@ iwlwifi-objs += iwl-ucode.o iwl-agn-tx.o iwl-debug.o | |||
5 | iwlwifi-objs += iwl-agn-lib.o iwl-agn-calib.o iwl-io.o | 5 | iwlwifi-objs += iwl-agn-lib.o iwl-agn-calib.o iwl-io.o |
6 | iwlwifi-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-rx.o | 6 | iwlwifi-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-rx.o |
7 | 7 | ||
8 | iwlwifi-objs += iwl-core.o iwl-eeprom.o iwl-power.o | 8 | iwlwifi-objs += iwl-eeprom.o iwl-power.o |
9 | iwlwifi-objs += iwl-scan.o iwl-led.o | 9 | iwlwifi-objs += iwl-scan.o iwl-led.o |
10 | iwlwifi-objs += iwl-agn-rxon.o iwl-agn-devices.o | 10 | iwlwifi-objs += iwl-agn-rxon.o iwl-agn-devices.o |
11 | iwlwifi-objs += iwl-5000.o | 11 | iwlwifi-objs += iwl-5000.o |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c index b088f9b7434a..95f27f1a423b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c | |||
@@ -64,7 +64,6 @@ | |||
64 | #include <net/mac80211.h> | 64 | #include <net/mac80211.h> |
65 | 65 | ||
66 | #include "iwl-dev.h" | 66 | #include "iwl-dev.h" |
67 | #include "iwl-core.h" | ||
68 | #include "iwl-agn-calib.h" | 67 | #include "iwl-agn-calib.h" |
69 | #include "iwl-trans.h" | 68 | #include "iwl-trans.h" |
70 | #include "iwl-agn.h" | 69 | #include "iwl-agn.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.h b/drivers/net/wireless/iwlwifi/iwl-agn-calib.h index 9ed6683314a7..dbe13787f272 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.h | |||
@@ -63,7 +63,6 @@ | |||
63 | #define __iwl_calib_h__ | 63 | #define __iwl_calib_h__ |
64 | 64 | ||
65 | #include "iwl-dev.h" | 65 | #include "iwl-dev.h" |
66 | #include "iwl-core.h" | ||
67 | #include "iwl-commands.h" | 66 | #include "iwl-commands.h" |
68 | 67 | ||
69 | void iwl_chain_noise_calibration(struct iwl_priv *priv); | 68 | void iwl_chain_noise_calibration(struct iwl_priv *priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-devices.c b/drivers/net/wireless/iwlwifi/iwl-agn-devices.c index d0700e02b6ed..48533b3a0f9a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-devices.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-devices.c | |||
@@ -27,7 +27,6 @@ | |||
27 | /* | 27 | /* |
28 | * DVM device-specific data & functions | 28 | * DVM device-specific data & functions |
29 | */ | 29 | */ |
30 | #include "iwl-core.h" | ||
31 | #include "iwl-agn.h" | 30 | #include "iwl-agn.h" |
32 | #include "iwl-dev.h" | 31 | #include "iwl-dev.h" |
33 | #include "iwl-commands.h" | 32 | #include "iwl-commands.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 90b6ee80fd65..ed371740c86a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | 34 | ||
35 | #include "iwl-dev.h" | 35 | #include "iwl-dev.h" |
36 | #include "iwl-core.h" | ||
37 | #include "iwl-io.h" | 36 | #include "iwl-io.h" |
38 | #include "iwl-agn-hw.h" | 37 | #include "iwl-agn-hw.h" |
39 | #include "iwl-agn.h" | 38 | #include "iwl-agn.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 024a0dd8d892..14afd01bcf8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | 37 | ||
38 | #include "iwl-dev.h" | 38 | #include "iwl-dev.h" |
39 | #include "iwl-core.h" | ||
40 | #include "iwl-agn.h" | 39 | #include "iwl-agn.h" |
41 | #include "iwl-op-mode.h" | 40 | #include "iwl-op-mode.h" |
42 | 41 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index 45a153fe694d..6b2007a7abd8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/unaligned.h> | 34 | #include <asm/unaligned.h> |
35 | #include "iwl-eeprom.h" | 35 | #include "iwl-eeprom.h" |
36 | #include "iwl-dev.h" | 36 | #include "iwl-dev.h" |
37 | #include "iwl-core.h" | ||
38 | #include "iwl-io.h" | 37 | #include "iwl-io.h" |
39 | #include "iwl-agn-calib.h" | 38 | #include "iwl-agn-calib.h" |
40 | #include "iwl-agn.h" | 39 | #include "iwl-agn.h" |
@@ -762,8 +761,6 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
762 | p = rxb_steal_page(rxb); | 761 | p = rxb_steal_page(rxb); |
763 | skb_add_rx_frag(skb, 0, p, offset, len, len); | 762 | skb_add_rx_frag(skb, 0, p, offset, len, len); |
764 | 763 | ||
765 | iwl_update_stats(priv, false, fc, len); | ||
766 | |||
767 | /* | 764 | /* |
768 | * Wake any queues that were stopped due to a passive channel tx | 765 | * Wake any queues that were stopped due to a passive channel tx |
769 | * failure. This can happen because the regulatory enforcement in | 766 | * failure. This can happen because the regulatory enforcement in |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 8f41543d8306..6e9dce7539e2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/etherdevice.h> | 27 | #include <linux/etherdevice.h> |
28 | #include "iwl-dev.h" | 28 | #include "iwl-dev.h" |
29 | #include "iwl-agn.h" | 29 | #include "iwl-agn.h" |
30 | #include "iwl-core.h" | ||
31 | #include "iwl-agn-calib.h" | 30 | #include "iwl-agn-calib.h" |
32 | #include "iwl-trans.h" | 31 | #include "iwl-trans.h" |
33 | 32 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index 0119e7a7b78d..67e6f1d2a08b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <net/mac80211.h> | 30 | #include <net/mac80211.h> |
31 | 31 | ||
32 | #include "iwl-dev.h" | 32 | #include "iwl-dev.h" |
33 | #include "iwl-core.h" | ||
34 | #include "iwl-agn.h" | 33 | #include "iwl-agn.h" |
35 | #include "iwl-trans.h" | 34 | #include "iwl-trans.h" |
36 | 35 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c index f6bf874656fa..cd331da08275 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include "iwl-agn.h" | 37 | #include "iwl-agn.h" |
38 | #include "iwl-eeprom.h" | 38 | #include "iwl-eeprom.h" |
39 | #include "iwl-dev.h" | 39 | #include "iwl-dev.h" |
40 | #include "iwl-core.h" | ||
41 | #include "iwl-io.h" | 40 | #include "iwl-io.h" |
42 | #include "iwl-commands.h" | 41 | #include "iwl-commands.h" |
43 | #include "iwl-debug.h" | 42 | #include "iwl-debug.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 2a2ac152cc75..587cfe6739a8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/ieee80211.h> | 34 | #include <linux/ieee80211.h> |
35 | 35 | ||
36 | #include "iwl-dev.h" | 36 | #include "iwl-dev.h" |
37 | #include "iwl-core.h" | ||
38 | #include "iwl-io.h" | 37 | #include "iwl-io.h" |
39 | #include "iwl-agn-hw.h" | 38 | #include "iwl-agn-hw.h" |
40 | #include "iwl-agn.h" | 39 | #include "iwl-agn.h" |
@@ -399,8 +398,6 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
399 | 398 | ||
400 | iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc); | 399 | iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc); |
401 | 400 | ||
402 | iwl_update_stats(priv, true, fc, len); | ||
403 | |||
404 | memset(&info->status, 0, sizeof(info->status)); | 401 | memset(&info->status, 0, sizeof(info->status)); |
405 | 402 | ||
406 | info->driver_data[0] = ctx; | 403 | info->driver_data[0] = ctx; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 39187ea7658a..d479dace9fc6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -46,7 +46,6 @@ | |||
46 | 46 | ||
47 | #include "iwl-eeprom.h" | 47 | #include "iwl-eeprom.h" |
48 | #include "iwl-dev.h" | 48 | #include "iwl-dev.h" |
49 | #include "iwl-core.h" | ||
50 | #include "iwl-io.h" | 49 | #include "iwl-io.h" |
51 | #include "iwl-agn-calib.h" | 50 | #include "iwl-agn-calib.h" |
52 | #include "iwl-agn.h" | 51 | #include "iwl-agn.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c deleted file mode 100644 index 52805a149e1f..000000000000 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ /dev/null | |||
@@ -1,178 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * GPL LICENSE SUMMARY | ||
4 | * | ||
5 | * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of version 2 of the GNU General Public License as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
19 | * USA | ||
20 | * | ||
21 | * The full GNU General Public License is included in this distribution | ||
22 | * in the file called LICENSE.GPL. | ||
23 | * | ||
24 | * Contact Information: | ||
25 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
26 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
27 | *****************************************************************************/ | ||
28 | |||
29 | #include <linux/kernel.h> | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/sched.h> | ||
32 | #include <linux/slab.h> | ||
33 | #include <net/mac80211.h> | ||
34 | |||
35 | #include "iwl-eeprom.h" | ||
36 | #include "iwl-debug.h" | ||
37 | #include "iwl-core.h" | ||
38 | #include "iwl-io.h" | ||
39 | #include "iwl-power.h" | ||
40 | #include "iwl-agn.h" | ||
41 | #include "iwl-trans.h" | ||
42 | |||
43 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
44 | |||
45 | const char *get_mgmt_string(int cmd) | ||
46 | { | ||
47 | #define IWL_CMD(x) case x: return #x | ||
48 | switch (cmd) { | ||
49 | IWL_CMD(MANAGEMENT_ASSOC_REQ); | ||
50 | IWL_CMD(MANAGEMENT_ASSOC_RESP); | ||
51 | IWL_CMD(MANAGEMENT_REASSOC_REQ); | ||
52 | IWL_CMD(MANAGEMENT_REASSOC_RESP); | ||
53 | IWL_CMD(MANAGEMENT_PROBE_REQ); | ||
54 | IWL_CMD(MANAGEMENT_PROBE_RESP); | ||
55 | IWL_CMD(MANAGEMENT_BEACON); | ||
56 | IWL_CMD(MANAGEMENT_ATIM); | ||
57 | IWL_CMD(MANAGEMENT_DISASSOC); | ||
58 | IWL_CMD(MANAGEMENT_AUTH); | ||
59 | IWL_CMD(MANAGEMENT_DEAUTH); | ||
60 | IWL_CMD(MANAGEMENT_ACTION); | ||
61 | default: | ||
62 | return "UNKNOWN"; | ||
63 | |||
64 | } | ||
65 | #undef IWL_CMD | ||
66 | } | ||
67 | |||
68 | const char *get_ctrl_string(int cmd) | ||
69 | { | ||
70 | #define IWL_CMD(x) case x: return #x | ||
71 | switch (cmd) { | ||
72 | IWL_CMD(CONTROL_BACK_REQ); | ||
73 | IWL_CMD(CONTROL_BACK); | ||
74 | IWL_CMD(CONTROL_PSPOLL); | ||
75 | IWL_CMD(CONTROL_RTS); | ||
76 | IWL_CMD(CONTROL_CTS); | ||
77 | IWL_CMD(CONTROL_ACK); | ||
78 | IWL_CMD(CONTROL_CFEND); | ||
79 | IWL_CMD(CONTROL_CFENDACK); | ||
80 | default: | ||
81 | return "UNKNOWN"; | ||
82 | |||
83 | } | ||
84 | #undef IWL_CMD | ||
85 | } | ||
86 | |||
87 | /* | ||
88 | * if CONFIG_IWLWIFI_DEBUGFS defined, iwl_update_stats function will | ||
89 | * record all the MGMT, CTRL and DATA pkt for both TX and Rx pass. | ||
90 | * Use debugFs to display the rx/rx_statistics | ||
91 | * if CONFIG_IWLWIFI_DEBUGFS not being defined, then no MGMT and CTRL | ||
92 | * information will be recorded, but DATA pkt still will be recorded | ||
93 | * for the reason of iwl_led.c need to control the led blinking based on | ||
94 | * number of tx and rx data. | ||
95 | * | ||
96 | */ | ||
97 | void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len) | ||
98 | { | ||
99 | struct traffic_stats *stats; | ||
100 | |||
101 | if (is_tx) | ||
102 | stats = &priv->tx_stats; | ||
103 | else | ||
104 | stats = &priv->rx_stats; | ||
105 | |||
106 | if (ieee80211_is_mgmt(fc)) { | ||
107 | switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) { | ||
108 | case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ): | ||
109 | stats->mgmt[MANAGEMENT_ASSOC_REQ]++; | ||
110 | break; | ||
111 | case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP): | ||
112 | stats->mgmt[MANAGEMENT_ASSOC_RESP]++; | ||
113 | break; | ||
114 | case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ): | ||
115 | stats->mgmt[MANAGEMENT_REASSOC_REQ]++; | ||
116 | break; | ||
117 | case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP): | ||
118 | stats->mgmt[MANAGEMENT_REASSOC_RESP]++; | ||
119 | break; | ||
120 | case cpu_to_le16(IEEE80211_STYPE_PROBE_REQ): | ||
121 | stats->mgmt[MANAGEMENT_PROBE_REQ]++; | ||
122 | break; | ||
123 | case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP): | ||
124 | stats->mgmt[MANAGEMENT_PROBE_RESP]++; | ||
125 | break; | ||
126 | case cpu_to_le16(IEEE80211_STYPE_BEACON): | ||
127 | stats->mgmt[MANAGEMENT_BEACON]++; | ||
128 | break; | ||
129 | case cpu_to_le16(IEEE80211_STYPE_ATIM): | ||
130 | stats->mgmt[MANAGEMENT_ATIM]++; | ||
131 | break; | ||
132 | case cpu_to_le16(IEEE80211_STYPE_DISASSOC): | ||
133 | stats->mgmt[MANAGEMENT_DISASSOC]++; | ||
134 | break; | ||
135 | case cpu_to_le16(IEEE80211_STYPE_AUTH): | ||
136 | stats->mgmt[MANAGEMENT_AUTH]++; | ||
137 | break; | ||
138 | case cpu_to_le16(IEEE80211_STYPE_DEAUTH): | ||
139 | stats->mgmt[MANAGEMENT_DEAUTH]++; | ||
140 | break; | ||
141 | case cpu_to_le16(IEEE80211_STYPE_ACTION): | ||
142 | stats->mgmt[MANAGEMENT_ACTION]++; | ||
143 | break; | ||
144 | } | ||
145 | } else if (ieee80211_is_ctl(fc)) { | ||
146 | switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) { | ||
147 | case cpu_to_le16(IEEE80211_STYPE_BACK_REQ): | ||
148 | stats->ctrl[CONTROL_BACK_REQ]++; | ||
149 | break; | ||
150 | case cpu_to_le16(IEEE80211_STYPE_BACK): | ||
151 | stats->ctrl[CONTROL_BACK]++; | ||
152 | break; | ||
153 | case cpu_to_le16(IEEE80211_STYPE_PSPOLL): | ||
154 | stats->ctrl[CONTROL_PSPOLL]++; | ||
155 | break; | ||
156 | case cpu_to_le16(IEEE80211_STYPE_RTS): | ||
157 | stats->ctrl[CONTROL_RTS]++; | ||
158 | break; | ||
159 | case cpu_to_le16(IEEE80211_STYPE_CTS): | ||
160 | stats->ctrl[CONTROL_CTS]++; | ||
161 | break; | ||
162 | case cpu_to_le16(IEEE80211_STYPE_ACK): | ||
163 | stats->ctrl[CONTROL_ACK]++; | ||
164 | break; | ||
165 | case cpu_to_le16(IEEE80211_STYPE_CFEND): | ||
166 | stats->ctrl[CONTROL_CFEND]++; | ||
167 | break; | ||
168 | case cpu_to_le16(IEEE80211_STYPE_CFENDACK): | ||
169 | stats->ctrl[CONTROL_CFENDACK]++; | ||
170 | break; | ||
171 | } | ||
172 | } else { | ||
173 | /* data */ | ||
174 | stats->data_cnt++; | ||
175 | stats->data_bytes += len; | ||
176 | } | ||
177 | } | ||
178 | #endif | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h deleted file mode 100644 index cfa539bd6686..000000000000 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
4 | * redistributing this file, you may do so under either license. | ||
5 | * | ||
6 | * GPL LICENSE SUMMARY | ||
7 | * | ||
8 | * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of version 2 of the GNU General Public License as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
22 | * USA | ||
23 | * | ||
24 | * The full GNU General Public License is included in this distribution | ||
25 | * in the file called LICENSE.GPL. | ||
26 | * | ||
27 | * Contact Information: | ||
28 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
29 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
30 | * | ||
31 | * BSD LICENSE | ||
32 | * | ||
33 | * Copyright(c) 2005 - 2012 Intel Corporation. All rights reserved. | ||
34 | * All rights reserved. | ||
35 | * | ||
36 | * Redistribution and use in source and binary forms, with or without | ||
37 | * modification, are permitted provided that the following conditions | ||
38 | * are met: | ||
39 | * | ||
40 | * * Redistributions of source code must retain the above copyright | ||
41 | * notice, this list of conditions and the following disclaimer. | ||
42 | * * Redistributions in binary form must reproduce the above copyright | ||
43 | * notice, this list of conditions and the following disclaimer in | ||
44 | * the documentation and/or other materials provided with the | ||
45 | * distribution. | ||
46 | * * Neither the name Intel Corporation nor the names of its | ||
47 | * contributors may be used to endorse or promote products derived | ||
48 | * from this software without specific prior written permission. | ||
49 | * | ||
50 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
51 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
52 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
53 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
54 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
56 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
57 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
58 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
59 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
61 | *****************************************************************************/ | ||
62 | |||
63 | #ifndef __iwl_core_h__ | ||
64 | #define __iwl_core_h__ | ||
65 | |||
66 | #include "iwl-dev.h" | ||
67 | #include "iwl-io.h" | ||
68 | |||
69 | /************************ | ||
70 | * forward declarations * | ||
71 | ************************/ | ||
72 | struct iwl_host_cmd; | ||
73 | struct iwl_cmd; | ||
74 | |||
75 | /*************************** | ||
76 | * L i b * | ||
77 | ***************************/ | ||
78 | |||
79 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
80 | const char *get_mgmt_string(int cmd); | ||
81 | const char *get_ctrl_string(int cmd); | ||
82 | void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len); | ||
83 | #else | ||
84 | static inline void iwl_update_stats(struct iwl_priv *priv, bool is_tx, | ||
85 | __le16 fc, u16 len) | ||
86 | { | ||
87 | } | ||
88 | #endif | ||
89 | |||
90 | #endif /* __iwl_core_h__ */ | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index eb93fddfa149..f612ce8fdffe 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include "iwl-dev.h" | 38 | #include "iwl-dev.h" |
39 | #include "iwl-debug.h" | 39 | #include "iwl-debug.h" |
40 | #include "iwl-core.h" | ||
41 | #include "iwl-io.h" | 40 | #include "iwl-io.h" |
42 | #include "iwl-agn.h" | 41 | #include "iwl-agn.h" |
43 | 42 | ||
@@ -111,85 +110,6 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \ | |||
111 | .llseek = generic_file_llseek, \ | 110 | .llseek = generic_file_llseek, \ |
112 | }; | 111 | }; |
113 | 112 | ||
114 | static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file, | ||
115 | char __user *user_buf, | ||
116 | size_t count, loff_t *ppos) { | ||
117 | |||
118 | struct iwl_priv *priv = file->private_data; | ||
119 | char *buf; | ||
120 | int pos = 0; | ||
121 | |||
122 | int cnt; | ||
123 | ssize_t ret; | ||
124 | const size_t bufsz = 100 + | ||
125 | sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX); | ||
126 | buf = kzalloc(bufsz, GFP_KERNEL); | ||
127 | if (!buf) | ||
128 | return -ENOMEM; | ||
129 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); | ||
130 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { | ||
131 | pos += scnprintf(buf + pos, bufsz - pos, | ||
132 | "\t%25s\t\t: %u\n", | ||
133 | get_mgmt_string(cnt), | ||
134 | priv->tx_stats.mgmt[cnt]); | ||
135 | } | ||
136 | pos += scnprintf(buf + pos, bufsz - pos, "Control\n"); | ||
137 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { | ||
138 | pos += scnprintf(buf + pos, bufsz - pos, | ||
139 | "\t%25s\t\t: %u\n", | ||
140 | get_ctrl_string(cnt), | ||
141 | priv->tx_stats.ctrl[cnt]); | ||
142 | } | ||
143 | pos += scnprintf(buf + pos, bufsz - pos, "Data:\n"); | ||
144 | pos += scnprintf(buf + pos, bufsz - pos, "\tcnt: %u\n", | ||
145 | priv->tx_stats.data_cnt); | ||
146 | pos += scnprintf(buf + pos, bufsz - pos, "\tbytes: %llu\n", | ||
147 | priv->tx_stats.data_bytes); | ||
148 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | ||
149 | kfree(buf); | ||
150 | return ret; | ||
151 | } | ||
152 | |||
153 | static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file, | ||
154 | char __user *user_buf, | ||
155 | size_t count, loff_t *ppos) { | ||
156 | |||
157 | struct iwl_priv *priv = file->private_data; | ||
158 | char *buf; | ||
159 | int pos = 0; | ||
160 | int cnt; | ||
161 | ssize_t ret; | ||
162 | const size_t bufsz = 100 + | ||
163 | sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX); | ||
164 | buf = kzalloc(bufsz, GFP_KERNEL); | ||
165 | if (!buf) | ||
166 | return -ENOMEM; | ||
167 | |||
168 | pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); | ||
169 | for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) { | ||
170 | pos += scnprintf(buf + pos, bufsz - pos, | ||
171 | "\t%25s\t\t: %u\n", | ||
172 | get_mgmt_string(cnt), | ||
173 | priv->rx_stats.mgmt[cnt]); | ||
174 | } | ||
175 | pos += scnprintf(buf + pos, bufsz - pos, "Control:\n"); | ||
176 | for (cnt = 0; cnt < CONTROL_MAX; cnt++) { | ||
177 | pos += scnprintf(buf + pos, bufsz - pos, | ||
178 | "\t%25s\t\t: %u\n", | ||
179 | get_ctrl_string(cnt), | ||
180 | priv->rx_stats.ctrl[cnt]); | ||
181 | } | ||
182 | pos += scnprintf(buf + pos, bufsz - pos, "Data:\n"); | ||
183 | pos += scnprintf(buf + pos, bufsz - pos, "\tcnt: %u\n", | ||
184 | priv->rx_stats.data_cnt); | ||
185 | pos += scnprintf(buf + pos, bufsz - pos, "\tbytes: %llu\n", | ||
186 | priv->rx_stats.data_bytes); | ||
187 | |||
188 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | ||
189 | kfree(buf); | ||
190 | return ret; | ||
191 | } | ||
192 | |||
193 | static ssize_t iwl_dbgfs_sram_read(struct file *file, | 113 | static ssize_t iwl_dbgfs_sram_read(struct file *file, |
194 | char __user *user_buf, | 114 | char __user *user_buf, |
195 | size_t count, loff_t *ppos) | 115 | size_t count, loff_t *ppos) |
@@ -2405,8 +2325,6 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file, | |||
2405 | return count; | 2325 | return count; |
2406 | } | 2326 | } |
2407 | 2327 | ||
2408 | DEBUGFS_READ_FILE_OPS(rx_statistics); | ||
2409 | DEBUGFS_READ_FILE_OPS(tx_statistics); | ||
2410 | DEBUGFS_READ_FILE_OPS(ucode_rx_stats); | 2328 | DEBUGFS_READ_FILE_OPS(ucode_rx_stats); |
2411 | DEBUGFS_READ_FILE_OPS(ucode_tx_stats); | 2329 | DEBUGFS_READ_FILE_OPS(ucode_tx_stats); |
2412 | DEBUGFS_READ_FILE_OPS(ucode_general_stats); | 2330 | DEBUGFS_READ_FILE_OPS(ucode_general_stats); |
@@ -2468,8 +2386,6 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
2468 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); | 2386 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); |
2469 | DEBUGFS_ADD_FILE(temperature, dir_data, S_IRUSR); | 2387 | DEBUGFS_ADD_FILE(temperature, dir_data, S_IRUSR); |
2470 | 2388 | ||
2471 | DEBUGFS_ADD_FILE(rx_statistics, dir_debug, S_IRUSR); | ||
2472 | DEBUGFS_ADD_FILE(tx_statistics, dir_debug, S_IRUSR); | ||
2473 | DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); | 2389 | DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); |
2474 | DEBUGFS_ADD_FILE(clear_ucode_statistics, dir_debug, S_IWUSR); | 2390 | DEBUGFS_ADD_FILE(clear_ucode_statistics, dir_debug, S_IWUSR); |
2475 | DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); | 2391 | DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index e89dc2650450..67e3b4056f09 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -507,44 +507,6 @@ struct reply_agg_tx_error_statistics { | |||
507 | u32 unknown; | 507 | u32 unknown; |
508 | }; | 508 | }; |
509 | 509 | ||
510 | /* management statistics */ | ||
511 | enum iwl_mgmt_stats { | ||
512 | MANAGEMENT_ASSOC_REQ = 0, | ||
513 | MANAGEMENT_ASSOC_RESP, | ||
514 | MANAGEMENT_REASSOC_REQ, | ||
515 | MANAGEMENT_REASSOC_RESP, | ||
516 | MANAGEMENT_PROBE_REQ, | ||
517 | MANAGEMENT_PROBE_RESP, | ||
518 | MANAGEMENT_BEACON, | ||
519 | MANAGEMENT_ATIM, | ||
520 | MANAGEMENT_DISASSOC, | ||
521 | MANAGEMENT_AUTH, | ||
522 | MANAGEMENT_DEAUTH, | ||
523 | MANAGEMENT_ACTION, | ||
524 | MANAGEMENT_MAX, | ||
525 | }; | ||
526 | /* control statistics */ | ||
527 | enum iwl_ctrl_stats { | ||
528 | CONTROL_BACK_REQ = 0, | ||
529 | CONTROL_BACK, | ||
530 | CONTROL_PSPOLL, | ||
531 | CONTROL_RTS, | ||
532 | CONTROL_CTS, | ||
533 | CONTROL_ACK, | ||
534 | CONTROL_CFEND, | ||
535 | CONTROL_CFENDACK, | ||
536 | CONTROL_MAX, | ||
537 | }; | ||
538 | |||
539 | struct traffic_stats { | ||
540 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
541 | u32 mgmt[MANAGEMENT_MAX]; | ||
542 | u32 ctrl[CONTROL_MAX]; | ||
543 | u32 data_cnt; | ||
544 | u64 data_bytes; | ||
545 | #endif | ||
546 | }; | ||
547 | |||
548 | /* | 510 | /* |
549 | * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds | 511 | * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds |
550 | * to perform continuous uCode event logging operation if enabled | 512 | * to perform continuous uCode event logging operation if enabled |
@@ -894,10 +856,6 @@ struct iwl_priv { | |||
894 | 856 | ||
895 | int activity_timer_active; | 857 | int activity_timer_active; |
896 | 858 | ||
897 | /* counts mgmt, ctl, and data packets */ | ||
898 | struct traffic_stats tx_stats; | ||
899 | struct traffic_stats rx_stats; | ||
900 | |||
901 | struct iwl_power_mgr power_data; | 859 | struct iwl_power_mgr power_data; |
902 | struct iwl_tt_mgmt thermal_throttle; | 860 | struct iwl_tt_mgmt thermal_throttle; |
903 | 861 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 098d565d735a..50c58911e718 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -69,7 +69,6 @@ | |||
69 | #include <net/mac80211.h> | 69 | #include <net/mac80211.h> |
70 | 70 | ||
71 | #include "iwl-dev.h" | 71 | #include "iwl-dev.h" |
72 | #include "iwl-core.h" | ||
73 | #include "iwl-debug.h" | 72 | #include "iwl-debug.h" |
74 | #include "iwl-agn.h" | 73 | #include "iwl-agn.h" |
75 | #include "iwl-eeprom.h" | 74 | #include "iwl-eeprom.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 7fbed47437c3..1d62d0677f35 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/unaligned.h> | 36 | #include <asm/unaligned.h> |
37 | 37 | ||
38 | #include "iwl-dev.h" | 38 | #include "iwl-dev.h" |
39 | #include "iwl-core.h" | ||
40 | #include "iwl-agn.h" | 39 | #include "iwl-agn.h" |
41 | #include "iwl-io.h" | 40 | #include "iwl-io.h" |
42 | #include "iwl-trans.h" | 41 | #include "iwl-trans.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 8adbbf2d343b..4f4515696e55 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -44,7 +44,6 @@ | |||
44 | 44 | ||
45 | #include "iwl-eeprom.h" | 45 | #include "iwl-eeprom.h" |
46 | #include "iwl-dev.h" | 46 | #include "iwl-dev.h" |
47 | #include "iwl-core.h" | ||
48 | #include "iwl-io.h" | 47 | #include "iwl-io.h" |
49 | #include "iwl-agn-calib.h" | 48 | #include "iwl-agn-calib.h" |
50 | #include "iwl-agn.h" | 49 | #include "iwl-agn.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index bc91cdda8f5f..5fba34bf8bca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include "iwl-eeprom.h" | 37 | #include "iwl-eeprom.h" |
38 | #include "iwl-dev.h" | 38 | #include "iwl-dev.h" |
39 | #include "iwl-agn.h" | 39 | #include "iwl-agn.h" |
40 | #include "iwl-core.h" | ||
41 | #include "iwl-io.h" | 40 | #include "iwl-io.h" |
42 | #include "iwl-commands.h" | 41 | #include "iwl-commands.h" |
43 | #include "iwl-debug.h" | 42 | #include "iwl-debug.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 9b88b909e546..a8437a6bc18e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include "iwl-eeprom.h" | 33 | #include "iwl-eeprom.h" |
34 | #include "iwl-dev.h" | 34 | #include "iwl-dev.h" |
35 | #include "iwl-core.h" | ||
36 | #include "iwl-io.h" | 35 | #include "iwl-io.h" |
37 | #include "iwl-agn.h" | 36 | #include "iwl-agn.h" |
38 | #include "iwl-trans.h" | 37 | #include "iwl-trans.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-testmode.c b/drivers/net/wireless/iwlwifi/iwl-testmode.c index a6b16aa29c72..bd92bd824c1e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-testmode.c +++ b/drivers/net/wireless/iwlwifi/iwl-testmode.c | |||
@@ -71,7 +71,6 @@ | |||
71 | #include <net/netlink.h> | 71 | #include <net/netlink.h> |
72 | 72 | ||
73 | #include "iwl-dev.h" | 73 | #include "iwl-dev.h" |
74 | #include "iwl-core.h" | ||
75 | #include "iwl-debug.h" | 74 | #include "iwl-debug.h" |
76 | #include "iwl-io.h" | 75 | #include "iwl-io.h" |
77 | #include "iwl-agn.h" | 76 | #include "iwl-agn.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c index 19558035c6c6..bc40dc68b0f4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | 32 | ||
33 | #include "iwl-dev.h" | 33 | #include "iwl-dev.h" |
34 | #include "iwl-core.h" | ||
35 | #include "iwl-io.h" | 34 | #include "iwl-io.h" |
36 | #include "iwl-agn-hw.h" | 35 | #include "iwl-agn-hw.h" |
37 | #include "iwl-agn.h" | 36 | #include "iwl-agn.h" |