Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp971862pxb; Sun, 11 Apr 2021 03:27:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0JGb3sBITBBD0ijcU/09J0XD3QNkGDa+uyEYGLpIUrbw3rB55u9Hr6SJiXuurRHLC39PV X-Received: by 2002:a17:90a:d812:: with SMTP id a18mr17292378pjv.192.1618136875273; Sun, 11 Apr 2021 03:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618136875; cv=none; d=google.com; s=arc-20160816; b=mrcnCrGgGjq0ufdlk4wPoE2jZ7mO/GihpDFekKDOyxROBvTYniHbMC0zxGEpegBdmS 9ho2uNu5O6BxruHoZ+XjJDm+BZ6ryuEclDkbkrM8H2Pzh76uPfM53Ay24Uhk9rDX8xqG eUVhBT5lN8ZmFzRY7RsWLkuEqEN40HIXPkdvgdGjDBKZFdx//07k8ViouzbVZPidR4Uf ukVd9UcHWo8pLN9eUbxNua3t0s1aMyZSrm5eSvw00XBNHjU1DN7R14XUm7GjMtFzxiFf 9Qxj+KakXabAg/H7zHbQfxwaOjNfIGeJE5VMpC+B5T4JVtpj0+84BUmDPDqK61HCEHxo lW1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=UeJXXVhbAx5rKJfXMwrUEqTTZScneYK2Q4zkAeJeERs=; b=tow7owORFO8u0rWcWGhEKJaEtGPZp5ydxHmvo9XmuwLSgrnowb89GEXvbNsRiO+yRg SKqlQuRcleqY13dn9+SSRtV/0Euc3YRWBvQlzSxZ8cDrbAKCVXIdmb4UyECvRys53GSd 5tENvbBzmWafkAwFlUIGOTIgMxXXRJx478aZQdyQoo7Nfla/GUHZQ6DPvYlxLLkHIVp4 EXF3U/NIzIgG5xZtL2oal8i8eIzDcZAheoyEijAs0ssEBf4qL8yZ4HYOw2Rjnx0N+UW0 VIGMcf+kNMa6dOJWH0q0GFlrN+Cqu/6k7cYQCUrLT/nZsaj7sLs/BtvDZAJHLwR6jC/y FNbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si11075350pjq.28.2021.04.11.03.27.42; Sun, 11 Apr 2021 03:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235233AbhDKK0F (ORCPT + 99 others); Sun, 11 Apr 2021 06:26:05 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:44500 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231356AbhDKK0E (ORCPT ); Sun, 11 Apr 2021 06:26:04 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=kveik.lan) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lVXHm-000K0H-1g; Sun, 11 Apr 2021 13:25:47 +0300 From: Luca Coelho To: kvalo@codeaurora.org Cc: luca@coelho.fi, linux-wireless@vger.kernel.org Date: Sun, 11 Apr 2021 13:25:38 +0300 Message-Id: X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210411102545.438654-1-luca@coelho.fi> References: <20210411102545.438654-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.5-pre1 Subject: [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Emmanuel Grumbach 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 Signed-off-by: Luca Coelho --- 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