[NOUPSTREAM] wifi: iwlwifi: mvm: remove IWLMVM_TDLS_PEER_CACHE

This is not used anymore.

type=maint
ticket=none

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Change-Id: Ic48f059199ebc50ad0f78a3485c6b04bed936e2b
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/108934
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
x-iwlwifi-stack-dev: e784520c964ee29cc0b9525821c759c4d674018d
diff --git a/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream b/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream
index fb99cf7..c2bf25c 100644
--- a/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream
+++ b/drivers/net/wireless/intel/iwlwifi/Kconfig.noupstream
@@ -68,15 +68,6 @@
 	  This option mostly exists for non-upstream tagging, so best
 	  leave it set to Y.
 
-config IWLMVM_TDLS_PEER_CACHE
-	bool "enable TDLS peer caching and traffic monitoring"
-	depends on IWLMVM_VENDOR_CMDS
-	default y
-	help
-	  This option enables (vendor) commands from userspace to monitor
-	  traffic to and from specific peers on the same BSS. These peers
-	  might be TDLS peers, or candidates to become such.
-
 config IWLWIFI_DISALLOW_OLDER_FW
 	bool "disallow fallback to older firmware images"
 	depends on IWLWIFI
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h b/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h
index 20e2b84..9271e58 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-vendor-cmd.h
@@ -24,11 +24,6 @@
  * @IWL_MVM_VENDOR_CMD_SET_COUNTRY: set a new mcc regulatory information
  * @IWL_MVM_VENDOR_CMD_PROXY_FRAME_FILTERING: filter GTK, gratuitous
  *	ARP & unsolicited NA
- * @IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_ADD: add a peer to the TDLS peer cache
- * @IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_DEL: delete a peer from the TDLS peer
- *	cache
- * @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_GSCAN_GET_CAPABILITIES: get driver gscan capabilities as
  *	specified in %IWL_MVM_VENDOR_ATTR_GSCAN_*
@@ -127,9 +122,9 @@
 	IWL_MVM_VENDOR_CMD_LTE_COEX_WIFI_RPRTD_CHAN		= 0x07,
 	IWL_MVM_VENDOR_CMD_SET_COUNTRY				= 0x08,
 	IWL_MVM_VENDOR_CMD_PROXY_FRAME_FILTERING		= 0x09,
-	IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_ADD			= 0x0a,
-	IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_DEL			= 0x0b,
-	IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_QUERY		= 0x0c,
+	/* 0x0a is deprecated */
+	/* 0x0b is deprecated */
+	/* 0x0c is deprecated */
 	IWL_MVM_VENDOR_CMD_SET_NIC_TXPOWER_LIMIT		= 0x0d,
 	/* 0x0e is deprecated */
 	IWL_MVM_VENDOR_CMD_GSCAN_GET_CAPABILITIES		= 0x0f,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 66b6f7a..c91e9a5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -2062,10 +2062,6 @@
 	if (vif->type == NL80211_IFTYPE_MONITOR)
 		mvm->monitor_on = false;
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-	iwl_mvm_tdls_peer_cache_clear(mvm, vif);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
-
 out:
 	if (vif->type == NL80211_IFTYPE_AP ||
 	    vif->type == NL80211_IFTYPE_ADHOC) {
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
index 60b5c3c..441b25d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
@@ -194,10 +194,6 @@
 		mvm->monitor_on = false;
 		__clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, mvm->hw->flags);
 	}
-
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-	iwl_mvm_tdls_peer_cache_clear(mvm, vif);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
 }
 
 static unsigned int iwl_mvm_mld_count_active_links(struct iwl_mvm_vif *mvmvif)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 0dca76b..7ae5b8e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -736,22 +736,6 @@
 	} result;
 };
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-#define IWL_MVM_TDLS_CNT_MAX_PEERS 4
-
-struct iwl_mvm_tdls_peer_counter {
-	struct list_head list;
-	struct rcu_head rcu_head;
-
-	struct mac_address mac __aligned(2);
-	struct ieee80211_vif *vif;
-	u32 tx_bytes;
-	struct {
-		u32 bytes;
-	} ____cacheline_aligned_in_smp rx[];
-};
-#endif
-
 /**
  * struct iwl_mvm_reorder_buffer - per ra/tid/queue reorder buffer
  * @head_sn: reorder window head sn
@@ -1224,11 +1208,6 @@
 	struct mac_address uapsd_noagg_bssids[IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM]
 		__aligned(2);
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-	struct list_head tdls_peer_cache_list;
-	u32 tdls_peer_cache_cnt;
-#endif
-
 	struct iwl_time_quota_cmd last_quota_cmd;
 
 #ifdef CPTCFG_NL80211_TESTMODE
@@ -2557,14 +2536,6 @@
 void iwl_mvm_rx_tdls_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb);
 void iwl_mvm_tdls_ch_switch_work(struct work_struct *work);
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-void iwl_mvm_tdls_peer_cache_pkt(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
-				 u32 len, int rxq);
-void iwl_mvm_tdls_peer_cache_clear(struct iwl_mvm *mvm,
-				   struct ieee80211_vif *vif);
-struct iwl_mvm_tdls_peer_counter *
-iwl_mvm_tdls_peer_cache_find(struct iwl_mvm *mvm, const u8 *addr);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
 void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm,
 				     enum iwl_mvm_rxq_notif_type type,
 				     bool sync,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 5b3b591..1f2841d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -1473,10 +1473,6 @@
 	mvm->tcm.ll_ts = jiffies;
 	mvm->tcm.uapsd_nonagg_ts = jiffies;
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-	INIT_LIST_HEAD(&mvm->tdls_peer_cache_list);
-#endif
-
 #ifdef CPTCFG_IWLMVM_VENDOR_CMDS
 	mvm->rx_filters = IWL_MVM_VENDOR_RXFILTER_EINVAL;
 #endif
@@ -1770,10 +1766,6 @@
 
 	cancel_delayed_work_sync(&mvm->tcm.work);
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-	iwl_mvm_tdls_peer_cache_clear(mvm, NULL);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
-
 	iwl_fw_runtime_free(&mvm->fwrt);
 	mutex_destroy(&mvm->mutex);
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
index cb6f668..c0e290d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
@@ -453,13 +453,6 @@
 		    ieee80211_is_data(hdr->frame_control))
 			iwl_mvm_rx_handle_tcm(mvm, sta, hdr, len, phy_info,
 					      rate_n_flags);
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-		/*
-		 * these packets are from the AP or the existing TDLS peer.
-		 * In both cases an existing station.
-		 */
-		iwl_mvm_tdls_peer_cache_pkt(mvm, hdr, len, 0);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
 
 		if (ieee80211_is_data(hdr->frame_control))
 			iwl_mvm_rx_csum(sta, skb, rx_pkt_status);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 41bf9b2..4e875ac 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -2315,14 +2315,6 @@
 		if (ieee80211_is_data(hdr->frame_control))
 			iwl_mvm_rx_csum(mvm, sta, skb, pkt);
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-		/*
-		 * these packets are from the AP or the existing TDLS peer.
-		 * In both cases an existing station.
-		 */
-		iwl_mvm_tdls_peer_cache_pkt(mvm, hdr, len, queue);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
-
 		if (iwl_mvm_is_dup(sta, queue, rx_status, hdr, desc)) {
 			IWL_DEBUG_DROP(mvm, "Dropping duplicate packet 0x%x\n",
 				       le16_to_cpu(hdr->seq_ctrl));
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c b/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
index 5e9a1ec..3d25ff5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
@@ -662,76 +662,3 @@
 	mod_delayed_work(system_wq, &mvm->tdls_cs.dwork,
 			 msecs_to_jiffies(delay));
 }
-
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-void iwl_mvm_tdls_peer_cache_pkt(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
-				 u32 len, int rxq)
-{
-	struct iwl_mvm_tdls_peer_counter *cnt;
-	u8 *addr;
-
-	/*
-	 * To reduce code runtime and complexity, we don't check the packet
-	 * arrived on the correct vif, or even if the current vif is a station.
-	 * While it is theoretically possible for a TDLS peer to also be
-	 * connected to us in the capacity of a AP/GO, this will not happen
-	 * in practice.
-	 */
-
-	if (list_empty(&mvm->tdls_peer_cache_list))
-		return;
-
-	if (len < sizeof(*hdr) || !ieee80211_is_data(hdr->frame_control))
-		return;
-
-	addr = rxq < 0 ? ieee80211_get_DA(hdr) : ieee80211_get_SA(hdr);
-
-	/* we rely on the Rx and Tx path mutual atomicity for the counters */
-	rcu_read_lock();
-	list_for_each_entry_rcu(cnt, &mvm->tdls_peer_cache_list, list)
-		if (ether_addr_equal(cnt->mac.addr, addr)) {
-			if (rxq < 0)
-				cnt->tx_bytes += len;
-			else
-				cnt->rx[rxq].bytes += len;
-
-			break;
-		}
-	rcu_read_unlock();
-}
-
-void iwl_mvm_tdls_peer_cache_clear(struct iwl_mvm *mvm,
-				   struct ieee80211_vif *vif)
-{
-	struct iwl_mvm_tdls_peer_counter *cnt, *tmp;
-
-	/*
-	 * mvm->mutex is held or the HW is already unregistered, barring
-	 * vendor commands that can change the list.
-	 */
-	list_for_each_entry_safe(cnt, tmp, &mvm->tdls_peer_cache_list, list) {
-		if (vif && cnt->vif != vif)
-			continue;
-
-		mvm->tdls_peer_cache_cnt--;
-		list_del_rcu(&cnt->list);
-		kfree_rcu(cnt, rcu_head);
-	}
-}
-
-/* requires RCU read side lock taken */
-struct iwl_mvm_tdls_peer_counter *
-iwl_mvm_tdls_peer_cache_find(struct iwl_mvm *mvm, const u8 *addr)
-{
-	struct iwl_mvm_tdls_peer_counter *cnt;
-
-	list_for_each_entry_rcu(cnt, &mvm->tdls_peer_cache_list, list)
-		if (memcmp(addr, cnt->mac.addr, ETH_ALEN) == 0)
-			break;
-
-	if (&cnt->list == &mvm->tdls_peer_cache_list)
-		return NULL;
-
-	return cnt;
-}
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 1b31b84..0c89f1c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -1820,12 +1820,6 @@
 		info->status.status_driver_data[0] =
 			RS_DRV_DATA_PACK(lq_color, tx_resp->reduced_tpc);
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-		if (info->flags & IEEE80211_TX_STAT_ACK)
-			iwl_mvm_tdls_peer_cache_pkt(mvm, (void *)skb->data,
-						    skb->len, -1);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
-
 		if (likely(!iwl_mvm_time_sync_frame(mvm, skb, hdr->addr1)))
 			ieee80211_tx_status_skb(mvm->hw, skb);
 	}
@@ -2144,10 +2138,6 @@
 				WARN_ON_ONCE(tid != IWL_MAX_TID_COUNT);
 		}
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-		iwl_mvm_tdls_peer_cache_pkt(mvm, hdr, skb->len, -1);
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
-
 		/* this is the first skb we deliver in this batch */
 		/* put the rate scaling data there */
 		if (freed == 1) {
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c b/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
index f38c315..8e02077 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
@@ -225,175 +225,6 @@
 	return retval;
 }
 
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-static int iwl_vendor_tdls_peer_cache_add(struct wiphy *wiphy,
-					  struct wireless_dev *wdev,
-					  const void *data, int data_len)
-{
-	struct nlattr **tb;
-	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-	struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
-	struct iwl_mvm_tdls_peer_counter *cnt;
-	u8 *addr;
-	struct ieee80211_vif *vif = wdev_to_ieee80211_vif(wdev);
-	int err;
-
-	if (!vif)
-		return -ENODEV;
-
-	tb = iwl_mvm_parse_vendor_data(data, data_len);
-	if (IS_ERR(tb))
-		return PTR_ERR(tb);
-
-	if (vif->type != NL80211_IFTYPE_STATION ||
-	    !tb[IWL_MVM_VENDOR_ATTR_ADDR]) {
-		err = -EINVAL;
-		goto free;
-	}
-
-	mutex_lock(&mvm->mutex);
-	if (mvm->tdls_peer_cache_cnt >= IWL_MVM_TDLS_CNT_MAX_PEERS) {
-		err = -ENOSPC;
-		goto out_unlock;
-	}
-
-	addr = nla_data(tb[IWL_MVM_VENDOR_ATTR_ADDR]);
-
-	rcu_read_lock();
-	cnt = iwl_mvm_tdls_peer_cache_find(mvm, addr);
-	rcu_read_unlock();
-	if (cnt) {
-		err = -EEXIST;
-		goto out_unlock;
-	}
-
-	cnt = kzalloc(sizeof(*cnt) +
-		      sizeof(cnt->rx[0]) * mvm->trans->num_rx_queues,
-		      GFP_KERNEL);
-	if (!cnt) {
-		err = -ENOMEM;
-		goto out_unlock;
-	}
-
-	IWL_DEBUG_TDLS(mvm, "Adding %pM to TDLS peer cache\n", addr);
-	ether_addr_copy(cnt->mac.addr, addr);
-	cnt->vif = vif;
-	list_add_tail_rcu(&cnt->list, &mvm->tdls_peer_cache_list);
-	mvm->tdls_peer_cache_cnt++;
-
-	err = 0;
-
-out_unlock:
-	mutex_unlock(&mvm->mutex);
-free:
-	kfree(tb);
-	return err;
-}
-
-static int iwl_vendor_tdls_peer_cache_del(struct wiphy *wiphy,
-					  struct wireless_dev *wdev,
-					  const void *data, int data_len)
-{
-	struct nlattr **tb;
-	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-	struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
-	struct iwl_mvm_tdls_peer_counter *cnt;
-	u8 *addr;
-	int err;
-
-	tb = iwl_mvm_parse_vendor_data(data, data_len);
-	if (IS_ERR(tb))
-		return PTR_ERR(tb);
-
-	if (!tb[IWL_MVM_VENDOR_ATTR_ADDR]) {
-		err = -EINVAL;
-		goto free;
-	}
-
-	addr = nla_data(tb[IWL_MVM_VENDOR_ATTR_ADDR]);
-
-	mutex_lock(&mvm->mutex);
-	rcu_read_lock();
-	cnt = iwl_mvm_tdls_peer_cache_find(mvm, addr);
-	if (!cnt) {
-		IWL_DEBUG_TDLS(mvm, "%pM not found in TDLS peer cache\n", addr);
-		err = -ENOENT;
-		goto out_unlock;
-	}
-
-	IWL_DEBUG_TDLS(mvm, "Removing %pM from TDLS peer cache\n", addr);
-	mvm->tdls_peer_cache_cnt--;
-	list_del_rcu(&cnt->list);
-	kfree_rcu(cnt, rcu_head);
-	err = 0;
-
-out_unlock:
-	rcu_read_unlock();
-	mutex_unlock(&mvm->mutex);
-free:
-	kfree(tb);
-	return err;
-}
-
-static int iwl_vendor_tdls_peer_cache_query(struct wiphy *wiphy,
-					    struct wireless_dev *wdev,
-					    const void *data, int data_len)
-{
-	struct nlattr **tb;
-	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-	struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
-	struct iwl_mvm_tdls_peer_counter *cnt;
-	struct sk_buff *skb;
-	u32 rx_bytes, tx_bytes;
-	u8 *addr;
-	int err;
-
-	tb = iwl_mvm_parse_vendor_data(data, data_len);
-	if (IS_ERR(tb))
-		return PTR_ERR(tb);
-
-	if (!tb[IWL_MVM_VENDOR_ATTR_ADDR]) {
-		kfree(tb);
-		return -EINVAL;
-	}
-
-	addr = nla_data(tb[IWL_MVM_VENDOR_ATTR_ADDR]);
-
-	/* we can free the tb, the addr pointer is still valid into the msg */
-	kfree(tb);
-
-	rcu_read_lock();
-	cnt = iwl_mvm_tdls_peer_cache_find(mvm, addr);
-	if (!cnt) {
-		IWL_DEBUG_TDLS(mvm, "%pM not found in TDLS peer cache\n",
-			       addr);
-		err = -ENOENT;
-	} else {
-		int q;
-
-		tx_bytes = cnt->tx_bytes;
-		rx_bytes = 0;
-		for (q = 0; q < mvm->trans->num_rx_queues; q++)
-			rx_bytes += cnt->rx[q].bytes;
-		err = 0;
-	}
-	rcu_read_unlock();
-	if (err)
-		return err;
-
-	skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, 100);
-	if (!skb)
-		return -ENOMEM;
-	if (nla_put_u32(skb, IWL_MVM_VENDOR_ATTR_TX_BYTES, tx_bytes) ||
-	    nla_put_u32(skb, IWL_MVM_VENDOR_ATTR_RX_BYTES, rx_bytes)) {
-		kfree_skb(skb);
-		return -ENOBUFS;
-	}
-
-	return cfg80211_vendor_cmd_reply(skb);
-}
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
-
 enum iwl_rfi_capabilites {
 	IWL_MVM_RFI_DDR_CAPA_CNVI	= BIT(2),
 	IWL_MVM_RFI_DDR_CAPA_SCAN	= BIT(3),
@@ -1745,41 +1576,6 @@
 		.policy = iwl_mvm_vendor_attr_policy,
 		.maxattr = MAX_IWL_MVM_VENDOR_ATTR,
 	},
-#ifdef CPTCFG_IWLMVM_TDLS_PEER_CACHE
-	{
-		.info = {
-			.vendor_id = INTEL_OUI,
-			.subcmd = IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_ADD,
-		},
-		.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
-			 WIPHY_VENDOR_CMD_NEED_RUNNING,
-		.doit = iwl_vendor_tdls_peer_cache_add,
-		.policy = iwl_mvm_vendor_attr_policy,
-		.maxattr = MAX_IWL_MVM_VENDOR_ATTR,
-	},
-	{
-		.info = {
-			.vendor_id = INTEL_OUI,
-			.subcmd = IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_DEL,
-		},
-		.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
-			 WIPHY_VENDOR_CMD_NEED_RUNNING,
-		.doit = iwl_vendor_tdls_peer_cache_del,
-		.policy = iwl_mvm_vendor_attr_policy,
-		.maxattr = MAX_IWL_MVM_VENDOR_ATTR,
-	},
-	{
-		.info = {
-			.vendor_id = INTEL_OUI,
-			.subcmd = IWL_MVM_VENDOR_CMD_TDLS_PEER_CACHE_QUERY,
-		},
-		.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
-			 WIPHY_VENDOR_CMD_NEED_RUNNING,
-		.doit = iwl_vendor_tdls_peer_cache_query,
-		.policy = iwl_mvm_vendor_attr_policy,
-		.maxattr = MAX_IWL_MVM_VENDOR_ATTR,
-	},
-#endif /* CPTCFG_IWLMVM_TDLS_PEER_CACHE */
 	{
 		.info = {
 			.vendor_id = INTEL_OUI,
diff --git a/local-symbols b/local-symbols
index d4eb01c..5e08bd8 100644
--- a/local-symbols
+++ b/local-symbols
@@ -87,7 +87,6 @@
 IWLWIFI_THERMAL_DEBUGFS=
 IWLWIFI_FORCE_OFDM_RATE=
 IWLMVM_DISABLE_P2P_MIMO=
-IWLMVM_TDLS_PEER_CACHE=
 IWLMVM_VENDOR_CMDS=
 IWLWIFI_DISALLOW_OLDER_FW=
 IWLWIFI_PCIE_FAKE_RXQS=
diff --git a/versions b/versions
index 03d726d..a194999 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:12206:0bbed963"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:12207:e784520c"