All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: luca@coelho.fi, linux-wireless@vger.kernel.org
Subject: [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA
Date: Sun, 11 Apr 2021 13:25:38 +0300	[thread overview]
Message-ID: <iwlwifi.20210411132130.3d710091a0bd.I37a161ffdfb099a10080fbdc3b70a4deb76952e2@changeid> (raw)
In-Reply-To: <20210411102545.438654-1-luca@coelho.fi>

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

When we switch channel, we may miss a few beacons on the
new channel. Don't disconnect if the time event for the
switch ends before we hear the beacons.

Note that this is relevant only for old devices that still
use the TIME_EVENT firmware API for channel switch.

The check that we hear a beacon before the time event
ends was meant to be used for the association time event
and not for the channel switch time event.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index 1418a6438635..76c36f5cf9a3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2012-2014, 2018-2020 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2021 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2017 Intel Deutschland GmbH
  */
@@ -294,6 +294,17 @@ static void iwl_mvm_te_handle_notif(struct iwl_mvm *mvm,
 			iwl_mvm_roc_finished(mvm);
 			break;
 		case NL80211_IFTYPE_STATION:
+			/*
+			 * If we are switching channel, don't disconnect
+			 * if the time event is already done. Beacons can
+			 * be delayed a bit after the switch.
+			 */
+			if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) {
+				IWL_DEBUG_TE(mvm,
+					     "No beacon heard and the CS time event is over, don't disconnect\n");
+				break;
+			}
+
 			/*
 			 * By now, we should have finished association
 			 * and know the dtim period.
-- 
2.31.0


  reply	other threads:[~2021-04-11 10:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
2021-04-11 10:25 ` Luca Coelho [this message]
2021-04-12 10:27   ` [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA Luca Coelho
2021-04-11 10:25 ` [PATCH 2/8] iwlwifi: mvm: don't WARN if we can't remove a time event Luca Coelho
2021-04-11 10:25 ` [PATCH 3/8] iwlwifi: bump FW API to 63 for AX devices Luca Coelho
2021-04-11 10:25 ` [PATCH 4/8] iwlwifi: trans/pcie: defer transport initialisation Luca Coelho
2021-04-11 10:25 ` [PATCH 5/8] iwlwifi: fw: print out trigger delay when collecting data Luca Coelho
2021-04-11 10:25 ` [PATCH 6/8] iwlwifi: pcie: Change ma product string name Luca Coelho
2021-04-11 10:25 ` [PATCH 7/8] iwlwifi: dbg: disable ini debug in 9000 family and below Luca Coelho
2021-04-11 10:25 ` [PATCH 8/8] iwlwifi: mvm: add support for timing measurement Luca Coelho
2021-04-11 10:30   ` Luca Coelho

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.20210411132130.3d710091a0bd.I37a161ffdfb099a10080fbdc3b70a4deb76952e2@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.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.