summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>2025-05-09 13:44:49 +0300
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>2025-05-10 21:42:55 +0300
commitdb8c12f7c35a583380cc149e0903bb153dcfc852 (patch)
tree4242e55ea4e8d208ee269c434a791275de2bd01c
parent6f47182ccda522c692e7f3618efe91fd2975d6bd (diff)
wifi: iwlwifi: mld: Fix ROC activity cleanup in iwl_mld_vif
The roc_activity member in the iwl_mld_vif structure was previously set to zero during cleanup as was present in struct_group, which incorrectly indicated ROC_ACTIVITY_HOTSPOT. To fix this issue, remove roc_activity member from struct_group. Notify mac80211 of ROC expiration during vif cleanup to maintain synchronization between the driver and mac80211. While on it, update it's type to enum iwl_roc_activity. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-11-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/iface.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/iface.h7
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.c b/drivers/net/wireless/intel/iwlwifi/mld/iface.c
index c083ba416d40..fdb7a3b3107d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/iface.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.c
@@ -25,6 +25,9 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
/* EMLSR is turned back on during recovery */
vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE;
+ if (mld_vif->roc_activity != ROC_NUM_ACTIVITIES)
+ ieee80211_remain_on_channel_expired(mld->hw);
+
mld_vif->roc_activity = ROC_NUM_ACTIVITIES;
for_each_mld_vif_valid_link(mld_vif, link) {
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.h b/drivers/net/wireless/intel/iwlwifi/mld/iface.h
index 1ae522431f3f..3437f0c422cf 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/iface.h
+++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.h
@@ -10,6 +10,7 @@
#include "link.h"
#include "session-protect.h"
#include "d3.h"
+#include "fw/api/time-event.h"
enum iwl_mld_cca_40mhz_wa_status {
CCA_40_MHZ_WA_NONE,
@@ -125,8 +126,6 @@ struct iwl_mld_emlsr {
* Only valid for STA. (FIXME: needs to be per link)
* @num_associated_stas: number of associated STAs. Relevant only for AP mode.
* @ap_ibss_active: whether the AP/IBSS was started
- * @roc_activity: the id of the roc_activity running. Relevant for p2p device
- * only. Set to %ROC_NUM_ACTIVITIES when not in use.
* @cca_40mhz_workaround: When we are connected in 2.4 GHz and 40 MHz, and the
* environment is too loaded, we work around this by reconnecting to the
* same AP with 20 MHz. This manages the status of the workaround.
@@ -142,6 +141,8 @@ struct iwl_mld_emlsr {
* @use_ps_poll: use ps_poll frames
* @disable_bf: disable beacon filter
* @dbgfs_slink: debugfs symlink for this interface
+ * @roc_activity: the id of the roc_activity running. Relevant for p2p device
+ * only. Set to %ROC_NUM_ACTIVITIES when not in use.
*/
struct iwl_mld_vif {
/* Add here fields that need clean up on restart */
@@ -153,7 +154,6 @@ struct iwl_mld_vif {
struct ieee80211_key_conf __rcu *bigtks[2];
u8 num_associated_stas;
bool ap_ibss_active;
- u32 roc_activity;
enum iwl_mld_cca_40mhz_wa_status cca_40mhz_workaround;
#ifdef CONFIG_IWLWIFI_DEBUGFS
bool beacon_inject_active;
@@ -176,6 +176,7 @@ struct iwl_mld_vif {
bool disable_bf;
struct dentry *dbgfs_slink;
#endif
+ enum iwl_roc_activity roc_activity;
};
static inline struct iwl_mld_vif *