iwlwifi: mvm: move new API code to the end
By moving all the code that depends on the new API we avoid unnecessary indentation in the code. Signed-off-by: Mordechai Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:

committed by
Luca Coelho

parent
c80eb570f8
commit
cfbeb59824
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||||
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
||||||
* Copyright(c) 2016 Intel Deutschland GmbH
|
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of version 2 of the GNU General Public License as
|
* it under the terms of version 2 of the GNU General Public License as
|
||||||
@@ -649,6 +649,9 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
|
|||||||
.mvm = mvm,
|
.mvm = mvm,
|
||||||
};
|
};
|
||||||
int expected_size;
|
int expected_size;
|
||||||
|
int i;
|
||||||
|
u8 *energy;
|
||||||
|
__le32 *bytes, *air_time;
|
||||||
|
|
||||||
if (iwl_mvm_is_cdb_supported(mvm))
|
if (iwl_mvm_is_cdb_supported(mvm))
|
||||||
expected_size = sizeof(*stats);
|
expected_size = sizeof(*stats);
|
||||||
@@ -674,10 +677,16 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
|
|||||||
le64_to_cpu(stats->general.common.on_time_scan);
|
le64_to_cpu(stats->general.common.on_time_scan);
|
||||||
|
|
||||||
data.general = &stats->general;
|
data.general = &stats->general;
|
||||||
if (iwl_mvm_has_new_rx_api(mvm)) {
|
|
||||||
int i;
|
iwl_mvm_rx_stats_check_trigger(mvm, pkt);
|
||||||
u8 *energy;
|
|
||||||
__le32 *bytes, *air_time;
|
ieee80211_iterate_active_interfaces(mvm->hw,
|
||||||
|
IEEE80211_IFACE_ITER_NORMAL,
|
||||||
|
iwl_mvm_stat_iterator,
|
||||||
|
&data);
|
||||||
|
|
||||||
|
if (!iwl_mvm_has_new_rx_api(mvm))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!iwl_mvm_is_cdb_supported(mvm)) {
|
if (!iwl_mvm_is_cdb_supported(mvm)) {
|
||||||
struct iwl_notif_statistics_v11 *v11 =
|
struct iwl_notif_statistics_v11 *v11 =
|
||||||
@@ -705,15 +714,9 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
|
|||||||
sta->avg_energy = energy[i];
|
sta->avg_energy = energy[i];
|
||||||
}
|
}
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
}
|
|
||||||
|
|
||||||
iwl_mvm_rx_stats_check_trigger(mvm, pkt);
|
|
||||||
|
|
||||||
ieee80211_iterate_active_interfaces(mvm->hw,
|
|
||||||
IEEE80211_IFACE_ITER_NORMAL,
|
|
||||||
iwl_mvm_stat_iterator,
|
|
||||||
&data);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
invalid:
|
invalid:
|
||||||
IWL_ERR(mvm, "received invalid statistics size (%d)!\n",
|
IWL_ERR(mvm, "received invalid statistics size (%d)!\n",
|
||||||
iwl_rx_packet_payload_len(pkt));
|
iwl_rx_packet_payload_len(pkt));
|
||||||
|
Reference in New Issue
Block a user