Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38d5f66f authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Luca Coelho
Browse files

iwlwifi: mvm: remove IWL_UCODE_TLV_API_STATS_V10 TLV flag



This flag is set in all supported firmwares.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
parent 9d43fa4b
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -249,7 +249,6 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;
 * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source.
 * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source.
 * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header
 * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header
 * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params
 * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params
 * @IWL_UCODE_TLV_API_STATS_V10: uCode supports/uses statistics API version 10
 * @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format
 * @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format
 * @IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority
 * @IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority
 *	instead of 3.
 *	instead of 3.
@@ -262,7 +261,6 @@ enum iwl_ucode_tlv_api {
	IWL_UCODE_TLV_API_WIFI_MCC_UPDATE	= (__force iwl_ucode_tlv_api_t)9,
	IWL_UCODE_TLV_API_WIFI_MCC_UPDATE	= (__force iwl_ucode_tlv_api_t)9,
	IWL_UCODE_TLV_API_WIDE_CMD_HDR		= (__force iwl_ucode_tlv_api_t)14,
	IWL_UCODE_TLV_API_WIDE_CMD_HDR		= (__force iwl_ucode_tlv_api_t)14,
	IWL_UCODE_TLV_API_LQ_SS_PARAMS		= (__force iwl_ucode_tlv_api_t)18,
	IWL_UCODE_TLV_API_LQ_SS_PARAMS		= (__force iwl_ucode_tlv_api_t)18,
	IWL_UCODE_TLV_API_STATS_V10		= (__force iwl_ucode_tlv_api_t)19,
	IWL_UCODE_TLV_API_NEW_VERSION		= (__force iwl_ucode_tlv_api_t)20,
	IWL_UCODE_TLV_API_NEW_VERSION		= (__force iwl_ucode_tlv_api_t)20,
	IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY	= (__force iwl_ucode_tlv_api_t)24,
	IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY	= (__force iwl_ucode_tlv_api_t)24,
	IWL_UCODE_TLV_API_TX_POWER_CHAIN	= (__force iwl_ucode_tlv_api_t)27,
	IWL_UCODE_TLV_API_TX_POWER_CHAIN	= (__force iwl_ucode_tlv_api_t)27,
+0 −33
Original line number Original line Diff line number Diff line
@@ -219,32 +219,6 @@ struct mvm_statistics_bt_activity {
	__le32 lo_priority_rx_denied_cnt;
	__le32 lo_priority_rx_denied_cnt;
} __packed;  /* STATISTICS_BT_ACTIVITY_API_S_VER_1 */
} __packed;  /* STATISTICS_BT_ACTIVITY_API_S_VER_1 */


struct mvm_statistics_general_v5 {
	__le32 radio_temperature;
	__le32 radio_voltage;
	struct mvm_statistics_dbg dbg;
	__le32 sleep_time;
	__le32 slots_out;
	__le32 slots_idle;
	__le32 ttl_timestamp;
	struct mvm_statistics_div slow_div;
	__le32 rx_enable_counter;
	/*
	 * num_of_sos_states:
	 *  count the number of times we have to re-tune
	 *  in order to get out of bad PHY status
	 */
	__le32 num_of_sos_states;
	__le32 beacon_filtered;
	__le32 missed_beacons;
	u8 beacon_filter_average_energy;
	u8 beacon_filter_reason;
	u8 beacon_filter_current_energy;
	u8 beacon_filter_reserved;
	__le32 beacon_filter_delta_time;
	struct mvm_statistics_bt_activity bt_activity;
} __packed; /* STATISTICS_GENERAL_API_S_VER_5 */

struct mvm_statistics_general_v8 {
struct mvm_statistics_general_v8 {
	__le32 radio_temperature;
	__le32 radio_temperature;
	__le32 radio_voltage;
	__le32 radio_voltage;
@@ -293,13 +267,6 @@ struct mvm_statistics_rx {
 * STATISTICS_CMD (0x9c), below.
 * STATISTICS_CMD (0x9c), below.
 */
 */


struct iwl_notif_statistics_v8 {
	__le32 flag;
	struct mvm_statistics_rx rx;
	struct mvm_statistics_tx tx;
	struct mvm_statistics_general_v5 general;
} __packed; /* STATISTICS_NTFY_API_S_VER_8 */

struct iwl_notif_statistics_v10 {
struct iwl_notif_statistics_v10 {
	__le32 flag;
	__le32 flag;
	struct mvm_statistics_rx rx;
	struct mvm_statistics_rx rx;
+15 −32
Original line number Original line Diff line number Diff line
@@ -577,17 +577,13 @@ iwl_mvm_rx_stats_check_trigger(struct iwl_mvm *mvm, struct iwl_rx_packet *pkt)
void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
				  struct iwl_rx_packet *pkt)
				  struct iwl_rx_packet *pkt)
{
{
	size_t v8_len = sizeof(struct iwl_notif_statistics_v8);
	struct iwl_notif_statistics_v10 *stats = (void *)&pkt->data;
	size_t v10_len = sizeof(struct iwl_notif_statistics_v10);
	struct iwl_mvm_stat_data data = {
	struct iwl_mvm_stat_data data = {
		.mvm = mvm,
		.mvm = mvm,
	};
	};
	u32 temperature;
	u32 temperature;


	if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_STATS_V10)) {
	if (iwl_rx_packet_payload_len(pkt) != sizeof(*stats))
		struct iwl_notif_statistics_v10 *stats = (void *)&pkt->data;

		if (iwl_rx_packet_payload_len(pkt) != v10_len)
		goto invalid;
		goto invalid;


	temperature = le32_to_cpu(stats->general.radio_temperature);
	temperature = le32_to_cpu(stats->general.radio_temperature);
@@ -605,19 +601,6 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
		le64_to_cpu(stats->general.on_time_scan);
		le64_to_cpu(stats->general.on_time_scan);


	data.general = &stats->general;
	data.general = &stats->general;
	} else {
		struct iwl_notif_statistics_v8 *stats = (void *)&pkt->data;

		if (iwl_rx_packet_payload_len(pkt) != v8_len)
			goto invalid;

		temperature = le32_to_cpu(stats->general.radio_temperature);
		data.mac_id = stats->rx.general.mac_id;
		data.beacon_filter_average_energy =
			stats->general.beacon_filter_average_energy;

		iwl_mvm_update_rx_statistics(mvm, &stats->rx);
	}


	iwl_mvm_rx_stats_check_trigger(mvm, pkt);
	iwl_mvm_rx_stats_check_trigger(mvm, pkt);