diff options
author | Dedy Lansky <dlansky@codeaurora.org> | 2018-07-24 10:44:31 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-07-31 11:00:51 +0300 |
commit | 0c936b3c96337c3fd5ad4951ca7bdc54fa578a02 (patch) | |
tree | 86ebbe1dc85af04c9a7fe50ec955c36979d37035 /drivers/net/wireless/ath/wil6210/wmi.h | |
parent | 65e6ffdcc4507cbdd38f374ae311263106ee46fe (diff) | |
download | linux-0c936b3c96337c3fd5ad4951ca7bdc54fa578a02.tar.xz |
wil6210: add support for link statistics
Driver can request FW to report link statistics using
WMI_LINK_STATS_CMDID.
FW will report statistics with WMI_LINK_STATS_EVENTID.
Two categories of statistics defined: basic and global.
New "link_stats" debugfs is used for requesting basic statistics
report (write) and for reading the basic statistics (read).
"link_stats_global" debugfs is used for requesting and reading the
global statistics.
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wmi.h')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.h | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.h b/drivers/net/wireless/ath/wil6210/wmi.h index 13f6f6210117..00cf3c422133 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.h +++ b/drivers/net/wireless/ath/wil6210/wmi.h @@ -1715,9 +1715,7 @@ enum wmi_link_stats_action { /* WMI_LINK_STATS_EVENT record identifiers */ enum wmi_link_stats_record_type { WMI_LINK_STATS_TYPE_BASIC = 0x01, - WMI_LINK_STATS_TYPE_MAC = 0x02, - WMI_LINK_STATS_TYPE_PHY = 0x04, - WMI_LINK_STATS_TYPE_OTA = 0x08, + WMI_LINK_STATS_TYPE_GLOBAL = 0x02, }; /* WMI_LINK_STATS_CMDID */ @@ -1731,7 +1729,7 @@ struct wmi_link_stats_cmd { /* wmi_link_stats_action_e */ u8 action; u8 reserved[6]; - /* for WMI_LINK_STATS_PERIODIC */ + /* range = 100 - 10000 */ __le32 interval_msec; } __packed; @@ -3779,32 +3777,59 @@ struct wmi_link_stats_config_done_event { /* WMI_LINK_STATS_EVENTID */ struct wmi_link_stats_event { + __le64 tsf; __le16 payload_size; u8 has_next; u8 reserved[5]; - /* a stream of records, e.g. wmi_link_stats_basic_s */ + /* a stream of wmi_link_stats_record_s */ u8 payload[0]; } __packed; -/* WMI_LINK_STATS_EVENT record struct */ -struct wmi_link_stats_basic { - /* WMI_LINK_STATS_TYPE_BASIC */ +/* WMI_LINK_STATS_EVENT */ +struct wmi_link_stats_record { + /* wmi_link_stats_record_type_e */ u8 record_type_id; + u8 reserved; + __le16 record_size; + u8 record[0]; +} __packed; + +/* WMI_LINK_STATS_TYPE_BASIC */ +struct wmi_link_stats_basic { u8 cid; - /* 0: fail; 1: OK; 2: retrying */ - u8 bf_status; s8 rssi; u8 sqi; + u8 bf_mcs; + u8 per_average; u8 selected_rfc; - __le16 bf_mcs; + u8 rx_effective_ant_num; + u8 my_rx_sector; + u8 my_tx_sector; + u8 other_rx_sector; + u8 other_tx_sector; + u8 reserved[7]; + /* 1/4 Db units */ + __le16 snr; __le32 tx_tpt; __le32 tx_goodput; __le32 rx_goodput; - __le16 my_rx_sector; - __le16 my_tx_sector; - __le16 other_rx_sector; - __le16 other_tx_sector; - __le32 reserved[2]; + __le32 bf_count; + __le32 rx_bcast_frames; +} __packed; + +/* WMI_LINK_STATS_TYPE_GLOBAL */ +struct wmi_link_stats_global { + /* all ack-able frames */ + __le32 rx_frames; + /* all ack-able frames */ + __le32 tx_frames; + __le32 rx_ba_frames; + __le32 tx_ba_frames; + __le32 tx_beacons; + __le32 rx_mic_errors; + __le32 rx_crc_errors; + __le32 tx_fail_no_ack; + u8 reserved[8]; } __packed; /* WMI_SET_GRANT_MCS_EVENTID */ |