mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
wifi: iwlwifi: mld: Block EMLSR when scanning on P2P Device
Temporarily block EMLSR when scanning on a P2P Device interface, as this is an indication that P2P activity is about to start, e.g., P2P client connection to a P2P GO. Since a P2P scan while a station interface connection is active might be long, increase the EMLSR blocking timeout to 10 seconds. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250612144708.85fb79d537fe.I27523f8d3f00f2b66f5f555f098e323be29465ea@changeid
This commit is contained in:
committed by
Miri Korenblit
parent
b2c1f9b6e3
commit
b04e93bb6d
@@ -2580,28 +2580,6 @@ static int iwl_mld_mac80211_tx_last_beacon(struct ieee80211_hw *hw)
|
||||
return mld->ibss_manager;
|
||||
}
|
||||
|
||||
#define IWL_MLD_EMLSR_BLOCKED_TMP_NON_BSS_TIMEOUT (5 * HZ)
|
||||
|
||||
static void iwl_mld_vif_iter_emlsr_block_tmp_non_bss(void *_data, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
int ret;
|
||||
|
||||
if (!iwl_mld_vif_has_emlsr_cap(vif))
|
||||
return;
|
||||
|
||||
ret = iwl_mld_block_emlsr_sync(mld_vif->mld, vif,
|
||||
IWL_MLD_EMLSR_BLOCKED_TMP_NON_BSS,
|
||||
iwl_mld_get_primary_link(vif));
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
wiphy_delayed_work_queue(mld_vif->mld->wiphy,
|
||||
&mld_vif->emlsr.tmp_non_bss_done_wk,
|
||||
IWL_MLD_EMLSR_BLOCKED_TMP_NON_BSS_TIMEOUT);
|
||||
}
|
||||
|
||||
static void iwl_mld_prep_add_interface(struct ieee80211_hw *hw,
|
||||
enum nl80211_iftype type)
|
||||
{
|
||||
@@ -2614,10 +2592,7 @@ static void iwl_mld_prep_add_interface(struct ieee80211_hw *hw,
|
||||
type == NL80211_IFTYPE_P2P_CLIENT))
|
||||
return;
|
||||
|
||||
ieee80211_iterate_active_interfaces_mtx(mld->hw,
|
||||
IEEE80211_IFACE_ITER_NORMAL,
|
||||
iwl_mld_vif_iter_emlsr_block_tmp_non_bss,
|
||||
NULL);
|
||||
iwl_mld_emlsr_block_tmp_non_bss(mld);
|
||||
}
|
||||
|
||||
static int iwl_mld_set_hw_timestamp(struct ieee80211_hw *hw,
|
||||
|
||||
@@ -287,6 +287,36 @@ int iwl_mld_block_emlsr_sync(struct iwl_mld *mld, struct ieee80211_vif *vif,
|
||||
return _iwl_mld_emlsr_block(mld, vif, reason, link_to_keep, true);
|
||||
}
|
||||
|
||||
#define IWL_MLD_EMLSR_BLOCKED_TMP_NON_BSS_TIMEOUT (10 * HZ)
|
||||
|
||||
static void iwl_mld_vif_iter_emlsr_block_tmp_non_bss(void *_data, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
int ret;
|
||||
|
||||
if (!iwl_mld_vif_has_emlsr_cap(vif))
|
||||
return;
|
||||
|
||||
ret = iwl_mld_block_emlsr_sync(mld_vif->mld, vif,
|
||||
IWL_MLD_EMLSR_BLOCKED_TMP_NON_BSS,
|
||||
iwl_mld_get_primary_link(vif));
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
wiphy_delayed_work_queue(mld_vif->mld->wiphy,
|
||||
&mld_vif->emlsr.tmp_non_bss_done_wk,
|
||||
IWL_MLD_EMLSR_BLOCKED_TMP_NON_BSS_TIMEOUT);
|
||||
}
|
||||
|
||||
void iwl_mld_emlsr_block_tmp_non_bss(struct iwl_mld *mld)
|
||||
{
|
||||
ieee80211_iterate_active_interfaces_mtx(mld->hw,
|
||||
IEEE80211_IFACE_ITER_NORMAL,
|
||||
iwl_mld_vif_iter_emlsr_block_tmp_non_bss,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void _iwl_mld_select_links(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif);
|
||||
|
||||
|
||||
@@ -157,6 +157,8 @@ struct iwl_mld_link_sel_data {
|
||||
u16 grade;
|
||||
};
|
||||
|
||||
void iwl_mld_emlsr_block_tmp_non_bss(struct iwl_mld *mld);
|
||||
|
||||
#if IS_ENABLED(CONFIG_IWLWIFI_KUNIT_TESTS)
|
||||
u32 iwl_mld_emlsr_pair_state(struct ieee80211_vif *vif,
|
||||
struct iwl_mld_link_sel_data *a,
|
||||
|
||||
@@ -1752,6 +1752,10 @@ int iwl_mld_regular_scan_start(struct iwl_mld *mld, struct ieee80211_vif *vif,
|
||||
struct cfg80211_scan_request *req,
|
||||
struct ieee80211_scan_ies *ies)
|
||||
{
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
|
||||
iwl_mld_emlsr_block_tmp_non_bss(mld);
|
||||
|
||||
return _iwl_mld_single_scan_start(mld, vif, req, ies,
|
||||
IWL_MLD_SCAN_REGULAR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user