Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7409255rwn; Tue, 13 Sep 2022 20:38:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR4QxYdMoKwazGNRboObv/cgE+B6d8ymP2UkCE8BvS6mYF/rn5aOpckDMUyYxg7HSOSDSt+X X-Received: by 2002:a63:5246:0:b0:42b:e4a5:7252 with SMTP id s6-20020a635246000000b0042be4a57252mr29591996pgl.566.1663126739536; Tue, 13 Sep 2022 20:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663126739; cv=none; d=google.com; s=arc-20160816; b=SQ1fRzRaqJq5lwl9/E7sE/qA1U1eOLHJMYj03+ICk4MmXkhh5A5UllH0ErCk/beWY9 YD2BBI5DM6WvCrciKnlX6cAwOywgEBjqD75QPkMlOxyxiQ6Ham0EiPyUImeGIgxwMf64 VQ+e2pjvWdUdu/NcQ45ogAD2nI6iQNi/OBCRG4j3iV6XJZZr9TxHxIDxjbUTCnGn06Jr Gh1EJn6FVdTd0vDNom8UNdj/nLDNG8FI9FGBebncni5aiKi58G7xqKvokUN6gTkawSXN Va9HnMSL+dT426EEHr4smJyvRl0fR9qMDEvB3M0Ixt3OD6DhADjDquVnzVTYpc2Tk0CE EaaA== 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=H9Ua2xqj+HhdZEA1Exu3cfy6Fo8BUEmFtytllDzwlC4=; b=pscLMV8AwR+k8TSZ+0KAY/aW/hRqyMes1swrY5Tb+RLF5ODKqmlPbMaX7F1AMvhGp7 tpSJ7oupzGsAldC46B6il2mnb2Asw0KgrLxwXFeePAE5UfG+e30KqyDekw+Ul5E8FIk3 sqw2AFtR891yRsJkR3imjKa1ajC69YEu08wxzQMD5zy3PmET3dRdv5AB9Wsnw3s/TbxD eqRTiqWcjV1xE4qtbuYBfpO8IrirSX3S38bVJ3qRxDw9q9gYoKqcJBCcbZTiKfU7SoFj lvFCrctOXoRB9kT4BdaOvMF1Z/0tZajD1NlDDwvaYUNo5RmtSZfaEs/DQlKiz/O89Q1K aE1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b="J8mv/M+3"; 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 p15-20020a056a000b4f00b0053e65ebfc2esi10679881pfo.60.2022.09.13.20.38.51; Tue, 13 Sep 2022 20:38:59 -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="J8mv/M+3"; 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 S229667AbiINDgq (ORCPT + 64 others); Tue, 13 Sep 2022 23:36:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbiINDgk (ORCPT ); Tue, 13 Sep 2022 23:36:40 -0400 Received: from smtp12.infineon.com (smtp12.infineon.com [217.10.52.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09AD75FACC for ; Tue, 13 Sep 2022 20:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1663126600; x=1694662600; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EFcwVYy0uOn11XS5mWuvGefYW+bQLdSZQCfFlZ265Vw=; b=J8mv/M+3z+olRcVoAAQB/pf3sudd760YQ5YAs86FqjoAzsvRdpcqJ8/W Xbc/BmSD8xwBsI7TkHhS7+cNECRaNRbeRH8eld1Hi4qy16zo88h3ywQmb Pfd9cga/dv/PDVkKDfjlvw4CiW57ZVpbIcb6yl0wF/PTMQShTEOnkzIcd s=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="317080313" X-IronPort-AV: E=Sophos;i="5.93,313,1654552800"; d="scan'208";a="317080313" Received: from unknown (HELO mucxv002.muc.infineon.com) ([172.23.11.17]) by smtp11.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 05:36:39 +0200 Received: from MUCSE822.infineon.com (MUCSE822.infineon.com [172.23.29.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv002.muc.infineon.com (Postfix) with ESMTPS for ; Wed, 14 Sep 2022 05:36:38 +0200 (CEST) Received: from MUCSE824.infineon.com (172.23.29.55) by MUCSE822.infineon.com (172.23.29.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 14 Sep 2022 05:36:38 +0200 Received: from mailrelay-cypress3.infineon.com (172.23.18.46) by SMTP-MailRelay3.infineon.com (172.23.29.16) with Microsoft SMTP Server id 15.2.986.29; Wed, 14 Sep 2022 05:36:37 +0200 mailrelay-external-outbound: True X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="258424476" X-IronPort-AV: E=Sophos;i="5.93,313,1654552800"; d="scan'208";a="258424476" Received: from unknown (HELO mail.spansion.com) ([10.248.30.8]) by mailrelay-cypress3.infineon.com with ESMTP; 14 Sep 2022 05:36:37 +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; Tue, 13 Sep 2022 22:36:36 -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 37486100348; Tue, 13 Sep 2022 22:36:36 -0500 (CDT) Received: by iot-wlan-dev-u03.aus.cypress.com (Postfix, from userid 27991) id 34D7F980794; Tue, 13 Sep 2022 22:36:36 -0500 (CDT) From: Ian Lin To: CC: , , , , , , Subject: [PATCH 3/5] brcmfmac: Avoiding Connection delay Date: Tue, 13 Sep 2022 22:36:18 -0500 Message-ID: <20220914033620.12742-4-ian.lin@infineon.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20220914033620.12742-1-ian.lin@infineon.com> References: <20220914033620.12742-1-ian.lin@infineon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: Prasanna Kerekoppa Channel info passed by supplicant is not given to firmware. This causes delay (about 3seconds) due to full scan. Supplicant already provides the channel info for the specific SSID. channel_hint carries this channel info for the connect call back. Patch has been verified on 43012 and 43455. Signed-off-by: Prasanna Kerekoppa 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 7e9354768cfe..eba03a994e95 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2049,6 +2049,12 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, return -EOPNOTSUPP; } + if (sme->channel_hint) + chan = sme->channel_hint; + + if (sme->bssid_hint) + sme->bssid = sme->bssid_hint; + if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif) { /* A normal (non P2P) connection request setup. */ ie = NULL; -- 2.25.0