[NOUPSTREAM] wifi: iwlwifi: mvm: remove IWLMVM_P2P_OPPPS_TEST_WA

This is not used anymore.

type=maint
ticket=none

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Change-Id: I704a84ae1de77ea54b168f665968ae967c5bed9e
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/108933
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
x-iwlwifi-stack-dev: 0bbed963aa4ef296c333476c3f96ca5de1dd5bf1
diff --git a/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream b/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream
index ca0dc98..fb99cf7 100644
--- a/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream
+++ b/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream
@@ -56,18 +56,6 @@
 
 	  If unsure say N, Say Y if you have this code and want to transmit OFDM low rate.
 
-config IWLMVM_P2P_OPPPS_TEST_WA
-	bool "Use WA to pass P2P OPPPS certification test"
-	depends on IWLMVM
-	---help---
-	  This option enables a WA to pass P2P OPPPS certification test.
-	  This test verifies P2P client power management behavior when
-	  connected to P2P GO that advertises OPPPS. Since P2P client power
-	  management is not supported currently by FW a special WA is required.
-	  Send zeroed quota on P2P client MAC if power save is enabled from
-	  user space to mimic power management behavior. Update quota to normal
-	  value otherwise.
-
 config IWLMVM_VENDOR_CMDS
 	bool "enable vendor commands"
 	depends on IWLMVM
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h b/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h
index 80b16e2..20e2b84 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2012-2014, 2018-2023 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -30,8 +30,6 @@
  * @IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_QUERY: query traffic statistics for a
  *	peer in the TDLS cache
  * @IWL_MVM_VENDOR_CMD_SET_NIC_TXPOWER_LIMIT: set the NIC's (SAR) TX power limit
- * @IWL_MVM_VENDOR_CMD_OPPPS_WA: wa to pass Sigma test - applicable code is
- *	claused under CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
  * @IWL_MVM_VENDOR_CMD_GSCAN_GET_CAPABILITIES: get driver gscan capabilities as
  *	specified in %IWL_MVM_VENDOR_ATTR_GSCAN_*
  * @IWL_MVM_VENDOR_CMD_GSCAN_START: set gscan parameters and start gscan
@@ -133,7 +131,7 @@
 	IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_DEL			= 0x0b,
 	IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_QUERY		= 0x0c,
 	IWL_MVM_VENDOR_CMD_SET_NIC_TXPOWER_LIMIT		= 0x0d,
-	IWL_MVM_VENDOR_CMD_OPPPS_WA				= 0x0e,
+	/* 0x0e is deprecated */
 	IWL_MVM_VENDOR_CMD_GSCAN_GET_CAPABILITIES		= 0x0f,
 	IWL_MVM_VENDOR_CMD_GSCAN_START				= 0x10,
 	IWL_MVM_VENDOR_CMD_GSCAN_STOP				= 0x11,
@@ -643,7 +641,6 @@
  *	(s32 in units of 1/8 dBm)
  * @IWL_MVM_VENDOR_ATTR_TXP_LIMIT_52L: TX power limit for 5.2 GHz low (as 2.4)
  * @IWL_MVM_VENDOR_ATTR_TXP_LIMIT_52H: TX power limit for 5.2 GHz high (as 2.4)
- * @IWL_MVM_VENDOR_ATTR_OPPPS_WA: wa to pass Sigma test
  * @IWL_MVM_VENDOR_ATTR_GSCAN_MAX_SCAN_CACHE_SIZE: scan cache size
  *	(in bytes)
  * @IWL_MVM_VENDOR_ATTR_GSCAN_MAX_SCAN_BUCKETS: maximum number of channel
@@ -820,7 +817,7 @@
 	IWL_MVM_VENDOR_ATTR_TXP_LIMIT_24			= 0x0d,
 	IWL_MVM_VENDOR_ATTR_TXP_LIMIT_52L			= 0x0e,
 	IWL_MVM_VENDOR_ATTR_TXP_LIMIT_52H			= 0x0f,
-	IWL_MVM_VENDOR_ATTR_OPPPS_WA				= 0x10,
+	/* 0x10 is deprecated */
 	IWL_MVM_VENDOR_ATTR_GSCAN_MAX_SCAN_CACHE_SIZE		= 0x11,
 	IWL_MVM_VENDOR_ATTR_GSCAN_MAX_SCAN_BUCKETS		= 0x12,
 	IWL_MVM_VENDOR_ATTR_GSCAN_MAX_AP_CACHE_PER_SCAN		= 0x13,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index bc384ef..5fe3b18 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -642,15 +642,6 @@
 	struct ieee80211_p2p_noa_attr *noa =
 		&vif->bss_conf.p2p_noa_attr;
 
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-	/*
-		* Pass CT window including OPPPS enable flag as part of a WA
-		* to pass P2P OPPPS certification test. Refer to
-		* IWLMVM_P2P_OPPPS_TEST_WA description in Kconfig.noupstream.
-		*/
-	if (mvm->p2p_opps_test_wa_vif)
-		return cpu_to_le32(noa->oppps_ctwindow);
-#endif
 	return cpu_to_le32(noa->oppps_ctwindow &
 			IEEE80211_P2P_OPPPS_CTWINDOW_MASK);
 }
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index a87c00f..66b6f7a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -2028,11 +2028,6 @@
 		return true;
 	}
 
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-	if (mvmvif == mvm->p2p_opps_test_wa_vif)
-		mvm->p2p_opps_test_wa_vif = NULL;
-#endif
-
 	iwl_mvm_power_update_mac(mvm);
 	return false;
 }
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
index b5db94f..60b5c3c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
@@ -162,11 +162,6 @@
 #endif
 	}
 
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-	if (mvmvif == mvm->p2p_opps_test_wa_vif)
-		mvm->p2p_opps_test_wa_vif = NULL;
-#endif
-
 	iwl_mvm_power_update_mac(mvm);
 
 	/* Before the interface removal, mac80211 would cancel the ROC, and the
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index bffce07..0dca76b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1291,15 +1291,6 @@
 	struct iwl_dev_tx_power_cmd txp_cmd;
 #endif
 
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-	/*
-	 * Add the following as part of a WA to pass P2P OPPPS certification
-	 * test. Refer to IWLMVM_P2P_OPPPS_TEST_WA description in
-	 * Kconfig.noupstream for details.
-	 */
-	struct iwl_mvm_vif *p2p_opps_test_wa_vif;
-#endif
-
 	u32 ciphers[IWL_MVM_NUM_CIPHERS];
 
 	struct cfg80211_ftm_responder_stats ftm_resp_stats;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/quota.c b/drivers/net/wireless/intel/iwlwifi/mvm/quota.c
index 8d2849e..c468a4d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/quota.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/quota.c
@@ -87,39 +87,6 @@
 	}
 }
 
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-/*
- * Zero quota for P2P client MAC as part of a WA to pass P2P OPPPS certification
- * test. Refer to IWLMVM_P2P_OPPPS_TEST_WA description in Kconfig.noupstream for
- * details.
- */
-static void iwl_mvm_adjust_quota_for_p2p_wa(struct iwl_mvm *mvm,
-					    struct iwl_time_quota_cmd *cmd)
-{
-	struct iwl_time_quota_data *quota;
-	int i, phy_id = -1;
-
-	if (!mvm->p2p_opps_test_wa_vif ||
-	    !mvm->p2p_opps_test_wa_vif->deflink.phy_ctxt)
-		return;
-
-	phy_id = mvm->p2p_opps_test_wa_vif->deflink.phy_ctxt->id;
-	for (i = 0; i < MAX_BINDINGS; i++) {
-		u32 id;
-		u32 id_n_c;
-
-		quota = iwl_mvm_quota_cmd_get_quota(mvm, cmd, i);
-		id_n_c = le32_to_cpu(quota->id_and_color);
-		id = (id_n_c & FW_CTXT_ID_MSK) >> FW_CTXT_ID_POS;
-
-		if (id != phy_id)
-			continue;
-
-		quota->quota = 0;
-	}
-}
-#endif
-
 static void iwl_mvm_adjust_quota_for_noa(struct iwl_mvm *mvm,
 					 struct iwl_time_quota_cmd *cmd)
 {
@@ -314,16 +281,6 @@
 			  "zero quota on binding %d\n", i);
 	}
 
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-	/*
-	 * Zero quota for P2P client MAC as part of a WA to pass P2P OPPPS
-	 * certification test. Refer to IWLMVM_P2P_OPPPS_TEST_WA description in
-	 * Kconfig.noupstream for details.
-	 */
-	if (mvm->p2p_opps_test_wa_vif)
-		iwl_mvm_adjust_quota_for_p2p_wa(mvm, &cmd);
-#endif
-
 	if (!send && !force_update) {
 		/* don't send a practically unchanged command, the firmware has
 		 * to re-initialize a lot of state and that can have an adverse
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c b/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
index c6d5b68..f38c315 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
@@ -62,7 +62,6 @@
 	[IWL_MVM_VENDOR_ATTR_TXP_LIMIT_24] = { .type = NLA_U32 },
 	[IWL_MVM_VENDOR_ATTR_TXP_LIMIT_52L] = { .type = NLA_U32 },
 	[IWL_MVM_VENDOR_ATTR_TXP_LIMIT_52H] = { .type = NLA_U32 },
-	[IWL_MVM_VENDOR_ATTR_OPPPS_WA] = { .type = NLA_FLAG },
 	[IWL_MVM_VENDOR_ATTR_GSCAN_MAC_ADDR] = { .len = ETH_ALEN },
 	[IWL_MVM_VENDOR_ATTR_GSCAN_MAC_ADDR_MASK] = { .len = ETH_ALEN },
 	[IWL_MVM_VENDOR_ATTR_GSCAN_MAX_AP_PER_SCAN] = { .type = NLA_U32 },
@@ -729,60 +728,6 @@
 	return err;
 }
 
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-static int iwl_mvm_oppps_wa_update_quota(struct iwl_mvm *mvm,
-					 struct ieee80211_vif *vif,
-					 bool enable)
-{
-	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
-	struct ieee80211_p2p_noa_attr *noa = &vif->bss_conf.p2p_noa_attr;
-	bool force_update = true;
-
-	if (enable && noa->oppps_ctwindow & IEEE80211_P2P_OPPPS_ENABLE_BIT)
-		mvm->p2p_opps_test_wa_vif = mvmvif;
-	else
-		mvm->p2p_opps_test_wa_vif = NULL;
-
-	if (fw_has_capa(&mvm->fw->ucode_capa,
-			IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA)) {
-		return -EOPNOTSUPP;
-	}
-
-	return iwl_mvm_update_quotas(mvm, force_update, NULL);
-}
-
-static int iwl_mvm_oppps_wa(struct wiphy *wiphy,
-			    struct wireless_dev *wdev,
-			    const void *data, int data_len)
-{
-	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-	struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
-	struct nlattr **tb;
-	int err;
-	struct ieee80211_vif *vif = wdev_to_ieee80211_vif(wdev);
-
-	if (!vif)
-		return -ENODEV;
-
-	tb = iwl_mvm_parse_vendor_data(data, data_len);
-	if (IS_ERR(tb))
-		return PTR_ERR(tb);
-
-	mutex_lock(&mvm->mutex);
-	if (vif->type == NL80211_IFTYPE_STATION && vif->p2p) {
-		bool enable = !!tb[IWL_MVM_VENDOR_ATTR_OPPPS_WA];
-
-		err = iwl_mvm_oppps_wa_update_quota(mvm, vif, enable);
-	} else {
-		err = -EOPNOTSUPP;
-	}
-	mutex_unlock(&mvm->mutex);
-
-	kfree(tb);
-	return err;
-}
-#endif
-
 void iwl_mvm_active_rx_filters(struct iwl_mvm *mvm)
 {
 	int i, len, total = 0;
@@ -1845,19 +1790,6 @@
 		.policy = iwl_mvm_vendor_attr_policy,
 		.maxattr = MAX_IWL_MVM_VENDOR_ATTR,
 	},
-#ifdef CPTCFG_IWLMVM_P2P_OPPPS_TEST_WA
-	{
-		.info = {
-			.vendor_id = INTEL_OUI,
-			.subcmd = IWL_MVM_VENDOR_CMD_OPPPS_WA,
-		},
-		.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
-			 WIPHY_VENDOR_CMD_NEED_RUNNING,
-		.doit = iwl_mvm_oppps_wa,
-		.policy = iwl_mvm_vendor_attr_policy,
-		.maxattr = MAX_IWL_MVM_VENDOR_ATTR,
-	},
-#endif
 	{
 		.info = {
 			.vendor_id = INTEL_OUI,
diff --git a/local-symbols b/local-symbols
index b848c5d..d4eb01c 100644
--- a/local-symbols
+++ b/local-symbols
@@ -88,7 +88,6 @@
 IWLWIFI_FORCE_OFDM_RATE=
 IWLMVM_DISABLE_P2P_MIMO=
 IWLMVM_TDLS_PEER_CACHE=
-IWLMVM_P2P_OPPPS_TEST_WA=
 IWLMVM_VENDOR_CMDS=
 IWLWIFI_DISALLOW_OLDER_FW=
 IWLWIFI_PCIE_FAKE_RXQS=
diff --git a/versions b/versions
index a17b727..03d726d 100644
--- a/versions
+++ b/versions
@@ -2,4 +2,4 @@
 BACKPORTED_KERNEL_VERSION="(see git)"
 BACKPORTED_KERNEL_NAME="iwlwifi"
 BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:12205:dbc963bf"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:12206:0bbed963"