All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@kernel.org
Cc: luca@coelho.fi, linux-wireless@vger.kernel.org
Subject: [PATCH 12/12] iwlwifi: mvm: perform 6GHz passive scan after suspend
Date: Sun, 19 Dec 2021 12:18:20 +0200	[thread overview]
Message-ID: <iwlwifi.20211219121514.6d5c043372cf.I251dd5618a3f0b8febbcca788eb861f1cd6039bc@changeid> (raw)
In-Reply-To: <20211219101820.85153-1-luca@coelho.fi>

From: Avraham Stern <avraham.stern@intel.com>

The 6GHz passive scan is performed only once every 50 minutes.
However, in case of suspend/resume, the regulatory information
is reset, so 6GHz channels may become disabled.
Fix it by performing a 6GHz passive scan within 60 seconds after
suspend/resume even if the 50 minutes timeout did not expire yet.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Fixes: e8fe3b41c3a3 ("iwlwifi: mvm: Add support for 6GHz passive scan")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 21 ++++++++-----------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index cad190fac9e3..68ee57790b17 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -1925,22 +1925,19 @@ static void iwl_mvm_scan_6ghz_passive_scan(struct iwl_mvm *mvm,
 	}
 
 	/*
-	 * 6GHz passive scan is allowed while associated in a defined time
-	 * interval following HW reset or resume flow
+	 * 6GHz passive scan is allowed in a defined time interval following HW
+	 * reset or resume flow, or while not associated and a large interval
+	 * has passed since the last 6GHz passive scan.
 	 */
-	if (vif->bss_conf.assoc &&
+	if ((vif->bss_conf.assoc ||
+	     time_after(mvm->last_6ghz_passive_scan_jiffies +
+			(IWL_MVM_6GHZ_PASSIVE_SCAN_TIMEOUT * HZ), jiffies)) &&
 	    (time_before(mvm->last_reset_or_resume_time_jiffies +
 			 (IWL_MVM_6GHZ_PASSIVE_SCAN_ASSOC_TIMEOUT * HZ),
 			 jiffies))) {
-		IWL_DEBUG_SCAN(mvm, "6GHz passive scan: associated\n");
-		return;
-	}
-
-	/* No need for 6GHz passive scan if not enough time elapsed */
-	if (time_after(mvm->last_6ghz_passive_scan_jiffies +
-		       (IWL_MVM_6GHZ_PASSIVE_SCAN_TIMEOUT * HZ), jiffies)) {
-		IWL_DEBUG_SCAN(mvm,
-			       "6GHz passive scan: timeout did not expire\n");
+		IWL_DEBUG_SCAN(mvm, "6GHz passive scan: %s\n",
+			       vif->bss_conf.assoc ? "associated" :
+			       "timeout did not expire");
 		return;
 	}
 
-- 
2.34.1


      parent reply	other threads:[~2021-12-19 10:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-19 10:18 [PATCH 00/12] iwlwifi: updates intended for v5.17 2021-12-19 part 1 Luca Coelho
2021-12-19 10:18 ` [PATCH 01/12] iwlwifi: mvm: use a define for checksum flags mask Luca Coelho
2021-12-19 10:18 ` [PATCH 02/12] iwlwifi: mvm: handle RX checksum on Bz devices Luca Coelho
2021-12-19 10:18 ` [PATCH 03/12] iwlwifi: mvm: don't trust hardware queue number Luca Coelho
2021-12-19 10:18 ` [PATCH 04/12] iwlwifi: mvm: change old-SN drop threshold Luca Coelho
2021-12-19 10:18 ` [PATCH 05/12] iwlwifi: yoyo: support TLV-based firmware reset Luca Coelho
2021-12-19 10:18 ` [PATCH 06/12] iwlwifi: don't pass actual WGDS revision number in table_revision Luca Coelho
2021-12-19 10:18 ` [PATCH 07/12] iwlwifi: mvm: test roc running status bits before removing the sta Luca Coelho
2021-12-19 10:18 ` [PATCH 08/12] iwlwifi: mvm: Fix calculation of frame length Luca Coelho
2021-12-19 10:18 ` [PATCH 09/12] iwlwifi: bump FW API to 69 for AX devices Luca Coelho
2021-12-19 10:18 ` [PATCH 10/12] iwlwifi: mvm: always store the PPAG table as the latest version Luca Coelho
2021-12-19 10:18 ` [PATCH 11/12] iwlwifi: mvm: correctly set channel flags Luca Coelho
2021-12-19 10:18 ` Luca Coelho [this message]

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=iwlwifi.20211219121514.6d5c043372cf.I251dd5618a3f0b8febbcca788eb861f1cd6039bc@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@kernel.org \
    --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.