From dbaa837f62011f9a7b57e38747a30153a0a1a163 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Fri, 6 Sep 2019 02:11:21 +0200 Subject: [PATCH 1/4] Revert "iwlwifi: mvm: implement CSI reporting" This reverts commit 5213e8a8a28d2c4c143fec94e57c866a958ed52d. --- .../net/wireless/intel/iwlwifi/fw/api/datapath.h | 55 ---------------------- .../net/wireless/intel/iwlwifi/fw/api/location.h | 20 -------- drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 2 - drivers/net/wireless/intel/iwlwifi/fw/file.h | 7 +-- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 - drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 8 +--- 7 files changed, 2 insertions(+), 92 deletions(-) Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h =================================================================== --- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h 2019-09-06 15:31:38.601243739 +0200 +++ src/drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h 2019-09-06 15:31:57.823938961 +0200 @@ -105,12 +105,6 @@ HE_AIR_SNIFFER_CONFIG_CMD = 0x13, /** - * @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI - * matrix collection, uses &struct iwl_channel_estimation_cfg - */ - CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14, - - /** * @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data */ RX_NO_DATA_NOTIF = 0xF5, @@ -162,53 +156,4 @@ __le32 user_position[4]; } __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */ -enum iwl_channel_estimation_flags { - IWL_CHANNEL_ESTIMATION_ENABLE = BIT(0), - IWL_CHANNEL_ESTIMATION_TIMER = BIT(1), - IWL_CHANNEL_ESTIMATION_COUNTER = BIT(2), -}; - -/** - * struct iwl_channel_estimation_cfg - channel estimation reporting config - */ -struct iwl_channel_estimation_cfg { - /** - * @flags: flags, see &enum iwl_channel_estimation_flags - */ - __le32 flags; - /** - * @timer: if enabled via flags, automatically disable after this many - * microseconds - */ - __le32 timer; - /** - * @count: if enabled via flags, automatically disable after this many - * frames with channel estimation matrix were captured - */ - __le32 count; - /** - * @rate_n_flags_mask: only try to record the channel estimation matrix - * if the rate_n_flags value for the received frame (let's call - * that rx_rnf) matches the mask/value given here like this: - * (rx_rnf & rate_n_flags_mask) == rate_n_flags_val. - */ - __le32 rate_n_flags_mask; - /** - * @rate_n_flags_val: see @rate_n_flags_mask - */ - __le32 rate_n_flags_val; - /** - * @reserved: reserved (for alignment) - */ - __le32 reserved; - /** - * @frame_types: bitmap of frame types to capture, the received frame's - * subtype|type takes 6 bits in the frame and the corresponding bit - * in this field must be set to 1 to capture channel estimation for - * that frame type. Set to all-ones to enable capturing for all - * frame types. - */ - __le64 frame_types; -} __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */ - #endif /* __iwl_fw_api_datapath_h__ */ Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/location.h =================================================================== --- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/location.h 2019-09-06 15:31:38.601243739 +0200 +++ src/drivers/net/wireless/intel/iwlwifi/fw/api/location.h 2019-09-06 15:31:57.823938961 +0200 @@ -94,15 +94,6 @@ */ TOF_RESPONDER_DYN_CONFIG_CMD = 0x5, /** - * @CSI_HEADER_NOTIFICATION: CSI header - */ - CSI_HEADER_NOTIFICATION = 0xFA, - /** - * @CSI_CHUNKS_NOTIFICATION: CSI chunk, - * uses &struct iwl_csi_chunk_notification - */ - CSI_CHUNKS_NOTIFICATION = 0xFB, - /** * @TOF_LC_NOTIF: used for LCI/civic location, contains just * the action frame */ @@ -697,15 +688,4 @@ __le16 reserved; } __packed; /* TOF_RESPONDER_STATISTICS_NTFY_S_VER_2 */ -#define IWL_CSI_CHUNK_CTL_NUM_MASK 0x3 -#define IWL_CSI_CHUNK_CTL_IDX_MASK 0xc - -struct iwl_csi_chunk_notification { - __le32 token; - __le16 seq; - __le16 ctl; - __le32 size; - u8 data[]; -} __packed; /* CSI_CHUNKS_HDR_NTFY_API_S_VER_1 */ - #endif /* __iwl_fw_api_location_h__ */ Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h =================================================================== --- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h 2019-09-06 15:31:38.601243739 +0200 +++ src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h 2019-09-06 15:31:57.824938945 +0200 @@ -333,8 +333,6 @@ IWL_RX_MPDU_PHY_AMPDU = BIT(5), IWL_RX_MPDU_PHY_AMPDU_TOGGLE = BIT(6), IWL_RX_MPDU_PHY_SHORT_PREAMBLE = BIT(7), - /* short preamble is only for CCK, for non-CCK overridden by this */ - IWL_RX_MPDU_PHY_NCCK_ADDTL_NTFY = BIT(7), IWL_RX_MPDU_PHY_TSF_OVERLOAD = BIT(8), }; Index: src/drivers/net/wireless/intel/iwlwifi/fw/file.h =================================================================== --- src.orig/drivers/net/wireless/intel/iwlwifi/fw/file.h 2019-09-06 15:31:38.601243739 +0200 +++ src/drivers/net/wireless/intel/iwlwifi/fw/file.h 2019-09-06 15:31:57.824938945 +0200 @@ -383,13 +383,10 @@ * @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger * command size (command version 4) that supports toggling ACK TX * power reduction. + * @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload * @IWL_UCODE_TLV_CAPA_D3_DEBUG: supports debug recording during D3 * @IWL_UCODE_TLV_CAPA_MCC_UPDATE_11AX_SUPPORT: MCC response support 11ax * capability. - * @IWL_UCODE_TLV_CAPA_CSI_REPORTING: firmware is capable of being configured - * to report the CSI information with (certain) RX frames - * - * @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload * * @NUM_IWL_UCODE_TLV_CAPA: number of bits used */ @@ -445,8 +442,6 @@ IWL_UCODE_TLV_CAPA_D3_DEBUG = (__force iwl_ucode_tlv_capa_t)87, IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT = (__force iwl_ucode_tlv_capa_t)88, IWL_UCODE_TLV_CAPA_MCC_UPDATE_11AX_SUPPORT = (__force iwl_ucode_tlv_capa_t)89, - IWL_UCODE_TLV_CAPA_CSI_REPORTING = (__force iwl_ucode_tlv_capa_t)90, - IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96, NUM_IWL_UCODE_TLV_CAPA Index: src/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c =================================================================== --- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c 2019-09-06 15:31:38.601243739 +0200 +++ src/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c 2019-09-06 15:31:57.824938945 +0200 @@ -69,7 +69,6 @@ #include "sta.h" #include "iwl-io.h" #include "debugfs.h" -#include "iwl-modparams.h" #include "fw/error-dump.h" static ssize_t iwl_dbgfs_ctdp_budget_read(struct file *file, Index: src/drivers/net/wireless/intel/iwlwifi/mvm/ops.c =================================================================== --- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/ops.c 2019-09-06 15:31:38.601243739 +0200 +++ src/drivers/net/wireless/intel/iwlwifi/mvm/ops.c 2019-09-06 15:31:57.825938929 +0200 @@ -446,7 +446,6 @@ HCMD_NAME(TRIGGER_RX_QUEUES_NOTIF_CMD), HCMD_NAME(RFH_QUEUE_CONFIG_CMD), HCMD_NAME(TLC_MNG_CONFIG_CMD), - HCMD_NAME(CHEST_COLLECTOR_FILTER_CONFIG_CMD), HCMD_NAME(STA_PM_NOTIF), HCMD_NAME(MU_GROUP_MGMT_NOTIF), HCMD_NAME(RX_QUEUES_NOTIFICATION), Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c =================================================================== --- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c 2019-09-06 15:31:38.601243739 +0200 +++ src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c 2019-09-06 15:31:57.825938929 +0200 @@ -951,15 +951,9 @@ bool toggle_bit = phy_info & IWL_RX_MPDU_PHY_AMPDU_TOGGLE; rx_status->flag |= RX_FLAG_AMPDU_DETAILS; - /* - * Toggle is switched whenever new aggregation starts. Make - * sure ampdu_reference is never 0 so we can later use it to - * see if the frame was really part of an A-MPDU or not. - */ + /* toggle is switched whenever new aggregation starts */ if (toggle_bit != mvm->ampdu_toggle) { mvm->ampdu_ref++; - if (mvm->ampdu_ref == 0) - mvm->ampdu_ref++; mvm->ampdu_toggle = toggle_bit; } rx_status->ampdu_reference = mvm->ampdu_ref;