summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mvm.h
diff options
context:
space:
mode:
authorJohannes Berg2015-01-21 21:41:29 +0100
committerEmmanuel Grumbach2015-03-01 15:55:11 +0100
commit33cef9256342f200a708211958cec9c44406631d (patch)
tree376512af3ea5f674a3c758b5b5c7dc689029f2d5 /drivers/net/wireless/iwlwifi/mvm/mvm.h
parentiwlwifi: mvm: don't write to DBGC_OUT_CTRL when stopping the recording (diff)
downloadkernel-qcow2-linux-33cef9256342f200a708211958cec9c44406631d.tar.gz
kernel-qcow2-linux-33cef9256342f200a708211958cec9c44406631d.tar.xz
kernel-qcow2-linux-33cef9256342f200a708211958cec9c44406631d.zip
iwlwifi: mvm: support beacon statistics for BSS client
Report the average beacon signal and the number of received beacons as measured by the firmware. Since the firmware just counts, and doesn't reset the counter at all, clear it in the firmware whenever we associate. However, accumulate it over firmware restart. Since clearing the statistics in the firmware will also clear the ones for the radio statistics, add those to the accumulator when cleared. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mvm.h')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 90a1ea3e6507..5e383dbf2594 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -337,6 +337,9 @@ struct iwl_mvm_vif_bf_data {
* @beacon_skb: the skb used to hold the AP/GO beacon template
* @smps_requests: the SMPS requests of differents parts of the driver,
* combined on update to yield the overall request to mac80211.
+ * @beacon_stats: beacon statistics, containing the # of received beacons,
+ * # of received beacons accumulated over FW restart, and the current
+ * average signal of beacons retrieved from the firmware
*/
struct iwl_mvm_vif {
u16 id;
@@ -354,6 +357,11 @@ struct iwl_mvm_vif {
bool ps_disabled;
struct iwl_mvm_vif_bf_data bf_data;
+ struct {
+ u32 num_beacons, accu_num_beacons;
+ u8 avg_signal;
+ } beacon_stats;
+
u32 ap_beacon_time;
enum iwl_tsf_id tsf_id;
@@ -963,7 +971,7 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
int iwl_mvm_rx_statistics(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb,
struct iwl_device_cmd *cmd);
-int iwl_mvm_request_statistics(struct iwl_mvm *mvm);
+int iwl_mvm_request_statistics(struct iwl_mvm *mvm, bool clear);
void iwl_mvm_accu_radio_stats(struct iwl_mvm *mvm);
/* NVM */