aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-01-14 09:16:03 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-01-22 10:54:06 -0500
commit75e52472add9bb6aa219c491103d240c899cf432 (patch)
tree0b36e523ba8332ea740d42142c4d17116b1551f3
parent66396583e1dc38359a4d182bbcf22b925f4e7233 (diff)
iwlwifi: mvm: sync statistics firmware API
The firmware API structs are split differently, synchronize the struct splits with the current firmware definitions. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api.h70
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/rx.c4
2 files changed, 37 insertions, 37 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api.h b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
index b3badec1d228..1a934a64b358 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
@@ -1400,24 +1400,6 @@ struct mvm_statistics_div {
1400 __le32 reserved2; 1400 __le32 reserved2;
1401} __packed; /* STATISTICS_SLOW_DIV_API_S_VER_2 */ 1401} __packed; /* STATISTICS_SLOW_DIV_API_S_VER_2 */
1402 1402
1403struct mvm_statistics_general_common {
1404 __le32 temperature; /* radio temperature */
1405 __le32 temperature_m; /* radio voltage */
1406 struct mvm_statistics_dbg dbg;
1407 __le32 sleep_time;
1408 __le32 slots_out;
1409 __le32 slots_idle;
1410 __le32 ttl_timestamp;
1411 struct mvm_statistics_div div;
1412 __le32 rx_enable_counter;
1413 /*
1414 * num_of_sos_states:
1415 * count the number of times we have to re-tune
1416 * in order to get out of bad PHY status
1417 */
1418 __le32 num_of_sos_states;
1419} __packed; /* STATISTICS_GENERAL_API_S_VER_5 */
1420
1421struct mvm_statistics_rx_non_phy { 1403struct mvm_statistics_rx_non_phy {
1422 __le32 bogus_cts; /* CTS received when not expecting CTS */ 1404 __le32 bogus_cts; /* CTS received when not expecting CTS */
1423 __le32 bogus_ack; /* ACK received when not expecting ACK */ 1405 __le32 bogus_ack; /* ACK received when not expecting ACK */
@@ -1490,6 +1472,23 @@ struct mvm_statistics_rx_ht_phy {
1490 __le32 unsupport_mcs; 1472 __le32 unsupport_mcs;
1491} __packed; /* STATISTICS_HT_RX_PHY_API_S_VER_1 */ 1473} __packed; /* STATISTICS_HT_RX_PHY_API_S_VER_1 */
1492 1474
1475struct mvm_statistics_tx_non_phy {
1476 __le32 preamble_cnt;
1477 __le32 rx_detected_cnt;
1478 __le32 bt_prio_defer_cnt;
1479 __le32 bt_prio_kill_cnt;
1480 __le32 few_bytes_cnt;
1481 __le32 cts_timeout;
1482 __le32 ack_timeout;
1483 __le32 expected_ack_cnt;
1484 __le32 actual_ack_cnt;
1485 __le32 dump_msdu_cnt;
1486 __le32 burst_abort_next_frame_mismatch_cnt;
1487 __le32 burst_abort_missing_next_frame_cnt;
1488 __le32 cts_timeout_collision;
1489 __le32 ack_or_ba_timeout_collision;
1490} __packed; /* STATISTICS_TX_NON_PHY_API_S_VER_3 */
1491
1493#define MAX_CHAINS 3 1492#define MAX_CHAINS 3
1494 1493
1495struct mvm_statistics_tx_non_phy_agg { 1494struct mvm_statistics_tx_non_phy_agg {
@@ -1520,20 +1519,7 @@ struct mvm_statistics_tx_channel_width {
1520}; /* STATISTICS_TX_CHANNEL_WIDTH_API_S_VER_1 */ 1519}; /* STATISTICS_TX_CHANNEL_WIDTH_API_S_VER_1 */
1521 1520
1522struct mvm_statistics_tx { 1521struct mvm_statistics_tx {
1523 __le32 preamble_cnt; 1522 struct mvm_statistics_tx_non_phy general;
1524 __le32 rx_detected_cnt;
1525 __le32 bt_prio_defer_cnt;
1526 __le32 bt_prio_kill_cnt;
1527 __le32 few_bytes_cnt;
1528 __le32 cts_timeout;
1529 __le32 ack_timeout;
1530 __le32 expected_ack_cnt;
1531 __le32 actual_ack_cnt;
1532 __le32 dump_msdu_cnt;
1533 __le32 burst_abort_next_frame_mismatch_cnt;
1534 __le32 burst_abort_missing_next_frame_cnt;
1535 __le32 cts_timeout_collision;
1536 __le32 ack_or_ba_timeout_collision;
1537 struct mvm_statistics_tx_non_phy_agg agg; 1523 struct mvm_statistics_tx_non_phy_agg agg;
1538 struct mvm_statistics_tx_channel_width channel_width; 1524 struct mvm_statistics_tx_channel_width channel_width;
1539} __packed; /* STATISTICS_TX_API_S_VER_4 */ 1525} __packed; /* STATISTICS_TX_API_S_VER_4 */
@@ -1551,7 +1537,21 @@ struct mvm_statistics_bt_activity {
1551} __packed; /* STATISTICS_BT_ACTIVITY_API_S_VER_1 */ 1537} __packed; /* STATISTICS_BT_ACTIVITY_API_S_VER_1 */
1552 1538
1553struct mvm_statistics_general { 1539struct mvm_statistics_general {
1554 struct mvm_statistics_general_common common; 1540 __le32 radio_temperature;
1541 __le32 radio_voltage;
1542 struct mvm_statistics_dbg dbg;
1543 __le32 sleep_time;
1544 __le32 slots_out;
1545 __le32 slots_idle;
1546 __le32 ttl_timestamp;
1547 struct mvm_statistics_div slow_div;
1548 __le32 rx_enable_counter;
1549 /*
1550 * num_of_sos_states:
1551 * count the number of times we have to re-tune
1552 * in order to get out of bad PHY status
1553 */
1554 __le32 num_of_sos_states;
1555 __le32 beacon_filtered; 1555 __le32 beacon_filtered;
1556 __le32 missed_beacons; 1556 __le32 missed_beacons;
1557 __s8 beacon_filter_average_energy; 1557 __s8 beacon_filter_average_energy;
@@ -1585,12 +1585,12 @@ struct mvm_statistics_rx {
1585 * one channel that has just been scanned. 1585 * one channel that has just been scanned.
1586 */ 1586 */
1587 1587
1588struct iwl_notif_statistics { /* STATISTICS_NTFY_API_S_VER_8 */ 1588struct iwl_notif_statistics {
1589 __le32 flag; 1589 __le32 flag;
1590 struct mvm_statistics_rx rx; 1590 struct mvm_statistics_rx rx;
1591 struct mvm_statistics_tx tx; 1591 struct mvm_statistics_tx tx;
1592 struct mvm_statistics_general general; 1592 struct mvm_statistics_general general;
1593} __packed; 1593} __packed; /* STATISTICS_NTFY_API_S_VER_8 */
1594 1594
1595/*********************************** 1595/***********************************
1596 * Smart Fifo API 1596 * Smart Fifo API
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c
index 94b6e7297a1e..02e0f3703632 100644
--- a/drivers/net/wireless/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/rx.c
@@ -511,13 +511,13 @@ int iwl_mvm_rx_statistics(struct iwl_mvm *mvm,
511{ 511{
512 struct iwl_rx_packet *pkt = rxb_addr(rxb); 512 struct iwl_rx_packet *pkt = rxb_addr(rxb);
513 struct iwl_notif_statistics *stats = (void *)&pkt->data; 513 struct iwl_notif_statistics *stats = (void *)&pkt->data;
514 struct mvm_statistics_general_common *common = &stats->general.common;
515 struct iwl_mvm_stat_data data = { 514 struct iwl_mvm_stat_data data = {
516 .stats = stats, 515 .stats = stats,
517 .mvm = mvm, 516 .mvm = mvm,
518 }; 517 };
519 518
520 iwl_mvm_tt_temp_changed(mvm, le32_to_cpu(common->temperature)); 519 iwl_mvm_tt_temp_changed(mvm,
520 le32_to_cpu(stats->general.radio_temperature));
521 521
522 iwl_mvm_update_rx_statistics(mvm, stats); 522 iwl_mvm_update_rx_statistics(mvm, stats);
523 523