Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp269236rwb; Wed, 28 Sep 2022 02:23:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4G034X4cjNMP2FNupxv9JLXJNvv7+3BCwdpJG8HjCP+Va54TggT5d91nDZNLabaV5Z47yS X-Received: by 2002:a17:907:ea6:b0:782:1ace:9d5b with SMTP id ho38-20020a1709070ea600b007821ace9d5bmr24998826ejc.770.1664357016065; Wed, 28 Sep 2022 02:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664357016; cv=none; d=google.com; s=arc-20160816; b=TVyFyAbOYrGi8SAXmJFSHlRlQRp7+APEHhh2XXhlo3er3O15YEKWYRUYf5o8GfMwmi oLEM9AbdqP+pg74Pxeyf4QShAIjWPDEBke4YJMaHQOLDC+TigbRx0lgN05UQG/shvXhB GFg+92jP5KL1o7qowng5YH2lCyEdh9bL+D07C3fIFqnd4gSE9nY+6sVjJnQvcE1hSyMe UJIUNcH8LK9YE+q+07AHm38dii72JyoyEakAzpyz7ZCmGF2Ui/nUdB/+6YGTPjlmxAzq K6YnnyjkW+9T/5lDZkn33/aaRGo8qGfUVgY8VQnHml7Bptz83vQWGM4zt3VSIER9Av1g G3eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :mailrelay-external-outbound:dkim-signature; bh=cYy+8ZvoNz8azc2pOTmlyFM4SXfwwEiGj6ado7F4Cww=; b=cNUauTR0gtobYjU9Ri44WnzmQyATBvpZdD9m67QcQ8MgZGYK46IQQVmeFfHPhvi6vH JAoTVKQWdKHodJuYJvLkHmtWhMqL0bY3Oc8pr20N7JpBdJsISsBFNA7b8UIozef/sRzA tpRgRptUuAhmFBRuKtDqk0wXgpzCDRWqxH1t8XnSqiABXk8L0fUny6/TrvQ0u36R9WMx T2FkBT9r6+/xdQM2qZXFITMbZFLvEyw1outWTwcUI9LlVQRcdh0M4Wf7p5dEHjK105xD MTcos07B71FMLRIcsYSfG1yim1ZcBMQaNAvNF55iOGRdOfNLf9JxuxlsRvKRBiJPQgzC UyGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=jKrKg67l; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a17090658cd00b00781b5892d43si5534153ejs.112.2022.09.28.02.23.20; Wed, 28 Sep 2022 02:23:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=jKrKg67l; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233659AbiI1JWk (ORCPT + 59 others); Wed, 28 Sep 2022 05:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233644AbiI1JWj (ORCPT ); Wed, 28 Sep 2022 05:22:39 -0400 Received: from smtp3.infineon.com (smtp3.infineon.com [217.10.52.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B583A8CD2 for ; Wed, 28 Sep 2022 02:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1664356958; x=1695892958; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N7qSIZQ6qCmSuqy64o+LwwPblmBsLkjDyvXDO1U9s90=; b=jKrKg67ltVfBg3amlS6dk8mHVwOirtVjvt/879jZWENfewe8G7GPpEKy 2iOBkuI8MxPhLldwLuKQORNoXjnMbN5Lfrsfi4zaJrUZ0q2qBm+QP59f9 Zb89eVdr+GKRE9ksr0oL/UhMsvz67lngNufumsPE1g8JNDEHb9oyqqvle Y=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="2235080" X-IronPort-AV: E=Sophos;i="5.93,351,1654552800"; d="scan'208";a="2235080" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp2.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2022 11:22:37 +0200 Received: from MUCSE805.infineon.com (MUCSE805.infineon.com [172.23.29.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv001.muc.infineon.com (Postfix) with ESMTPS for ; Wed, 28 Sep 2022 11:22:36 +0200 (CEST) Received: from MUCSE804.infineon.com (172.23.29.30) by MUCSE805.infineon.com (172.23.29.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 28 Sep 2022 11:22:36 +0200 Received: from mailrelay-cypress4.infineon.com (172.23.18.56) by SMTP-MailRelay1.infineon.com (172.23.29.5) with Microsoft SMTP Server id 15.2.986.29; Wed, 28 Sep 2022 11:22:35 +0200 mailrelay-external-outbound: True X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="261078453" X-IronPort-AV: E=Sophos;i="5.93,351,1654552800"; d="scan'208";a="261078453" Received: from unknown (HELO mail.spansion.com) ([10.248.30.8]) by mailrelay-cypress4.infineon.com with ESMTP; 28 Sep 2022 11:22:35 +0200 Received: from inf2.aus.cypress.com (10.248.80.6) by BIZ-EXHT102.spansion.com (10.248.30.8) with Microsoft SMTP Server id 14.3.498.0; Wed, 28 Sep 2022 04:22:33 -0500 Received: from iot-wlan-dev-u03.aus.cypress.com (iot-wlan-dev-u03 [10.248.81.193]) by inf2.aus.cypress.com (Postfix) with ESMTP id 5170E1004E2; Wed, 28 Sep 2022 04:22:33 -0500 (CDT) Received: by iot-wlan-dev-u03.aus.cypress.com (Postfix, from userid 27991) id 41D459807EB; Wed, 28 Sep 2022 04:22:33 -0500 (CDT) From: Ian Lin To: CC: , , , , , , Subject: [PATCH v2 4/4] brcmfmac: Fix authentication latency caused by OBSS stats survey Date: Wed, 28 Sep 2022 04:22:23 -0500 Message-ID: <20220928092223.22673-5-ian.lin@infineon.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20220928092223.22673-1-ian.lin@infineon.com> References: <20220928092223.22673-1-ian.lin@infineon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ramesh Rangavittal Auto Channel Select feature of HostAP uses dump_survey to fetch OBSS statistics. When the device is in the middle of an authentication sequence or just at the end of authentication completion, running dump_survey would trigger a channel change. The channel change in-turn can cause packet loss, resulting in authentication delay. With this change, dump_survey won't be run when authentication or association is in progress, hence resolving the issue. Signed-off-by: Ramesh Rangavittal Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 12a1135662e9..10602bf4478c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -7721,6 +7721,12 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev, brcmf_dbg(TRACE, "Enter: channel idx=%d\n", idx); + /* Do not run survey when VIF in CONNECTING / CONNECTED states */ + if ((test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) || + (test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state))) { + return -EBUSY; + } + band = wiphy->bands[NL80211_BAND_2GHZ]; if (band && idx >= band->n_channels) { idx -= band->n_channels; -- 2.25.0