iwlwifi: mvm: request statistics when reading debugfs
authorJohannes Berg <johannes.berg@intel.com>
Wed, 22 Nov 2017 08:02:42 +0000 (09:02 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 5 Dec 2017 19:01:43 +0000 (21:01 +0200)
When statistics are read from debugfs, make sure that they
are actually updated from the firmware.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c

index 834c798f728c5455b8dc6eddc8d27982a185a4c6..270781e13e893ed66f423e20d20d345c899995fb 100644 (file)
@@ -759,6 +759,9 @@ static ssize_t iwl_dbgfs_fw_rx_stats_read(struct file *file,
 
        mutex_lock(&mvm->mutex);
 
+       if (iwl_mvm_firmware_running(mvm))
+               iwl_mvm_request_statistics(mvm, false);
+
        pos += scnprintf(buf + pos, bufsz - pos, fmt_header,
                         "Statistics_Rx - OFDM");
        if (!iwl_mvm_has_new_rx_stats_api(mvm)) {