diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-06-14 20:09:54 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-21 13:47:25 -0400 |
commit | f3aebeeebc9a18aa548f8c1da18f6cda28d8b732 (patch) | |
tree | 0943c87306cba89b40d6b7ad88568b47a871bbe4 | |
parent | 278fc73c0c6014bc2f55bce898bdeaa322bf4aba (diff) |
iwlwifi: move _agn statistics related structure
agn and 3945 has different statistics_notif data structure; since 3945
has it statistics_notif data structure inside the _3945 portion of
iwl_priv, it make sense to move the agn statistics_notif into _agn
portion.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | 72 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 58 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 14 |
7 files changed, 86 insertions, 84 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index fee276bc36f..67526a1be02 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -1580,7 +1580,8 @@ static int iwl4965_hw_get_temperature(struct iwl_priv *priv) | |||
1580 | u32 R4; | 1580 | u32 R4; |
1581 | 1581 | ||
1582 | if (test_bit(STATUS_TEMPERATURE, &priv->status) && | 1582 | if (test_bit(STATUS_TEMPERATURE, &priv->status) && |
1583 | (priv->statistics.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { | 1583 | (priv->_agn.statistics.flag & |
1584 | STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { | ||
1584 | IWL_DEBUG_TEMP(priv, "Running HT40 temperature calibration\n"); | 1585 | IWL_DEBUG_TEMP(priv, "Running HT40 temperature calibration\n"); |
1585 | R1 = (s32)le32_to_cpu(priv->card_alive_init.therm_r1[1]); | 1586 | R1 = (s32)le32_to_cpu(priv->card_alive_init.therm_r1[1]); |
1586 | R2 = (s32)le32_to_cpu(priv->card_alive_init.therm_r2[1]); | 1587 | R2 = (s32)le32_to_cpu(priv->card_alive_init.therm_r2[1]); |
@@ -1604,8 +1605,8 @@ static int iwl4965_hw_get_temperature(struct iwl_priv *priv) | |||
1604 | if (!test_bit(STATUS_TEMPERATURE, &priv->status)) | 1605 | if (!test_bit(STATUS_TEMPERATURE, &priv->status)) |
1605 | vt = sign_extend(R4, 23); | 1606 | vt = sign_extend(R4, 23); |
1606 | else | 1607 | else |
1607 | vt = sign_extend( | 1608 | vt = sign_extend(le32_to_cpu( |
1608 | le32_to_cpu(priv->statistics.general.temperature), 23); | 1609 | priv->_agn.statistics.general.temperature), 23); |
1609 | 1610 | ||
1610 | IWL_DEBUG_TEMP(priv, "Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt); | 1611 | IWL_DEBUG_TEMP(priv, "Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt); |
1611 | 1612 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 32710a801cb..c6ccc25d6c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -264,7 +264,7 @@ static void iwl5150_temperature(struct iwl_priv *priv) | |||
264 | u32 vt = 0; | 264 | u32 vt = 0; |
265 | s32 offset = iwl_temp_calib_to_offset(priv); | 265 | s32 offset = iwl_temp_calib_to_offset(priv); |
266 | 266 | ||
267 | vt = le32_to_cpu(priv->statistics.general.temperature); | 267 | vt = le32_to_cpu(priv->_agn.statistics.general.temperature); |
268 | vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; | 268 | vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; |
269 | /* now vt hold the temperature in Kelvin */ | 269 | /* now vt hold the temperature in Kelvin */ |
270 | priv->temperature = KELVIN_TO_CELSIUS(vt); | 270 | priv->temperature = KELVIN_TO_CELSIUS(vt); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c index 3d08dc8af14..75d6bfcbc60 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | |||
@@ -33,17 +33,17 @@ static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) | |||
33 | int p = 0; | 33 | int p = 0; |
34 | 34 | ||
35 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", | 35 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", |
36 | le32_to_cpu(priv->statistics.flag)); | 36 | le32_to_cpu(priv->_agn.statistics.flag)); |
37 | if (le32_to_cpu(priv->statistics.flag) & | 37 | if (le32_to_cpu(priv->_agn.statistics.flag) & |
38 | UCODE_STATISTICS_CLEAR_MSK) | 38 | UCODE_STATISTICS_CLEAR_MSK) |
39 | p += scnprintf(buf + p, bufsz - p, | 39 | p += scnprintf(buf + p, bufsz - p, |
40 | "\tStatistics have been cleared\n"); | 40 | "\tStatistics have been cleared\n"); |
41 | p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n", | 41 | p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n", |
42 | (le32_to_cpu(priv->statistics.flag) & | 42 | (le32_to_cpu(priv->_agn.statistics.flag) & |
43 | UCODE_STATISTICS_FREQUENCY_MSK) | 43 | UCODE_STATISTICS_FREQUENCY_MSK) |
44 | ? "2.4 GHz" : "5.2 GHz"); | 44 | ? "2.4 GHz" : "5.2 GHz"); |
45 | p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n", | 45 | p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n", |
46 | (le32_to_cpu(priv->statistics.flag) & | 46 | (le32_to_cpu(priv->_agn.statistics.flag) & |
47 | UCODE_STATISTICS_NARROW_BAND_MSK) | 47 | UCODE_STATISTICS_NARROW_BAND_MSK) |
48 | ? "enabled" : "disabled"); | 48 | ? "enabled" : "disabled"); |
49 | return p; | 49 | return p; |
@@ -79,22 +79,22 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf, | |||
79 | * the last statistics notification from uCode | 79 | * the last statistics notification from uCode |
80 | * might not reflect the current uCode activity | 80 | * might not reflect the current uCode activity |
81 | */ | 81 | */ |
82 | ofdm = &priv->statistics.rx.ofdm; | 82 | ofdm = &priv->_agn.statistics.rx.ofdm; |
83 | cck = &priv->statistics.rx.cck; | 83 | cck = &priv->_agn.statistics.rx.cck; |
84 | general = &priv->statistics.rx.general; | 84 | general = &priv->_agn.statistics.rx.general; |
85 | ht = &priv->statistics.rx.ofdm_ht; | 85 | ht = &priv->_agn.statistics.rx.ofdm_ht; |
86 | accum_ofdm = &priv->accum_statistics.rx.ofdm; | 86 | accum_ofdm = &priv->_agn.accum_statistics.rx.ofdm; |
87 | accum_cck = &priv->accum_statistics.rx.cck; | 87 | accum_cck = &priv->_agn.accum_statistics.rx.cck; |
88 | accum_general = &priv->accum_statistics.rx.general; | 88 | accum_general = &priv->_agn.accum_statistics.rx.general; |
89 | accum_ht = &priv->accum_statistics.rx.ofdm_ht; | 89 | accum_ht = &priv->_agn.accum_statistics.rx.ofdm_ht; |
90 | delta_ofdm = &priv->delta_statistics.rx.ofdm; | 90 | delta_ofdm = &priv->_agn.delta_statistics.rx.ofdm; |
91 | delta_cck = &priv->delta_statistics.rx.cck; | 91 | delta_cck = &priv->_agn.delta_statistics.rx.cck; |
92 | delta_general = &priv->delta_statistics.rx.general; | 92 | delta_general = &priv->_agn.delta_statistics.rx.general; |
93 | delta_ht = &priv->delta_statistics.rx.ofdm_ht; | 93 | delta_ht = &priv->_agn.delta_statistics.rx.ofdm_ht; |
94 | max_ofdm = &priv->max_delta.rx.ofdm; | 94 | max_ofdm = &priv->_agn.max_delta.rx.ofdm; |
95 | max_cck = &priv->max_delta.rx.cck; | 95 | max_cck = &priv->_agn.max_delta.rx.cck; |
96 | max_general = &priv->max_delta.rx.general; | 96 | max_general = &priv->_agn.max_delta.rx.general; |
97 | max_ht = &priv->max_delta.rx.ofdm_ht; | 97 | max_ht = &priv->_agn.max_delta.rx.ofdm_ht; |
98 | 98 | ||
99 | pos += iwl_statistics_flag(priv, buf, bufsz); | 99 | pos += iwl_statistics_flag(priv, buf, bufsz); |
100 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 100 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
@@ -560,10 +560,10 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file, | |||
560 | * the last statistics notification from uCode | 560 | * the last statistics notification from uCode |
561 | * might not reflect the current uCode activity | 561 | * might not reflect the current uCode activity |
562 | */ | 562 | */ |
563 | tx = &priv->statistics.tx; | 563 | tx = &priv->_agn.statistics.tx; |
564 | accum_tx = &priv->accum_statistics.tx; | 564 | accum_tx = &priv->_agn.accum_statistics.tx; |
565 | delta_tx = &priv->delta_statistics.tx; | 565 | delta_tx = &priv->_agn.delta_statistics.tx; |
566 | max_tx = &priv->max_delta.tx; | 566 | max_tx = &priv->_agn.max_delta.tx; |
567 | pos += iwl_statistics_flag(priv, buf, bufsz); | 567 | pos += iwl_statistics_flag(priv, buf, bufsz); |
568 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 568 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
569 | "acumulative delta max\n", | 569 | "acumulative delta max\n", |
@@ -777,18 +777,18 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf, | |||
777 | * the last statistics notification from uCode | 777 | * the last statistics notification from uCode |
778 | * might not reflect the current uCode activity | 778 | * might not reflect the current uCode activity |
779 | */ | 779 | */ |
780 | general = &priv->statistics.general; | 780 | general = &priv->_agn.statistics.general; |
781 | dbg = &priv->statistics.general.dbg; | 781 | dbg = &priv->_agn.statistics.general.dbg; |
782 | div = &priv->statistics.general.div; | 782 | div = &priv->_agn.statistics.general.div; |
783 | accum_general = &priv->accum_statistics.general; | 783 | accum_general = &priv->_agn.accum_statistics.general; |
784 | delta_general = &priv->delta_statistics.general; | 784 | delta_general = &priv->_agn.delta_statistics.general; |
785 | max_general = &priv->max_delta.general; | 785 | max_general = &priv->_agn.max_delta.general; |
786 | accum_dbg = &priv->accum_statistics.general.dbg; | 786 | accum_dbg = &priv->_agn.accum_statistics.general.dbg; |
787 | delta_dbg = &priv->delta_statistics.general.dbg; | 787 | delta_dbg = &priv->_agn.delta_statistics.general.dbg; |
788 | max_dbg = &priv->max_delta.general.dbg; | 788 | max_dbg = &priv->_agn.max_delta.general.dbg; |
789 | accum_div = &priv->accum_statistics.general.div; | 789 | accum_div = &priv->_agn.accum_statistics.general.div; |
790 | delta_div = &priv->delta_statistics.general.div; | 790 | delta_div = &priv->_agn.delta_statistics.general.div; |
791 | max_div = &priv->max_delta.general.div; | 791 | max_div = &priv->_agn.max_delta.general.div; |
792 | pos += iwl_statistics_flag(priv, buf, bufsz); | 792 | pos += iwl_statistics_flag(priv, buf, bufsz); |
793 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 793 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
794 | "acumulative delta max\n", | 794 | "acumulative delta max\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 0e7b0661d61..5f1e7d802cb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -361,7 +361,8 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
361 | void iwlagn_temperature(struct iwl_priv *priv) | 361 | void iwlagn_temperature(struct iwl_priv *priv) |
362 | { | 362 | { |
363 | /* store temperature from statistics (in Celsius) */ | 363 | /* store temperature from statistics (in Celsius) */ |
364 | priv->temperature = le32_to_cpu(priv->statistics.general.temperature); | 364 | priv->temperature = |
365 | le32_to_cpu(priv->_agn.statistics.general.temperature); | ||
365 | iwl_tt_handler(priv); | 366 | iwl_tt_handler(priv); |
366 | } | 367 | } |
367 | 368 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index 20343b10aa9..ad2bead25c8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -68,7 +68,7 @@ void iwl_rx_missed_beacon_notif(struct iwl_priv *priv, | |||
68 | static void iwl_rx_calc_noise(struct iwl_priv *priv) | 68 | static void iwl_rx_calc_noise(struct iwl_priv *priv) |
69 | { | 69 | { |
70 | struct statistics_rx_non_phy *rx_info | 70 | struct statistics_rx_non_phy *rx_info |
71 | = &(priv->statistics.rx.general); | 71 | = &(priv->_agn.statistics.rx.general); |
72 | int num_active_rx = 0; | 72 | int num_active_rx = 0; |
73 | int total_silence = 0; | 73 | int total_silence = 0; |
74 | int bcn_silence_a = | 74 | int bcn_silence_a = |
@@ -117,10 +117,10 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv, | |||
117 | u32 *accum_stats; | 117 | u32 *accum_stats; |
118 | u32 *delta, *max_delta; | 118 | u32 *delta, *max_delta; |
119 | 119 | ||
120 | prev_stats = (__le32 *)&priv->statistics; | 120 | prev_stats = (__le32 *)&priv->_agn.statistics; |
121 | accum_stats = (u32 *)&priv->accum_statistics; | 121 | accum_stats = (u32 *)&priv->_agn.accum_statistics; |
122 | delta = (u32 *)&priv->delta_statistics; | 122 | delta = (u32 *)&priv->_agn.delta_statistics; |
123 | max_delta = (u32 *)&priv->max_delta; | 123 | max_delta = (u32 *)&priv->_agn.max_delta; |
124 | 124 | ||
125 | for (i = sizeof(__le32); i < sizeof(struct iwl_notif_statistics); | 125 | for (i = sizeof(__le32); i < sizeof(struct iwl_notif_statistics); |
126 | i += sizeof(__le32), stats++, prev_stats++, delta++, | 126 | i += sizeof(__le32), stats++, prev_stats++, delta++, |
@@ -135,18 +135,18 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv, | |||
135 | } | 135 | } |
136 | 136 | ||
137 | /* reset accumulative statistics for "no-counter" type statistics */ | 137 | /* reset accumulative statistics for "no-counter" type statistics */ |
138 | priv->accum_statistics.general.temperature = | 138 | priv->_agn.accum_statistics.general.temperature = |
139 | priv->statistics.general.temperature; | 139 | priv->_agn.statistics.general.temperature; |
140 | priv->accum_statistics.general.temperature_m = | 140 | priv->_agn.accum_statistics.general.temperature_m = |
141 | priv->statistics.general.temperature_m; | 141 | priv->_agn.statistics.general.temperature_m; |
142 | priv->accum_statistics.general.ttl_timestamp = | 142 | priv->_agn.accum_statistics.general.ttl_timestamp = |
143 | priv->statistics.general.ttl_timestamp; | 143 | priv->_agn.statistics.general.ttl_timestamp; |
144 | priv->accum_statistics.tx.tx_power.ant_a = | 144 | priv->_agn.accum_statistics.tx.tx_power.ant_a = |
145 | priv->statistics.tx.tx_power.ant_a; | 145 | priv->_agn.statistics.tx.tx_power.ant_a; |
146 | priv->accum_statistics.tx.tx_power.ant_b = | 146 | priv->_agn.accum_statistics.tx.tx_power.ant_b = |
147 | priv->statistics.tx.tx_power.ant_b; | 147 | priv->_agn.statistics.tx.tx_power.ant_b; |
148 | priv->accum_statistics.tx.tx_power.ant_c = | 148 | priv->_agn.accum_statistics.tx.tx_power.ant_c = |
149 | priv->statistics.tx.tx_power.ant_c; | 149 | priv->_agn.statistics.tx.tx_power.ant_c; |
150 | } | 150 | } |
151 | #endif | 151 | #endif |
152 | 152 | ||
@@ -181,9 +181,9 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
181 | if (plcp_msec) { | 181 | if (plcp_msec) { |
182 | combined_plcp_delta = | 182 | combined_plcp_delta = |
183 | (le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err) - | 183 | (le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err) - |
184 | le32_to_cpu(priv->statistics.rx.ofdm.plcp_err)) + | 184 | le32_to_cpu(priv->_agn.statistics.rx.ofdm.plcp_err)) + |
185 | (le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err) - | 185 | (le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err) - |
186 | le32_to_cpu(priv->statistics.rx.ofdm_ht.plcp_err)); | 186 | le32_to_cpu(priv->_agn.statistics.rx.ofdm_ht.plcp_err)); |
187 | 187 | ||
188 | if ((combined_plcp_delta > 0) && | 188 | if ((combined_plcp_delta > 0) && |
189 | ((combined_plcp_delta * 100) / plcp_msec) > | 189 | ((combined_plcp_delta * 100) / plcp_msec) > |
@@ -204,10 +204,10 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
204 | priv->cfg->plcp_delta_threshold, | 204 | priv->cfg->plcp_delta_threshold, |
205 | le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err), | 205 | le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err), |
206 | le32_to_cpu( | 206 | le32_to_cpu( |
207 | priv->statistics.rx.ofdm.plcp_err), | 207 | priv->_agn.statistics.rx.ofdm.plcp_err), |
208 | le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err), | 208 | le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err), |
209 | le32_to_cpu( | 209 | le32_to_cpu( |
210 | priv->statistics.rx.ofdm_ht.plcp_err), | 210 | priv->_agn.statistics.rx.ofdm_ht.plcp_err), |
211 | combined_plcp_delta, plcp_msec); | 211 | combined_plcp_delta, plcp_msec); |
212 | rc = false; | 212 | rc = false; |
213 | } | 213 | } |
@@ -223,12 +223,12 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
223 | 223 | ||
224 | 224 | ||
225 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", | 225 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", |
226 | (int)sizeof(priv->statistics), | 226 | (int)sizeof(priv->_agn.statistics), |
227 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); | 227 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); |
228 | 228 | ||
229 | change = ((priv->statistics.general.temperature != | 229 | change = ((priv->_agn.statistics.general.temperature != |
230 | pkt->u.stats.general.temperature) || | 230 | pkt->u.stats.general.temperature) || |
231 | ((priv->statistics.flag & | 231 | ((priv->_agn.statistics.flag & |
232 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != | 232 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != |
233 | (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK))); | 233 | (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK))); |
234 | 234 | ||
@@ -237,8 +237,8 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
237 | #endif | 237 | #endif |
238 | iwl_recover_from_statistics(priv, pkt); | 238 | iwl_recover_from_statistics(priv, pkt); |
239 | 239 | ||
240 | memcpy(&priv->statistics, &pkt->u.stats, | 240 | memcpy(&priv->_agn.statistics, &pkt->u.stats, |
241 | sizeof(priv->statistics)); | 241 | sizeof(priv->_agn.statistics)); |
242 | 242 | ||
243 | set_bit(STATUS_STATISTICS, &priv->status); | 243 | set_bit(STATUS_STATISTICS, &priv->status); |
244 | 244 | ||
@@ -265,11 +265,11 @@ void iwl_reply_statistics(struct iwl_priv *priv, | |||
265 | 265 | ||
266 | if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { | 266 | if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { |
267 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 267 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
268 | memset(&priv->accum_statistics, 0, | 268 | memset(&priv->_agn.accum_statistics, 0, |
269 | sizeof(struct iwl_notif_statistics)); | 269 | sizeof(struct iwl_notif_statistics)); |
270 | memset(&priv->delta_statistics, 0, | 270 | memset(&priv->_agn.delta_statistics, 0, |
271 | sizeof(struct iwl_notif_statistics)); | 271 | sizeof(struct iwl_notif_statistics)); |
272 | memset(&priv->max_delta, 0, | 272 | memset(&priv->_agn.max_delta, 0, |
273 | sizeof(struct iwl_notif_statistics)); | 273 | sizeof(struct iwl_notif_statistics)); |
274 | #endif | 274 | #endif |
275 | IWL_DEBUG_RX(priv, "Statistics have been cleared\n"); | 275 | IWL_DEBUG_RX(priv, "Statistics have been cleared\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index fd245c4e39a..7488a68b83b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1461,13 +1461,13 @@ bool iwl_good_ack_health(struct iwl_priv *priv, | |||
1461 | 1461 | ||
1462 | actual_ack_cnt_delta = | 1462 | actual_ack_cnt_delta = |
1463 | le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) - | 1463 | le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) - |
1464 | le32_to_cpu(priv->statistics.tx.actual_ack_cnt); | 1464 | le32_to_cpu(priv->_agn.statistics.tx.actual_ack_cnt); |
1465 | expected_ack_cnt_delta = | 1465 | expected_ack_cnt_delta = |
1466 | le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) - | 1466 | le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) - |
1467 | le32_to_cpu(priv->statistics.tx.expected_ack_cnt); | 1467 | le32_to_cpu(priv->_agn.statistics.tx.expected_ack_cnt); |
1468 | ba_timeout_delta = | 1468 | ba_timeout_delta = |
1469 | le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) - | 1469 | le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) - |
1470 | le32_to_cpu(priv->statistics.tx.agg.ba_timeout); | 1470 | le32_to_cpu(priv->_agn.statistics.tx.agg.ba_timeout); |
1471 | if ((priv->_agn.agg_tids_count > 0) && | 1471 | if ((priv->_agn.agg_tids_count > 0) && |
1472 | (expected_ack_cnt_delta > 0) && | 1472 | (expected_ack_cnt_delta > 0) && |
1473 | (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta) | 1473 | (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta) |
@@ -1484,10 +1484,10 @@ bool iwl_good_ack_health(struct iwl_priv *priv, | |||
1484 | * DEBUG is not, these will just compile out. | 1484 | * DEBUG is not, these will just compile out. |
1485 | */ | 1485 | */ |
1486 | IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n", | 1486 | IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n", |
1487 | priv->delta_statistics.tx.rx_detected_cnt); | 1487 | priv->_agn.delta_statistics.tx.rx_detected_cnt); |
1488 | IWL_DEBUG_RADIO(priv, | 1488 | IWL_DEBUG_RADIO(priv, |
1489 | "ack_or_ba_timeout_collision delta = %d\n", | 1489 | "ack_or_ba_timeout_collision delta = %d\n", |
1490 | priv->delta_statistics.tx. | 1490 | priv->_agn.delta_statistics.tx. |
1491 | ack_or_ba_timeout_collision); | 1491 | ack_or_ba_timeout_collision); |
1492 | #endif | 1492 | #endif |
1493 | IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n", | 1493 | IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n", |
@@ -2935,9 +2935,9 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
2935 | } | 2935 | } |
2936 | 2936 | ||
2937 | if (priv->start_calib) { | 2937 | if (priv->start_calib) { |
2938 | iwl_chain_noise_calibration(priv, &priv->statistics); | 2938 | iwl_chain_noise_calibration(priv, &priv->_agn.statistics); |
2939 | 2939 | ||
2940 | iwl_sensitivity_calibration(priv, &priv->statistics); | 2940 | iwl_sensitivity_calibration(priv, &priv->_agn.statistics); |
2941 | } | 2941 | } |
2942 | 2942 | ||
2943 | mutex_unlock(&priv->mutex); | 2943 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index da54e6cd18a..1af845c0f0b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1224,13 +1224,6 @@ struct iwl_priv { | |||
1224 | struct iwl_power_mgr power_data; | 1224 | struct iwl_power_mgr power_data; |
1225 | struct iwl_tt_mgmt thermal_throttle; | 1225 | struct iwl_tt_mgmt thermal_throttle; |
1226 | 1226 | ||
1227 | struct iwl_notif_statistics statistics; | ||
1228 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
1229 | struct iwl_notif_statistics accum_statistics; | ||
1230 | struct iwl_notif_statistics delta_statistics; | ||
1231 | struct iwl_notif_statistics max_delta; | ||
1232 | #endif | ||
1233 | |||
1234 | /* context information */ | 1227 | /* context information */ |
1235 | u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ | 1228 | u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ |
1236 | 1229 | ||
@@ -1323,6 +1316,13 @@ struct iwl_priv { | |||
1323 | 1316 | ||
1324 | u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr; | 1317 | u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr; |
1325 | u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr; | 1318 | u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr; |
1319 | |||
1320 | struct iwl_notif_statistics statistics; | ||
1321 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
1322 | struct iwl_notif_statistics accum_statistics; | ||
1323 | struct iwl_notif_statistics delta_statistics; | ||
1324 | struct iwl_notif_statistics max_delta; | ||
1325 | #endif | ||
1326 | } _agn; | 1326 | } _agn; |
1327 | #endif | 1327 | #endif |
1328 | }; | 1328 | }; |