2024-06-05 11:18:45

by Miri Korenblit

[permalink] [raw]
Subject: [PATCH 5/5] wifi: iwlwifi: mvm: Add support for interface usage notification

From: Ilan Peer <[email protected]>

When an interface usage notification indicates that a P2P group
interface is about to be started and there is an ongoing MLD
connection with active EMLSR, exit EMLSR.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
---
depends on the patchs adding this API in the mac80211 patchset

.../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
index d972fcbc2cf7..68cd5b621ed8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
@@ -1354,6 +1354,20 @@ iwl_mvm_mld_mac_pre_channel_switch(struct ieee80211_hw *hw,
return ret;
}

+static void iwl_mvm_mld_iface_usage(struct ieee80211_hw *hw,
+ struct cfg80211_iface_usage *iface_usage)
+{
+ struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
+ u32 p2p_iftypes = BIT(NL80211_IFTYPE_P2P_GO) |
+ BIT(NL80211_IFTYPE_P2P_CLIENT);
+
+ IWL_DEBUG_MAC80211(mvm, "iface_usage_notif: mask=0x%x\n",
+ iface_usage->types_mask);
+
+ if (iface_usage->types_mask & p2p_iftypes)
+ iwl_mvm_esr_non_bss_link(mvm, NULL, 0, true);
+}
+
const struct ieee80211_ops iwl_mvm_mld_hw_ops = {
.tx = iwl_mvm_mac_tx,
.wake_tx_queue = iwl_mvm_mac_wake_tx_queue,
@@ -1450,4 +1464,5 @@ const struct ieee80211_ops iwl_mvm_mld_hw_ops = {
.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,
+ .iface_usage = iwl_mvm_mld_iface_usage,
};
--
2.34.1