summaryrefslogtreecommitdiffstats
path: root/sys/dev/iwn
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2014-03-01 02:57:22 +0000
committeradrian <adrian@FreeBSD.org>2014-03-01 02:57:22 +0000
commitf1be80c4cf19e5c0f26c19032dd313135f9f09ea (patch)
treec4d615f36254c977468ffeac1f56dd84a2527137 /sys/dev/iwn
parent1bfee5ea6c1a4e3b11379bfe9fa01aaaaab8476d (diff)
downloadFreeBSD-src-f1be80c4cf19e5c0f26c19032dd313135f9f09ea.zip
FreeBSD-src-f1be80c4cf19e5c0f26c19032dd313135f9f09ea.tar.gz
Add the bluetooth information structs to the firmware RX statistics message.
It turns out that there's a variant format of the RX statisitcs notification from the intel firmware. It's even more whacked - the non-BT variant has bluetooth fields; apparently some later NICs return even _more_ bluetooth related fields. I'll commit the statistics structure changes here - it's a no-op for the driver. I'll later teach the driver code to populate a statistics structure from the received message after reformatting things correctly. I don't _think_ it's going to fix anything related to sensitivity programming as the CCK/OFDM (non-11n) fields are in the same place for both formats. But the HT structure and the general statistics aren't in the same place. I'll go find some NIC(s) that spit out the other format and when I find one, I'll go and update the driver to handle things correctly. Tested: * Intel 5100 (which returns the legacy, non-BT format) Obtained from: Linux iwlwifi
Diffstat (limited to 'sys/dev/iwn')
-rw-r--r--sys/dev/iwn/if_iwnreg.h58
1 files changed, 52 insertions, 6 deletions
diff --git a/sys/dev/iwn/if_iwnreg.h b/sys/dev/iwn/if_iwnreg.h
index e519ac2..5472ea3 100644
--- a/sys/dev/iwn/if_iwnreg.h
+++ b/sys/dev/iwn/if_iwnreg.h
@@ -1509,7 +1509,7 @@ struct iwn_rx_ht_phy_stats {
uint32_t good_ampdu_crc32;
uint32_t ampdu;
uint32_t fragment;
- uint32_t reserved;
+ uint32_t unsupport_mcs;
} __packed;
struct iwn_rx_stats {
@@ -1519,6 +1519,20 @@ struct iwn_rx_stats {
struct iwn_rx_ht_phy_stats ht;
} __packed;
+struct iwn_rx_general_stats_bt {
+ struct iwn_rx_general_stats common;
+ /* additional stats for bt */
+ uint32_t num_bt_kills;
+ uint32_t reserved[2];
+} __packed;
+
+struct iwn_rx_stats_bt {
+ struct iwn_rx_phy_stats ofdm;
+ struct iwn_rx_phy_stats cck;
+ struct iwn_rx_general_stats_bt general_bt;
+ struct iwn_rx_ht_phy_stats ht;
+} __packed;
+
struct iwn_tx_stats {
uint32_t preamble;
uint32_t rx_detected;
@@ -1544,15 +1558,21 @@ struct iwn_tx_stats {
uint32_t underrun;
uint32_t bt_ht_kill;
uint32_t rx_ba_resp;
- uint32_t reserved[2];
+ /*
+ * 6000 series only - LSB=ant A, ant B, ant C, MSB=reserved
+ * TX power on chain in 1/2 dBm.
+ */
+ uint32_t tx_power;
+ uint32_t reserved[1];
} __packed;
struct iwn_general_stats {
- uint32_t temp;
- uint32_t temp_m;
+ uint32_t temp; /* radio temperature */
+ uint32_t temp_m; /* radio voltage */
uint32_t burst_check;
uint32_t burst;
- uint32_t reserved1[4];
+ uint32_t wait_for_silence_timeout_cnt;
+ uint32_t reserved1[3];
uint32_t sleep;
uint32_t slot_out;
uint32_t slot_idle;
@@ -1563,7 +1583,11 @@ struct iwn_general_stats {
uint32_t probe;
uint32_t reserved2[2];
uint32_t rx_enabled;
- uint32_t reserved3[3];
+ /*
+ * This is the number of times we have to re-tune
+ * in order to get out of bad PHY status.
+ */
+ uint32_t num_of_sos_states;
} __packed;
struct iwn_stats {
@@ -1571,8 +1595,30 @@ struct iwn_stats {
struct iwn_rx_stats rx;
struct iwn_tx_stats tx;
struct iwn_general_stats general;
+ uint32_t reserved1[2];
+} __packed;
+
+struct iwn_bt_activity_stats {
+ /* Tx statistics */
+ uint32_t hi_priority_tx_req_cnt;
+ uint32_t hi_priority_tx_denied_cnt;
+ uint32_t lo_priority_tx_req_cnt;
+ uint32_t lo_priority_tx_denied_cnt;
+ /* Rx statistics */
+ uint32_t hi_priority_rx_req_cnt;
+ uint32_t hi_priority_rx_denied_cnt;
+ uint32_t lo_priority_rx_req_cnt;
+ uint32_t lo_priority_rx_denied_cnt;
} __packed;
+struct iwn_stats_bt {
+ uint32_t flags;
+ struct iwn_rx_stats_bt rx_bt;
+ struct iwn_tx_stats tx;
+ struct iwn_general_stats general;
+ struct iwn_bt_activity_stats activity;
+ uint32_t reserved1[2];
+};
/* Firmware error dump. */
struct iwn_fw_dump {
OpenPOWER on IntegriCloud