All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Ayala Beker <ayala.beker@intel.com>,
	Johannes Berg <johannes.berg@intel.com>,
	Gregory Greenman <gregory.greenman@intel.com>
Subject: [PATCH 02/15] wifi: iwlwifi: mvm: add support for TID to link mapping neg request
Date: Mon, 29 Jan 2024 21:21:50 +0200	[thread overview]
Message-ID: <20240129211905.aab9819c378d.Icf6b79a362763e2e8b85959471f303b586617242@changeid> (raw)
In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com>

From: Ayala Beker <ayala.beker@intel.com>

Add support for handling TID to link mapping negotiation
request and decide whether to accept it or not.
Accept the request if all TIDs are mapped to the same link set,
otherwise reject it.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c |  5 +++++
 .../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 19 +++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index c82af4ac27ec..d19e478f382b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -263,6 +263,9 @@ static const u8 tm_if_types_ext_capa_sta[] = {
 					__bf_shf(IEEE80211_EML_CAP_EMLSR_PADDING_DELAY) | \
 				 IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_64US << \
 					__bf_shf(IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY))
+#define IWL_MVM_MLD_CAPA_OPS FIELD_PREP_CONST( \
+			IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP, \
+			IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME)
 
 static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
 	{
@@ -272,6 +275,7 @@ static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
 		.extended_capabilities_len = sizeof(he_if_types_ext_capa_sta),
 		/* relevant only if EHT is supported */
 		.eml_capabilities = IWL_MVM_EMLSR_CAPA,
+		.mld_capa_and_ops = IWL_MVM_MLD_CAPA_OPS,
 	},
 	{
 		.iftype = NL80211_IFTYPE_STATION,
@@ -280,6 +284,7 @@ static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
 		.extended_capabilities_len = sizeof(tm_if_types_ext_capa_sta),
 		/* relevant only if EHT is supported */
 		.eml_capabilities = IWL_MVM_EMLSR_CAPA,
+		.mld_capa_and_ops = IWL_MVM_MLD_CAPA_OPS,
 	},
 };
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
index 770e4c4e909a..9653d335d573 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
@@ -1330,6 +1330,24 @@ static bool iwl_mvm_mld_can_activate_links(struct ieee80211_hw *hw,
 	return ret;
 }
 
+static enum ieee80211_neg_ttlm_res
+iwl_mvm_mld_can_neg_ttlm(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+			 struct ieee80211_neg_ttlm *neg_ttlm)
+{
+	u16 map;
+	u8 i;
+
+	/* Verify all TIDs are mapped to the same links set */
+	map = neg_ttlm->downlink[0];
+	for (i = 0; i < IEEE80211_TTLM_NUM_TIDS; i++) {
+		if (neg_ttlm->downlink[i] != neg_ttlm->uplink[i] ||
+		    neg_ttlm->uplink[i] != map)
+			return NEG_TTLM_RES_REJECT;
+	}
+
+	return NEG_TTLM_RES_ACCEPT;
+}
+
 const struct ieee80211_ops iwl_mvm_mld_hw_ops = {
 	.tx = iwl_mvm_mac_tx,
 	.wake_tx_queue = iwl_mvm_mac_wake_tx_queue,
@@ -1425,4 +1443,5 @@ const struct ieee80211_ops iwl_mvm_mld_hw_ops = {
 	.change_vif_links = iwl_mvm_mld_change_vif_links,
 	.change_sta_links = iwl_mvm_mld_change_sta_links,
 	.can_activate_links = iwl_mvm_mld_can_activate_links,
+	.can_neg_ttlm = iwl_mvm_mld_can_neg_ttlm,
 };
-- 
2.34.1


  parent reply	other threads:[~2024-01-29 19:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 19:21 [PATCH 00/15] wifi: iwlwifi: updates - 2024-01-29 Miri Korenblit
2024-01-29 19:21 ` [PATCH 01/15] wifi: iwlwifi: fix EWRD table validity check Miri Korenblit
2024-01-29 19:21 ` Miri Korenblit [this message]
2024-01-29 19:21 ` [PATCH 03/15] wifi: iwlwifi: mvm: d3: fix IPN byte order Miri Korenblit
2024-01-29 19:21 ` [PATCH 04/15] wifi: iwlwifi: Fix spelling mistake "SESION" -> "SESSION" Miri Korenblit
2024-01-29 19:21 ` [PATCH 05/15] wifi: iwlwifi: mvm: don't set trigger frame padding in AP mode Miri Korenblit
2024-01-29 19:21 ` [PATCH 06/15] wifi: iwlwifi: always have 'uats_enabled' Miri Korenblit
2024-01-29 19:21 ` [PATCH 07/15] wifi: iwlwifi: mvm: Fix FTM initiator flags Miri Korenblit
2024-01-29 19:21 ` [PATCH 08/15] wifi: iwlwifi: mvm: Add support for removing responder TKs Miri Korenblit
2024-01-29 19:21 ` [PATCH 09/15] wifi: iwlwifi: remove Gl A-step remnants Miri Korenblit
2024-01-29 19:21 ` [PATCH 10/15] wifi: iwlwifi: mvm: use FW rate for non-data only on new devices Miri Korenblit
2024-01-29 19:21 ` [PATCH 11/15] wifi: iwlwifi: mvm: fix the TLC command after ADD_STA Miri Korenblit
2024-01-29 19:22 ` [PATCH 12/15] wifi: iwlwifi: pcie: Add the PCI device id for new hardware Miri Korenblit
2024-01-29 19:22 ` [PATCH 13/15] wifi: iwlwifi: mvm: support SPP A-MSDUs Miri Korenblit
2024-01-29 19:22 ` [PATCH 14/15] wifi: iwlwifi: mvm: log dropped packets due to MIC error Miri Korenblit
2024-01-29 19:22 ` [PATCH 15/15] wifi: iwlwifi: mvm: refactor duplicate chanctx condition Miri Korenblit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240129211905.aab9819c378d.Icf6b79a362763e2e8b85959471f303b586617242@changeid \
    --to=miriam.rachel.korenblit@intel.com \
    --cc=ayala.beker@intel.com \
    --cc=gregory.greenman@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.