From patchwork Mon Oct 18 10:57:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 515909 Delivered-To: patch@linaro.org Received: by 2002:ac0:cd8c:0:0:0:0:0 with SMTP id d12csp1643780imp; Mon, 18 Oct 2021 04:05:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzYsS7zihep7sPC/ZR/YA4sS4y0hgPkTNK6msqcfZu+h0CoGz/igMJEgfdsEyS5A3M7fFZ X-Received: by 2002:a17:902:db0a:b0:13e:e968:e144 with SMTP id m10-20020a170902db0a00b0013ee968e144mr26548494plx.43.1634555120300; Mon, 18 Oct 2021 04:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634555120; cv=none; d=google.com; s=arc-20160816; b=FkmnZXd4XS2QMBBpDhIu8rhdxHaYaAco7jid9jYhAJfpWIg0yrk9PgKD5w6LclUpsw yb6vvC/+/D9T+kpCs0s7FqRFnQAkm6t1nJFWKbaJpV70hB+mQNI/2ZgBgOWRAlAgt7Iz 1rFey/Bf+856LDLpgdnGv3IID6tcxMxaWSl9iXtrpxXH/2kfHqYBON/C/pKWcDGdv8z9 +Hi7aa/a7jUiNufviQzje6pikbnAAFKnbNWlEhjP6Pw0FvDKS+TRXLOc+0xje8ACZ047 UzX4cPirSAXOzNF48Y0x7JUilS/Wg9Hk/cd0/MivuO5lJRS6OZABxK2NuwAImHQPNfP8 CeMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature:dkim-signature; bh=OfvRv9MIzXvVwf4uaBFrWtADHdLGV457xrLRWhpu8r8=; b=PmUpx4US3GwzlZJORK/34hLpK50LJVaAVXscyc2ItZoXX/24sqd4MqZ5MP8xAANNe+ do3DL8mWOZtwNr7vCDk23zQnYuRCJLX/8I+p62WI4tTAMSyS/v1svsumPS8yQ/vEHOVa q0Tom0Kdq3CQmYZti8W4LvoVSHeY0cVPYUe1w3izUz+6Va4qaCZ0JRXsEboMPPijNmZ0 pgugb9awtaR0sIt+DIQAlnsAGeuoHcRkPwdxSfTyIgagbolXikZOc5GiIpoe2MsIk9wW 7JwyxxLtOfiEsRcj61DpURu+mtysI48H/5WQaB97NnNzMh72gZOugtXaBEjmr7lIno4c /1Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b="ezDpY/Y1"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=xn4FIYIE; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id a17si16895699pfh.112.2021.10.18.04.05.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 04:05:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b="ezDpY/Y1"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=xn4FIYIE; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OfvRv9MIzXvVwf4uaBFrWtADHdLGV457xrLRWhpu8r8=; b=ezDpY/Y1gLiIKG DhxErM9wyq/fQMGkC0R9HmRGeGJfkBQjiO7NVajEEleXuBAG7GEOrXP4C82nZGzJ9DhkjYRsq6FU9 tm+teTHlhDjxBgY3iqI6QdG/Z87+NIQFTlUgec8tW/mSFKDLaYATLk+dtK4NCMbtrXeiTdEpw1MP6 pv4MUYSz2jADi5YkODIVD2QnkgC2zmWo/BGBQOjyNwTF/pjnOSTUhdRIHPvwUPoldYASbIS06wbQR WB29JkL6kGouYvg+d9SoDYsj/73bwQF1g4PVH45Fbb7SwZnMa6N3qlsAgKngpCTIb5/uT7PXYQfwR YjWPEUoV5Lcs/V4rFtdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcQSE-00FEsm-6l; Mon, 18 Oct 2021 11:05:18 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcQAO-00F6je-5Z for wcn36xx@lists.infradead.org; Mon, 18 Oct 2021 10:46:53 +0000 Received: by mail-wr1-x432.google.com with SMTP id i12so40411071wrb.7 for ; Mon, 18 Oct 2021 03:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BaJ5lbXk0aHDbSY/0wo3ZTQDwBqF9Vwclu0gix6RmYQ=; b=xn4FIYIEzzSCxgDqLrrb44ivDe/qPvSAiYlg5UwclYfv+9u8zEktek80sUw5xKg+H2 sE+Bteza3k3y8ESdsw0M94j3ZQxob+XybcMlwBQjCDVvcgdB15JD7AO3aYFFb5Momqrk xjmCrekgwtjv70Ud8hDgjLkZ4AW3ocSoIE1M4fMT6Grv2fRIRKnfUwsJZobJCoShExGI iqmkGX6dJYi2QESU+4AtiuWttyObJ10TpEE/gtrgZWI+zeyVvsrzl+MdsdZKs5ONfXm1 F4W6/Ndnroa40dXroSW62XIu66XFnwxJ3ajpoSB89v+dni9p/RFtees18vaFMIV/opHC klAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BaJ5lbXk0aHDbSY/0wo3ZTQDwBqF9Vwclu0gix6RmYQ=; b=aAmo4VgDOt8MdaVJfs+Tm9ggBqPbX9B2czp5a/C2JiycJHcIf7tDpGKiuiWY4H124d Dg6HusNrOozJV39rQSYuJiataY36zk2mrHG9hGtfmrv6nQze1XjeGmxEvPLQGRZZFG4U hdqxVEgCp/lSn7xjTzuMwrBvLsmOof8dQF5dDuwu+Vi+dmjPAw6qaqE6bdWIMcU0546D ZuI9aQ9SvpvJxAGMmrhJh1GQZVnl9WKWwll0dcrnIMfTtJW+MRM5QQj9S6adOowpQ77p Bvx+tNta8u+0vqNa6V8PUJPCK444aiRG7FD/1ePdlytA34Ua3aHOsVq31QzX2yvp9fer fT6w== X-Gm-Message-State: AOAM530TTZfj1w4MJ0rYwvAQBYar8Y/Xipaf9NPaYjBcWw1QBAnnZnZG BXPHp+UIxDEEXU5wkIsDXdK+qA== X-Received: by 2002:a5d:59a9:: with SMTP id p9mr35718769wrr.386.1634554010787; Mon, 18 Oct 2021 03:46:50 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:82c:5f0:9df5:c752:530b:345b]) by smtp.gmail.com with ESMTPSA id r4sm15195945wrz.58.2021.10.18.03.46.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Oct 2021 03:46:50 -0700 (PDT) From: Loic Poulain To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, Loic Poulain Subject: [PATCH 2/2] wcn36xx: Enable hardware scan offload for 5Ghz band Date: Mon, 18 Oct 2021 12:57:58 +0200 Message-Id: <1634554678-7993-2-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1634554678-7993-1-git-send-email-loic.poulain@linaro.org> References: <1634554678-7993-1-git-send-email-loic.poulain@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211018_034652_250173_CF2E34A9 X-CRM114-Status: GOOD ( 14.47 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Until now, offload scanning for 5Ghz channels was considered broken. However it was mostly a driver issue, caused by bad reporting of the beacons/probe-resp bands and frequencies, which has been fixed [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:432 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Until now, offload scanning for 5Ghz channels was considered broken. However it was mostly a driver issue, caused by bad reporting of the beacons/probe-resp bands and frequencies, which has been fixed. We can now allow offload scan for 5GHz band, this reduces the scanning time comparing to software driven scanning. Note that offloaded scan is limited to 48 channels, check for this. Signed-off-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx Tested-by: Bryan O'Donoghue diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 263af65..2ac8efa 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -659,19 +659,19 @@ static int wcn36xx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_scan_request *hw_req) { struct wcn36xx *wcn = hw->priv; - int i; if (!get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) { /* fallback to mac80211 software scan */ return 1; } - /* For unknown reason, the hardware offloaded scan only works with - * 2.4Ghz channels, fallback to software scan in other cases. + /* Firmware scan offload is limited to 48 channels, fallback to + * software driven scanning otherwise. */ - for (i = 0; i < hw_req->req.n_channels; i++) { - if (hw_req->req.channels[i]->band != NL80211_BAND_2GHZ) - return 1; + if (hw_req->req.n_channels > 48) { + wcn36xx_warn("Offload scan aborted, n_channels=%u", + hw_req->req.n_channels); + return 1; } mutex_lock(&wcn->scan_lock);