diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-04-30 17:21:48 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-13 13:42:45 -0400 |
commit | a2064b7a4a22d118087898e4308670da7ac07911 (patch) | |
tree | 1951ff14c67fa8a34fa28ca0aa112a6e8a777c51 /drivers | |
parent | 0af8bcae6f44aa440e51b1925635fb835cd68058 (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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | 64 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 57 |
8 files changed, 85 insertions, 82 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index d3afddae8d9f..03b066c7aa3c 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->statistics.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { | 1545 | (priv->_agn.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->statistics.general.temperature), 23); | 1570 | le32_to_cpu(priv->_agn.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 a28af7eb67eb..447ec4885a41 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->statistics.general.temperature); | 263 | vt = le32_to_cpu(priv->_agn.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 48c023b4ca36..90be033ee269 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | |||
@@ -58,22 +58,22 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf, | |||
58 | * the last statistics notification from uCode | 58 | * the last statistics notification from uCode |
59 | * might not reflect the current uCode activity | 59 | * might not reflect the current uCode activity |
60 | */ | 60 | */ |
61 | ofdm = &priv->statistics.rx.ofdm; | 61 | ofdm = &priv->_agn.statistics.rx.ofdm; |
62 | cck = &priv->statistics.rx.cck; | 62 | cck = &priv->_agn.statistics.rx.cck; |
63 | general = &priv->statistics.rx.general; | 63 | general = &priv->_agn.statistics.rx.general; |
64 | ht = &priv->statistics.rx.ofdm_ht; | 64 | ht = &priv->_agn.statistics.rx.ofdm_ht; |
65 | accum_ofdm = &priv->accum_statistics.rx.ofdm; | 65 | accum_ofdm = &priv->_agn.accum_statistics.rx.ofdm; |
66 | accum_cck = &priv->accum_statistics.rx.cck; | 66 | accum_cck = &priv->_agn.accum_statistics.rx.cck; |
67 | accum_general = &priv->accum_statistics.rx.general; | 67 | accum_general = &priv->_agn.accum_statistics.rx.general; |
68 | accum_ht = &priv->accum_statistics.rx.ofdm_ht; | 68 | accum_ht = &priv->_agn.accum_statistics.rx.ofdm_ht; |
69 | delta_ofdm = &priv->delta_statistics.rx.ofdm; | 69 | delta_ofdm = &priv->_agn.delta_statistics.rx.ofdm; |
70 | delta_cck = &priv->delta_statistics.rx.cck; | 70 | delta_cck = &priv->_agn.delta_statistics.rx.cck; |
71 | delta_general = &priv->delta_statistics.rx.general; | 71 | delta_general = &priv->_agn.delta_statistics.rx.general; |
72 | delta_ht = &priv->delta_statistics.rx.ofdm_ht; | 72 | delta_ht = &priv->_agn.delta_statistics.rx.ofdm_ht; |
73 | max_ofdm = &priv->max_delta.rx.ofdm; | 73 | max_ofdm = &priv->_agn.max_delta.rx.ofdm; |
74 | max_cck = &priv->max_delta.rx.cck; | 74 | max_cck = &priv->_agn.max_delta.rx.cck; |
75 | max_general = &priv->max_delta.rx.general; | 75 | max_general = &priv->_agn.max_delta.rx.general; |
76 | max_ht = &priv->max_delta.rx.ofdm_ht; | 76 | max_ht = &priv->_agn.max_delta.rx.ofdm_ht; |
77 | 77 | ||
78 | pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); | 78 | pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); |
79 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 79 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
@@ -539,10 +539,10 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file, | |||
539 | * the last statistics notification from uCode | 539 | * the last statistics notification from uCode |
540 | * might not reflect the current uCode activity | 540 | * might not reflect the current uCode activity |
541 | */ | 541 | */ |
542 | tx = &priv->statistics.tx; | 542 | tx = &priv->_agn.statistics.tx; |
543 | accum_tx = &priv->accum_statistics.tx; | 543 | accum_tx = &priv->_agn.accum_statistics.tx; |
544 | delta_tx = &priv->delta_statistics.tx; | 544 | delta_tx = &priv->_agn.delta_statistics.tx; |
545 | max_tx = &priv->max_delta.tx; | 545 | max_tx = &priv->_agn.max_delta.tx; |
546 | pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); | 546 | pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); |
547 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 547 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
548 | "acumulative delta max\n", | 548 | "acumulative delta max\n", |
@@ -756,18 +756,18 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf, | |||
756 | * the last statistics notification from uCode | 756 | * the last statistics notification from uCode |
757 | * might not reflect the current uCode activity | 757 | * might not reflect the current uCode activity |
758 | */ | 758 | */ |
759 | general = &priv->statistics.general; | 759 | general = &priv->_agn.statistics.general; |
760 | dbg = &priv->statistics.general.dbg; | 760 | dbg = &priv->_agn.statistics.general.dbg; |
761 | div = &priv->statistics.general.div; | 761 | div = &priv->_agn.statistics.general.div; |
762 | accum_general = &priv->accum_statistics.general; | 762 | accum_general = &priv->_agn.accum_statistics.general; |
763 | delta_general = &priv->delta_statistics.general; | 763 | delta_general = &priv->_agn.delta_statistics.general; |
764 | max_general = &priv->max_delta.general; | 764 | max_general = &priv->_agn.max_delta.general; |
765 | accum_dbg = &priv->accum_statistics.general.dbg; | 765 | accum_dbg = &priv->_agn.accum_statistics.general.dbg; |
766 | delta_dbg = &priv->delta_statistics.general.dbg; | 766 | delta_dbg = &priv->_agn.delta_statistics.general.dbg; |
767 | max_dbg = &priv->max_delta.general.dbg; | 767 | max_dbg = &priv->_agn.max_delta.general.dbg; |
768 | accum_div = &priv->accum_statistics.general.div; | 768 | accum_div = &priv->_agn.accum_statistics.general.div; |
769 | delta_div = &priv->delta_statistics.general.div; | 769 | delta_div = &priv->_agn.delta_statistics.general.div; |
770 | max_div = &priv->max_delta.general.div; | 770 | max_div = &priv->_agn.max_delta.general.div; |
771 | pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); | 771 | pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); |
772 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 772 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
773 | "acumulative delta max\n", | 773 | "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 637d7b62fb56..c7ce63254373 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -319,7 +319,8 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
319 | void iwlagn_temperature(struct iwl_priv *priv) | 319 | void iwlagn_temperature(struct iwl_priv *priv) |
320 | { | 320 | { |
321 | /* store temperature from statistics (in Celsius) */ | 321 | /* store temperature from statistics (in Celsius) */ |
322 | priv->temperature = le32_to_cpu(priv->statistics.general.temperature); | 322 | priv->temperature = |
323 | le32_to_cpu(priv->_agn.statistics.general.temperature); | ||
323 | iwl_tt_handler(priv); | 324 | iwl_tt_handler(priv); |
324 | } | 325 | } |
325 | 326 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index d7a9aea6cdaa..f62a345d71dc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1449,13 +1449,13 @@ bool iwl_good_ack_health(struct iwl_priv *priv, | |||
1449 | 1449 | ||
1450 | actual_ack_cnt_delta = | 1450 | actual_ack_cnt_delta = |
1451 | le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) - | 1451 | le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) - |
1452 | le32_to_cpu(priv->statistics.tx.actual_ack_cnt); | 1452 | le32_to_cpu(priv->_agn.statistics.tx.actual_ack_cnt); |
1453 | expected_ack_cnt_delta = | 1453 | expected_ack_cnt_delta = |
1454 | le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) - | 1454 | le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) - |
1455 | le32_to_cpu(priv->statistics.tx.expected_ack_cnt); | 1455 | le32_to_cpu(priv->_agn.statistics.tx.expected_ack_cnt); |
1456 | ba_timeout_delta = | 1456 | ba_timeout_delta = |
1457 | le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) - | 1457 | le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) - |
1458 | le32_to_cpu(priv->statistics.tx.agg.ba_timeout); | 1458 | le32_to_cpu(priv->_agn.statistics.tx.agg.ba_timeout); |
1459 | if ((priv->_agn.agg_tids_count > 0) && | 1459 | if ((priv->_agn.agg_tids_count > 0) && |
1460 | (expected_ack_cnt_delta > 0) && | 1460 | (expected_ack_cnt_delta > 0) && |
1461 | (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta) | 1461 | (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta) |
@@ -1467,10 +1467,10 @@ bool iwl_good_ack_health(struct iwl_priv *priv, | |||
1467 | 1467 | ||
1468 | #ifdef CONFIG_IWLWIFI_DEBUG | 1468 | #ifdef CONFIG_IWLWIFI_DEBUG |
1469 | IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n", | 1469 | IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n", |
1470 | priv->delta_statistics.tx.rx_detected_cnt); | 1470 | priv->_agn.delta_statistics.tx.rx_detected_cnt); |
1471 | IWL_DEBUG_RADIO(priv, | 1471 | IWL_DEBUG_RADIO(priv, |
1472 | "ack_or_ba_timeout_collision delta = %d\n", | 1472 | "ack_or_ba_timeout_collision delta = %d\n", |
1473 | priv->delta_statistics.tx. | 1473 | priv->_agn.delta_statistics.tx. |
1474 | ack_or_ba_timeout_collision); | 1474 | ack_or_ba_timeout_collision); |
1475 | #endif | 1475 | #endif |
1476 | IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n", | 1476 | IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n", |
@@ -2685,9 +2685,9 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
2685 | } | 2685 | } |
2686 | 2686 | ||
2687 | if (priv->start_calib) { | 2687 | if (priv->start_calib) { |
2688 | iwl_chain_noise_calibration(priv, &priv->statistics); | 2688 | iwl_chain_noise_calibration(priv, &priv->_agn.statistics); |
2689 | 2689 | ||
2690 | iwl_sensitivity_calibration(priv, &priv->statistics); | 2690 | iwl_sensitivity_calibration(priv, &priv->_agn.statistics); |
2691 | } | 2691 | } |
2692 | 2692 | ||
2693 | mutex_unlock(&priv->mutex); | 2693 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 4d6de2dfedd1..c248373b89e9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -105,16 +105,17 @@ int iwl_dbgfs_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) | |||
105 | int p = 0; | 105 | int p = 0; |
106 | 106 | ||
107 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", | 107 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", |
108 | le32_to_cpu(priv->statistics.flag)); | 108 | le32_to_cpu(priv->_agn.statistics.flag)); |
109 | if (le32_to_cpu(priv->statistics.flag) & UCODE_STATISTICS_CLEAR_MSK) | 109 | if (le32_to_cpu(priv->_agn.statistics.flag) & |
110 | UCODE_STATISTICS_CLEAR_MSK) | ||
110 | p += scnprintf(buf + p, bufsz - p, | 111 | p += scnprintf(buf + p, bufsz - p, |
111 | "\tStatistics have been cleared\n"); | 112 | "\tStatistics have been cleared\n"); |
112 | p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n", | 113 | p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n", |
113 | (le32_to_cpu(priv->statistics.flag) & | 114 | (le32_to_cpu(priv->_agn.statistics.flag) & |
114 | UCODE_STATISTICS_FREQUENCY_MSK) | 115 | UCODE_STATISTICS_FREQUENCY_MSK) |
115 | ? "2.4 GHz" : "5.2 GHz"); | 116 | ? "2.4 GHz" : "5.2 GHz"); |
116 | p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n", | 117 | p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n", |
117 | (le32_to_cpu(priv->statistics.flag) & | 118 | (le32_to_cpu(priv->_agn.statistics.flag) & |
118 | UCODE_STATISTICS_NARROW_BAND_MSK) | 119 | UCODE_STATISTICS_NARROW_BAND_MSK) |
119 | ? "enabled" : "disabled"); | 120 | ? "enabled" : "disabled"); |
120 | return p; | 121 | return p; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index f3f3473c5c7e..858a548330a5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1220,13 +1220,6 @@ struct iwl_priv { | |||
1220 | struct iwl_power_mgr power_data; | 1220 | struct iwl_power_mgr power_data; |
1221 | struct iwl_tt_mgmt thermal_throttle; | 1221 | struct iwl_tt_mgmt thermal_throttle; |
1222 | 1222 | ||
1223 | struct iwl_notif_statistics statistics; | ||
1224 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1225 | struct iwl_notif_statistics accum_statistics; | ||
1226 | struct iwl_notif_statistics delta_statistics; | ||
1227 | struct iwl_notif_statistics max_delta; | ||
1228 | #endif | ||
1229 | |||
1230 | /* context information */ | 1223 | /* context information */ |
1231 | u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ | 1224 | u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ |
1232 | u8 mac_addr[ETH_ALEN]; | 1225 | u8 mac_addr[ETH_ALEN]; |
@@ -1315,6 +1308,13 @@ struct iwl_priv { | |||
1315 | bool last_phy_res_valid; | 1308 | bool last_phy_res_valid; |
1316 | 1309 | ||
1317 | struct completion firmware_loading_complete; | 1310 | struct completion firmware_loading_complete; |
1311 | |||
1312 | struct iwl_notif_statistics statistics; | ||
1313 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1314 | struct iwl_notif_statistics accum_statistics; | ||
1315 | struct iwl_notif_statistics delta_statistics; | ||
1316 | struct iwl_notif_statistics max_delta; | ||
1317 | #endif | ||
1318 | } _agn; | 1318 | } _agn; |
1319 | #endif | 1319 | #endif |
1320 | }; | 1320 | }; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index c7c8d8a43eb3..aea5cf41f4bb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -250,7 +250,7 @@ EXPORT_SYMBOL(iwl_rx_spectrum_measure_notif); | |||
250 | static void iwl_rx_calc_noise(struct iwl_priv *priv) | 250 | static void iwl_rx_calc_noise(struct iwl_priv *priv) |
251 | { | 251 | { |
252 | struct statistics_rx_non_phy *rx_info | 252 | struct statistics_rx_non_phy *rx_info |
253 | = &(priv->statistics.rx.general); | 253 | = &(priv->_agn.statistics.rx.general); |
254 | int num_active_rx = 0; | 254 | int num_active_rx = 0; |
255 | int total_silence = 0; | 255 | int total_silence = 0; |
256 | int bcn_silence_a = | 256 | int bcn_silence_a = |
@@ -299,10 +299,10 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv, | |||
299 | u32 *accum_stats; | 299 | u32 *accum_stats; |
300 | u32 *delta, *max_delta; | 300 | u32 *delta, *max_delta; |
301 | 301 | ||
302 | prev_stats = (__le32 *)&priv->statistics; | 302 | prev_stats = (__le32 *)&priv->_agn.statistics; |
303 | accum_stats = (u32 *)&priv->accum_statistics; | 303 | accum_stats = (u32 *)&priv->_agn.accum_statistics; |
304 | delta = (u32 *)&priv->delta_statistics; | 304 | delta = (u32 *)&priv->_agn.delta_statistics; |
305 | max_delta = (u32 *)&priv->max_delta; | 305 | max_delta = (u32 *)&priv->_agn.max_delta; |
306 | 306 | ||
307 | for (i = sizeof(__le32); i < sizeof(struct iwl_notif_statistics); | 307 | for (i = sizeof(__le32); i < sizeof(struct iwl_notif_statistics); |
308 | i += sizeof(__le32), stats++, prev_stats++, delta++, | 308 | i += sizeof(__le32), stats++, prev_stats++, delta++, |
@@ -317,18 +317,18 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /* reset accumulative statistics for "no-counter" type statistics */ | 319 | /* reset accumulative statistics for "no-counter" type statistics */ |
320 | priv->accum_statistics.general.temperature = | 320 | priv->_agn.accum_statistics.general.temperature = |
321 | priv->statistics.general.temperature; | 321 | priv->_agn.statistics.general.temperature; |
322 | priv->accum_statistics.general.temperature_m = | 322 | priv->_agn.accum_statistics.general.temperature_m = |
323 | priv->statistics.general.temperature_m; | 323 | priv->_agn.statistics.general.temperature_m; |
324 | priv->accum_statistics.general.ttl_timestamp = | 324 | priv->_agn.accum_statistics.general.ttl_timestamp = |
325 | priv->statistics.general.ttl_timestamp; | 325 | priv->_agn.statistics.general.ttl_timestamp; |
326 | priv->accum_statistics.tx.tx_power.ant_a = | 326 | priv->_agn.accum_statistics.tx.tx_power.ant_a = |
327 | priv->statistics.tx.tx_power.ant_a; | 327 | priv->_agn.statistics.tx.tx_power.ant_a; |
328 | priv->accum_statistics.tx.tx_power.ant_b = | 328 | priv->_agn.accum_statistics.tx.tx_power.ant_b = |
329 | priv->statistics.tx.tx_power.ant_b; | 329 | priv->_agn.statistics.tx.tx_power.ant_b; |
330 | priv->accum_statistics.tx.tx_power.ant_c = | 330 | priv->_agn.accum_statistics.tx.tx_power.ant_c = |
331 | priv->statistics.tx.tx_power.ant_c; | 331 | priv->_agn.statistics.tx.tx_power.ant_c; |
332 | } | 332 | } |
333 | #endif | 333 | #endif |
334 | 334 | ||
@@ -363,9 +363,9 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
363 | if (plcp_msec) { | 363 | if (plcp_msec) { |
364 | combined_plcp_delta = | 364 | combined_plcp_delta = |
365 | (le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err) - | 365 | (le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err) - |
366 | le32_to_cpu(priv->statistics.rx.ofdm.plcp_err)) + | 366 | le32_to_cpu(priv->_agn.statistics.rx.ofdm.plcp_err)) + |
367 | (le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err) - | 367 | (le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err) - |
368 | le32_to_cpu(priv->statistics.rx.ofdm_ht.plcp_err)); | 368 | le32_to_cpu(priv->_agn.statistics.rx.ofdm_ht.plcp_err)); |
369 | 369 | ||
370 | if ((combined_plcp_delta > 0) && | 370 | if ((combined_plcp_delta > 0) && |
371 | ((combined_plcp_delta * 100) / plcp_msec) > | 371 | ((combined_plcp_delta * 100) / plcp_msec) > |
@@ -385,10 +385,10 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
385 | "%u, %u, %u, %u, %d, %u mSecs\n", | 385 | "%u, %u, %u, %u, %d, %u mSecs\n", |
386 | priv->cfg->plcp_delta_threshold, | 386 | priv->cfg->plcp_delta_threshold, |
387 | le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err), | 387 | le32_to_cpu(pkt->u.stats.rx.ofdm.plcp_err), |
388 | le32_to_cpu(priv->statistics.rx.ofdm.plcp_err), | 388 | le32_to_cpu(priv->_agn.statistics.rx.ofdm.plcp_err), |
389 | le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err), | 389 | le32_to_cpu(pkt->u.stats.rx.ofdm_ht.plcp_err), |
390 | le32_to_cpu( | 390 | le32_to_cpu( |
391 | priv->statistics.rx.ofdm_ht.plcp_err), | 391 | priv->_agn.statistics.rx.ofdm_ht.plcp_err), |
392 | combined_plcp_delta, plcp_msec); | 392 | combined_plcp_delta, plcp_msec); |
393 | rc = false; | 393 | rc = false; |
394 | } | 394 | } |
@@ -438,12 +438,12 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
438 | 438 | ||
439 | 439 | ||
440 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", | 440 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", |
441 | (int)sizeof(priv->statistics), | 441 | (int)sizeof(priv->_agn.statistics), |
442 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); | 442 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); |
443 | 443 | ||
444 | change = ((priv->statistics.general.temperature != | 444 | change = ((priv->_agn.statistics.general.temperature != |
445 | pkt->u.stats.general.temperature) || | 445 | pkt->u.stats.general.temperature) || |
446 | ((priv->statistics.flag & | 446 | ((priv->_agn.statistics.flag & |
447 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != | 447 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != |
448 | (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK))); | 448 | (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK))); |
449 | 449 | ||
@@ -452,7 +452,8 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
452 | #endif | 452 | #endif |
453 | iwl_recover_from_statistics(priv, pkt); | 453 | iwl_recover_from_statistics(priv, pkt); |
454 | 454 | ||
455 | memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics)); | 455 | memcpy(&priv->_agn.statistics, &pkt->u.stats, |
456 | sizeof(priv->_agn.statistics)); | ||
456 | 457 | ||
457 | set_bit(STATUS_STATISTICS, &priv->status); | 458 | set_bit(STATUS_STATISTICS, &priv->status); |
458 | 459 | ||
@@ -480,11 +481,11 @@ void iwl_reply_statistics(struct iwl_priv *priv, | |||
480 | 481 | ||
481 | 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) { |
482 | #ifdef CONFIG_IWLWIFI_DEBUG | 483 | #ifdef CONFIG_IWLWIFI_DEBUG |
483 | memset(&priv->accum_statistics, 0, | 484 | memset(&priv->_agn.accum_statistics, 0, |
484 | sizeof(struct iwl_notif_statistics)); | 485 | sizeof(struct iwl_notif_statistics)); |
485 | memset(&priv->delta_statistics, 0, | 486 | memset(&priv->_agn.delta_statistics, 0, |
486 | sizeof(struct iwl_notif_statistics)); | 487 | sizeof(struct iwl_notif_statistics)); |
487 | memset(&priv->max_delta, 0, | 488 | memset(&priv->_agn.max_delta, 0, |
488 | sizeof(struct iwl_notif_statistics)); | 489 | sizeof(struct iwl_notif_statistics)); |
489 | #endif | 490 | #endif |
490 | IWL_DEBUG_RX(priv, "Statistics have been cleared\n"); | 491 | IWL_DEBUG_RX(priv, "Statistics have been cleared\n"); |