aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-06-03 13:55:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-03 13:55:37 -0400
commit2daf6c157500b832687f675e323879e3a4c3fe27 (patch)
treefea2e19e1c4c7d24cdf48c8bf32e30d5b26cd859 /drivers/net/wireless
parent6e387aa420bb8cd2bde522352c7930a1bfc24b0c (diff)
Revert "iwlwifi: move _agn statistics related structure"
This reverts commit a2064b7a4a22d118087898e4308670da7ac07911. when CONFIG_IWLAGN=n: drivers/net/wireless/iwlwifi/iwl-rx.c:254: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:303: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:304: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:305: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:306: error: 'struct iwl_priv' has no member named '_agn' and many more. Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c drivers/net/wireless/iwlwifi/iwl-debugfs.c drivers/net/wireless/iwlwifi/iwl-dev.h drivers/net/wireless/iwlwifi/iwl-rx.c Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c72
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c57
7 files changed, 82 insertions, 84 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index ad4d7d11c3b8..4e377c817a87 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -1542,7 +1542,7 @@ static int iwl4965_hw_get_temperature(struct iwl_priv *priv)
1542 u32 R4; 1542 u32 R4;
1543 1543
1544 if (test_bit(STATUS_TEMPERATURE, &priv->status) && 1544 if (test_bit(STATUS_TEMPERATURE, &priv->status) &&
1545 (priv->_agn.statistics.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { 1545 (priv->statistics.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)) {
1546 IWL_DEBUG_TEMP(priv, "Running HT40 temperature calibration\n"); 1546 IWL_DEBUG_TEMP(priv, "Running HT40 temperature calibration\n");
1547 R1 = (s32)le32_to_cpu(priv->card_alive_init.therm_r1[1]); 1547 R1 = (s32)le32_to_cpu(priv->card_alive_init.therm_r1[1]);
1548 R2 = (s32)le32_to_cpu(priv->card_alive_init.therm_r2[1]); 1548 R2 = (s32)le32_to_cpu(priv->card_alive_init.therm_r2[1]);
@@ -1567,7 +1567,7 @@ static int iwl4965_hw_get_temperature(struct iwl_priv *priv)
1567 vt = sign_extend(R4, 23); 1567 vt = sign_extend(R4, 23);
1568 else 1568 else
1569 vt = sign_extend( 1569 vt = sign_extend(
1570 le32_to_cpu(priv->_agn.statistics.general.temperature), 23); 1570 le32_to_cpu(priv->statistics.general.temperature), 23);
1571 1571
1572 IWL_DEBUG_TEMP(priv, "Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt); 1572 IWL_DEBUG_TEMP(priv, "Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt);
1573 1573
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 447ec4885a41..a28af7eb67eb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -260,7 +260,7 @@ static void iwl5150_temperature(struct iwl_priv *priv)
260 u32 vt = 0; 260 u32 vt = 0;
261 s32 offset = iwl_temp_calib_to_offset(priv); 261 s32 offset = iwl_temp_calib_to_offset(priv);
262 262
263 vt = le32_to_cpu(priv->_agn.statistics.general.temperature); 263 vt = le32_to_cpu(priv->statistics.general.temperature);
264 vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; 264 vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;
265 /* now vt hold the temperature in Kelvin */ 265 /* now vt hold the temperature in Kelvin */
266 priv->temperature = KELVIN_TO_CELSIUS(vt); 266 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 75d6bfcbc607..3d08dc8af143 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->_agn.statistics.flag)); 36 le32_to_cpu(priv->statistics.flag));
37 if (le32_to_cpu(priv->_agn.statistics.flag) & 37 if (le32_to_cpu(priv->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->_agn.statistics.flag) & 42 (le32_to_cpu(priv->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->_agn.statistics.flag) & 46 (le32_to_cpu(priv->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->_agn.statistics.rx.ofdm; 82 ofdm = &priv->statistics.rx.ofdm;
83 cck = &priv->_agn.statistics.rx.cck; 83 cck = &priv->statistics.rx.cck;
84 general = &priv->_agn.statistics.rx.general; 84 general = &priv->statistics.rx.general;
85 ht = &priv->_agn.statistics.rx.ofdm_ht; 85 ht = &priv->statistics.rx.ofdm_ht;
86 accum_ofdm = &priv->_agn.accum_statistics.rx.ofdm; 86 accum_ofdm = &priv->accum_statistics.rx.ofdm;
87 accum_cck = &priv->_agn.accum_statistics.rx.cck; 87 accum_cck = &priv->accum_statistics.rx.cck;
88 accum_general = &priv->_agn.accum_statistics.rx.general; 88 accum_general = &priv->accum_statistics.rx.general;
89 accum_ht = &priv->_agn.accum_statistics.rx.ofdm_ht; 89 accum_ht = &priv->accum_statistics.rx.ofdm_ht;
90 delta_ofdm = &priv->_agn.delta_statistics.rx.ofdm; 90 delta_ofdm = &priv->delta_statistics.rx.ofdm;
91 delta_cck = &priv->_agn.delta_statistics.rx.cck; 91 delta_cck = &priv->delta_statistics.rx.cck;
92 delta_general = &priv->_agn.delta_statistics.rx.general; 92 delta_general = &priv->delta_statistics.rx.general;
93 delta_ht = &priv->_agn.delta_statistics.rx.ofdm_ht; 93 delta_ht = &priv->delta_statistics.rx.ofdm_ht;
94 max_ofdm = &priv->_agn.max_delta.rx.ofdm; 94 max_ofdm = &priv->max_delta.rx.ofdm;
95 max_cck = &priv->_agn.max_delta.rx.cck; 95 max_cck = &priv->max_delta.rx.cck;
96 max_general = &priv->_agn.max_delta.rx.general; 96 max_general = &priv->max_delta.rx.general;
97 max_ht = &priv->_agn.max_delta.rx.ofdm_ht; 97 max_ht = &priv->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->_agn.statistics.tx; 563 tx = &priv->statistics.tx;
564 accum_tx = &priv->_agn.accum_statistics.tx; 564 accum_tx = &priv->accum_statistics.tx;
565 delta_tx = &priv->_agn.delta_statistics.tx; 565 delta_tx = &priv->delta_statistics.tx;
566 max_tx = &priv->_agn.max_delta.tx; 566 max_tx = &priv->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->_agn.statistics.general; 780 general = &priv->statistics.general;
781 dbg = &priv->_agn.statistics.general.dbg; 781 dbg = &priv->statistics.general.dbg;
782 div = &priv->_agn.statistics.general.div; 782 div = &priv->statistics.general.div;
783 accum_general = &priv->_agn.accum_statistics.general; 783 accum_general = &priv->accum_statistics.general;
784 delta_general = &priv->_agn.delta_statistics.general; 784 delta_general = &priv->delta_statistics.general;
785 max_general = &priv->_agn.max_delta.general; 785 max_general = &priv->max_delta.general;
786 accum_dbg = &priv->_agn.accum_statistics.general.dbg; 786 accum_dbg = &priv->accum_statistics.general.dbg;
787 delta_dbg = &priv->_agn.delta_statistics.general.dbg; 787 delta_dbg = &priv->delta_statistics.general.dbg;
788 max_dbg = &priv->_agn.max_delta.general.dbg; 788 max_dbg = &priv->max_delta.general.dbg;
789 accum_div = &priv->_agn.accum_statistics.general.div; 789 accum_div = &priv->accum_statistics.general.div;
790 delta_div = &priv->_agn.delta_statistics.general.div; 790 delta_div = &priv->delta_statistics.general.div;
791 max_div = &priv->_agn.max_delta.general.div; 791 max_div = &priv->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 501d97f19170..57c122d4d806 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -322,8 +322,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv)
322void iwlagn_temperature(struct iwl_priv *priv) 322void iwlagn_temperature(struct iwl_priv *priv)
323{ 323{
324 /* store temperature from statistics (in Celsius) */ 324 /* store temperature from statistics (in Celsius) */
325 priv->temperature = 325 priv->temperature = le32_to_cpu(priv->statistics.general.temperature);
326 le32_to_cpu(priv->_agn.statistics.general.temperature);
327 iwl_tt_handler(priv); 326 iwl_tt_handler(priv);
328} 327}
329 328
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index a5db952d953b..f13f438fd227 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1450,13 +1450,13 @@ bool iwl_good_ack_health(struct iwl_priv *priv,
1450 1450
1451 actual_ack_cnt_delta = 1451 actual_ack_cnt_delta =
1452 le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) - 1452 le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) -
1453 le32_to_cpu(priv->_agn.statistics.tx.actual_ack_cnt); 1453 le32_to_cpu(priv->statistics.tx.actual_ack_cnt);
1454 expected_ack_cnt_delta = 1454 expected_ack_cnt_delta =
1455 le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) - 1455 le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) -
1456 le32_to_cpu(priv->_agn.statistics.tx.expected_ack_cnt); 1456 le32_to_cpu(priv->statistics.tx.expected_ack_cnt);
1457 ba_timeout_delta = 1457 ba_timeout_delta =
1458 le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) - 1458 le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) -
1459 le32_to_cpu(priv->_agn.statistics.tx.agg.ba_timeout); 1459 le32_to_cpu(priv->statistics.tx.agg.ba_timeout);
1460 if ((priv->_agn.agg_tids_count > 0) && 1460 if ((priv->_agn.agg_tids_count > 0) &&
1461 (expected_ack_cnt_delta > 0) && 1461 (expected_ack_cnt_delta > 0) &&
1462 (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta) 1462 (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta)
@@ -1473,10 +1473,10 @@ bool iwl_good_ack_health(struct iwl_priv *priv,
1473 * DEBUG is not, these will just compile out. 1473 * DEBUG is not, these will just compile out.
1474 */ 1474 */
1475 IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n", 1475 IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n",
1476 priv->_agn.delta_statistics.tx.rx_detected_cnt); 1476 priv->delta_statistics.tx.rx_detected_cnt);
1477 IWL_DEBUG_RADIO(priv, 1477 IWL_DEBUG_RADIO(priv,
1478 "ack_or_ba_timeout_collision delta = %d\n", 1478 "ack_or_ba_timeout_collision delta = %d\n",
1479 priv->_agn.delta_statistics.tx. 1479 priv->delta_statistics.tx.
1480 ack_or_ba_timeout_collision); 1480 ack_or_ba_timeout_collision);
1481#endif 1481#endif
1482 IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n", 1482 IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
@@ -2769,9 +2769,9 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work)
2769 } 2769 }
2770 2770
2771 if (priv->start_calib) { 2771 if (priv->start_calib) {
2772 iwl_chain_noise_calibration(priv, &priv->_agn.statistics); 2772 iwl_chain_noise_calibration(priv, &priv->statistics);
2773 2773
2774 iwl_sensitivity_calibration(priv, &priv->_agn.statistics); 2774 iwl_sensitivity_calibration(priv, &priv->statistics);
2775 } 2775 }
2776 2776
2777 mutex_unlock(&priv->mutex); 2777 mutex_unlock(&priv->mutex);
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 57a3c579c870..90efb8c6d16b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1207,6 +1207,13 @@ struct iwl_priv {
1207 struct iwl_power_mgr power_data; 1207 struct iwl_power_mgr power_data;
1208 struct iwl_tt_mgmt thermal_throttle; 1208 struct iwl_tt_mgmt thermal_throttle;
1209 1209
1210 struct iwl_notif_statistics statistics;
1211#ifdef CONFIG_IWLWIFI_DEBUG
1212 struct iwl_notif_statistics accum_statistics;
1213 struct iwl_notif_statistics delta_statistics;
1214 struct iwl_notif_statistics max_delta;
1215#endif
1216
1210 /* context information */ 1217 /* context information */
1211 u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ 1218 u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */
1212 u8 mac_addr[ETH_ALEN]; 1219 u8 mac_addr[ETH_ALEN];
@@ -1298,13 +1305,6 @@ struct iwl_priv {
1298 1305
1299 struct completion firmware_loading_complete; 1306 struct completion firmware_loading_complete;
1300 1307
1301 struct iwl_notif_statistics statistics;
1302#ifdef CONFIG_IWLWIFI_DEBUGFS
1303 struct iwl_notif_statistics accum_statistics;
1304 struct iwl_notif_statistics delta_statistics;
1305 struct iwl_notif_statistics max_delta;
1306#endif
1307
1308 u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr; 1308 u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr;
1309 u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr; 1309 u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr;
1310 } _agn; 1310 } _agn;
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index 5cd756077422..5e32057d6938 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -251,7 +251,7 @@ EXPORT_SYMBOL(iwl_rx_spectrum_measure_notif);
251static void iwl_rx_calc_noise(struct iwl_priv *priv) 251static void iwl_rx_calc_noise(struct iwl_priv *priv)
252{ 252{
253 struct statistics_rx_non_phy *rx_info 253 struct statistics_rx_non_phy *rx_info
254 = &(priv->_agn.statistics.rx.general); 254 = &(priv->statistics.rx.general);
255 int num_active_rx = 0; 255 int num_active_rx = 0;
256 int total_silence = 0; 256 int total_silence = 0;
257 int bcn_silence_a = 257 int bcn_silence_a =
@@ -300,10 +300,10 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
300 u32 *accum_stats; 300 u32 *accum_stats;
301 u32 *delta, *max_delta; 301 u32 *delta, *max_delta;
302 302
303 prev_stats = (__le32 *)&priv->_agn.statistics; 303 prev_stats = (__le32 *)&priv->statistics;
304 accum_stats = (u32 *)&priv->_agn.accum_statistics; 304 accum_stats = (u32 *)&priv->accum_statistics;
305 delta = (u32 *)&priv->_agn.delta_statistics; 305 delta = (u32 *)&priv->delta_statistics;
306 max_delta = (u32 *)&priv->_agn.max_delta; 306 max_delta = (u32 *)&priv->max_delta;
307 307
308 for (i = sizeof(__le32); i < sizeof(struct iwl_notif_statistics); 308 for (i = sizeof(__le32); i < sizeof(struct iwl_notif_statistics);
309 i += sizeof(__le32), stats++, prev_stats++, delta++, 309 i += sizeof(__le32), stats++, prev_stats++, delta++,
@@ -318,18 +318,18 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
318 } 318 }
319 319
320 /* reset accumulative statistics for "no-counter" type statistics */ 320 /* reset accumulative statistics for "no-counter" type statistics */
321 priv->_agn.accum_statistics.general.temperature = 321 priv->accum_statistics.general.temperature =
322 priv->_agn.statistics.general.temperature; 322 priv->statistics.general.temperature;
323 priv->_agn.accum_statistics.general.temperature_m = 323 priv->accum_statistics.general.temperature_m =
324 priv->_agn.statistics.general.temperature_m; 324 priv->statistics.general.temperature_m;
325 priv->_agn.accum_statistics.general.ttl_timestamp = 325 priv->accum_statistics.general.ttl_timestamp =
326 priv->_agn.statistics.general.ttl_timestamp; 326 priv->statistics.general.ttl_timestamp;
327 priv->_agn.accum_statistics.tx.tx_power.ant_a = 327 priv->accum_statistics.tx.tx_power.ant_a =
328 priv->_agn.statistics.tx.tx_power.ant_a; 328 priv->statistics.tx.tx_power.ant_a;
329 priv->_agn.accum_statistics.tx.tx_power.ant_b = 329 priv->accum_statistics.tx.tx_power.ant_b =
330 priv->_agn.statistics.tx.tx_power.ant_b; 330 priv->statistics.tx.tx_power.ant_b;
331 priv->_agn.accum_statistics.tx.tx_power.ant_c = 331 priv->accum_statistics.tx.tx_power.ant_c =
332 priv->_agn.statistics.tx.tx_power.ant_c; 332 priv->statistics.tx.tx_power.ant_c;
333} 333}
334#endif 334#endif
335 335
@@ -364,9 +364,9 @@ bool iwl_good_plcp_health(struct iwl_priv *priv,
364 if (plcp_msec) { 364 if (plcp_msec) {
365 combined_plcp_delta = 365 combined_plcp_delta =
366 (le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err) - 366 (le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err) -
367 le32_to_cpu(priv->_agn.statistics.rx.ofdm.plcp_err)) + 367 le32_to_cpu(priv->statistics.rx.ofdm.plcp_err)) +
368 (le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err) - 368 (le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err) -
369 le32_to_cpu(priv->_agn.statistics.rx.ofdm_ht.plcp_err)); 369 le32_to_cpu(priv->statistics.rx.ofdm_ht.plcp_err));
370 370
371 if ((combined_plcp_delta > 0) && 371 if ((combined_plcp_delta > 0) &&
372 ((combined_plcp_delta * 100) / plcp_msec) > 372 ((combined_plcp_delta * 100) / plcp_msec) >
@@ -386,10 +386,10 @@ bool iwl_good_plcp_health(struct iwl_priv *priv,
386 "%u, %u, %u, %u, %d, %u mSecs\n", 386 "%u, %u, %u, %u, %d, %u mSecs\n",
387 priv->cfg->plcp_delta_threshold, 387 priv->cfg->plcp_delta_threshold,
388 le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err), 388 le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err),
389 le32_to_cpu(priv->_agn.statistics.rx.ofdm.plcp_err), 389 le32_to_cpu(priv->statistics.rx.ofdm.plcp_err),
390 le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err), 390 le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err),
391 le32_to_cpu( 391 le32_to_cpu(
392 priv->_agn.statistics.rx.ofdm_ht.plcp_err), 392 priv->statistics.rx.ofdm_ht.plcp_err),
393 combined_plcp_delta, plcp_msec); 393 combined_plcp_delta, plcp_msec);
394 rc = false; 394 rc = false;
395 } 395 }
@@ -439,12 +439,12 @@ void iwl_rx_statistics(struct iwl_priv *priv,
439 439
440 440
441 IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", 441 IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n",
442 (int)sizeof(priv->_agn.statistics), 442 (int)sizeof(priv->statistics),
443 le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); 443 le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
444 444
445 change = ((priv->_agn.statistics.general.temperature != 445 change = ((priv->statistics.general.temperature !=
446 pkt->u.stats.general.temperature) || 446 pkt->u.stats.general.temperature) ||
447 ((priv->_agn.statistics.flag & 447 ((priv->statistics.flag &
448 STATISTICS_REPLY_FLG_HT40_MODE_MSK) != 448 STATISTICS_REPLY_FLG_HT40_MODE_MSK) !=
449 (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK))); 449 (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)));
450 450
@@ -453,8 +453,7 @@ void iwl_rx_statistics(struct iwl_priv *priv,
453#endif 453#endif
454 iwl_recover_from_statistics(priv, pkt); 454 iwl_recover_from_statistics(priv, pkt);
455 455
456 memcpy(&priv->_agn.statistics, &pkt->u.stats, 456 memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics));
457 sizeof(priv->_agn.statistics));
458 457
459 set_bit(STATUS_STATISTICS, &priv->status); 458 set_bit(STATUS_STATISTICS, &priv->status);
460 459
@@ -482,11 +481,11 @@ void iwl_reply_statistics(struct iwl_priv *priv,
482 481
483 if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { 482 if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) {
484#ifdef CONFIG_IWLWIFI_DEBUGFS 483#ifdef CONFIG_IWLWIFI_DEBUGFS
485 memset(&priv->_agn.accum_statistics, 0, 484 memset(&priv->accum_statistics, 0,
486 sizeof(struct iwl_notif_statistics)); 485 sizeof(struct iwl_notif_statistics));
487 memset(&priv->_agn.delta_statistics, 0, 486 memset(&priv->delta_statistics, 0,
488 sizeof(struct iwl_notif_statistics)); 487 sizeof(struct iwl_notif_statistics));
489 memset(&priv->_agn.max_delta, 0, 488 memset(&priv->max_delta, 0,
490 sizeof(struct iwl_notif_statistics)); 489 sizeof(struct iwl_notif_statistics));
491#endif 490#endif
492 IWL_DEBUG_RX(priv, "Statistics have been cleared\n"); 491 IWL_DEBUG_RX(priv, "Statistics have been cleared\n");