From patchwork Fri Oct 22 14:04:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 516139 Delivered-To: patch@linaro.org Received: by 2002:ac0:bf50:0:0:0:0:0 with SMTP id o16csp1117703imj; Fri, 22 Oct 2021 07:02:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMqD/B33ob3iA4XXk8IA2SPWrUn7XfUtRhkN9FS7XcyuMyd4XaaJoicUlkwRah+c+QlRhc X-Received: by 2002:a17:902:e801:b0:13f:255:9db5 with SMTP id u1-20020a170902e80100b0013f02559db5mr11316092plg.23.1634911375891; Fri, 22 Oct 2021 07:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634911375; cv=none; d=google.com; s=arc-20160816; b=lZiIDbKBBnFyA3sdfsjcjkOyp4UZjiw0+Pbv9Mu71UOZsZ//KDLQ3yoeRoC4cd3uz5 TZSMPnmng21nllTUdp0Oj+TU7rjnU7kFcP/1Z2zerkZukBT8QRYyPSnsD42utDqiY8kx kOBirJY3L4SRqSKZUSsnDzohY+EhVPqcybIv7FCEOT89yq+yG4Ik1GchlQGGHpWOtm+M VekENJGzNz7/IdJsXVJhcmPkdmWst0eNvcpNChCLEIhANiGaEkdO4bp0ALyyKXs31MuC wF8RKiJu8udh3vnH4Owi1VqFTjA5H67G8PFBtszbjVqUdIixTDjFvbr2hOrewxye1bPe LKcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=a/GR02LRvmhZXUNoP6yEw0D99vBY0DJlIDjtdAO/Ors=; b=VCLtCQ1XWkZva5SFqKqEKoOmSpJcVstzV5+Yar7gsxRYrOQhUYy2qtrU4HDep0phRE chQcJ9lzIaPwdVYBuPAygaFx2XRjeblMogIpXQdkHgqqBfuNL6oOuAAcxDu1Vrw78Eks QjSKSqj9Fqcmrjf8GNCT/7AF6rqAO7bTFyWwwKHIq26xP7C05eLpz7g+gEP6J+0Uco1o e2bBkli6+oN+HJboRnYH02uXUP3s8ucdvS0IHDbTKFZC1mpzDJTreJKVNI4T3iwWvPOE LSDte5TSKTdym/YxEiv0oMerOi0QchmS3KLIs+sqe+xoDRVBuhoB7UR8mDiZAtQ7ZTg1 LcXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=DOY970KN; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bHqRH1IA; 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 r6si13744992pgv.247.2021.10.22.07.02.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 07:02:55 -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=DOY970KN; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bHqRH1IA; 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=a/GR02LRvmhZXUNoP6yEw0D99vBY0DJlIDjtdAO/Ors=; b=DOY970KNxlcJTr sXnDUaZeWwjrgxnCX0vDhpn04nhO55Dd9eCbCzBjkWI5UgIJmsKcfpmISkln7m9QCNhlitxbh9w8Y 0PtnXeoMzEpihBaly4eNXCerkbZxtUmiF/k0Ka440kNTNodjltCO1f/v9gci1CIwZ+QLeVWXVEhPZ FHI1gqC0AUFJu+ZobshrA5itrSKm4NE3NJ1KYdACcYNfNmRlyUFYAARR6NZAstyFyjKhoMsKG1t61 gdX9KnRRHdA49hXdXWSYT9tYfV+19BUmoyVf3IA9372lrq3DwqSNY0CKINSYfn+v7Y1wmRaR8vPaL nrT6fbexF2+DfiN1kVjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdv8I-00BBEJ-IU; Fri, 22 Oct 2021 14:02:54 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdv8G-00BBDe-07 for wcn36xx@lists.infradead.org; Fri, 22 Oct 2021 14:02:53 +0000 Received: by mail-wr1-x435.google.com with SMTP id d3so1069671wrh.8 for ; Fri, 22 Oct 2021 07:02: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 :mime-version:content-transfer-encoding; bh=B/qiK0v1pop72OWfh2hJtPvJXhk79SaLDKolKRgysc8=; b=bHqRH1IA5Ys8EvtC3eMmKRwRSl3JC3R2DLrcpJxdn/B9lE6/+Ix/Xs8/KNAycE/JwX SwTE100gRo0KDStpiQPOSvTPYjpU00s6E6b3HPH/qqF10KIyzv5Wo4dCMCKdJSErUGUM wSfXh2zEwFamPlzU5csVynNItHy32i2MBFF9R+V/5V1RD9MHgNAQQ02YisQxeHR2BGNW wtBS4t0bglLv0rZfOFp1JhGf4eWjoy5nCP8sZi9SdQ+9M9hG+BX4Q1j6OCqfyFDD/Kp5 iG2IW64+qjUvJ/b6+9g4KDfNz5tCDopgjPOnAyBxIcwLjUptRbKtyiuFpFuw/xve9cyy JkKg== 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:mime-version:content-transfer-encoding; bh=B/qiK0v1pop72OWfh2hJtPvJXhk79SaLDKolKRgysc8=; b=fU/+tdh/RxQ9++TEsEUjK7wohmMDm/xu1Ono9Qwhxx+UCJVH/9hTODN6j+mzfNP5wP ItQknQr0cY4Nl2dD6Po02jYNB7U6vC0fwtPT0DdyWop4pcGjh0MB3jxmBXJXSmSjspiv TryvDV/FtnvzWOR7kJesbwXGXV5dcXQ+xUQRJTI+7v8RGF6tUi9AVVIx3WXFfDGExxpy jWv9mG4bRVHOKfvXrw3rSHjfCT0DSTWeaZuYS5piIS1/bRUN8aCMN32VF6N7PnahQhOy ElFezYtYe/oqQDl+XDV6mCA+9MA80AC8jCb9X9CVwNize9ly0NoGX9kpo3Y3h0IsTsmN XiDQ== X-Gm-Message-State: AOAM530CjSRURtrPHkLqAkFzVoQyJHyGUAKBU5p3K3n2eGfB5HIXvNAE URncURk3naGK25pNBfBopIW3Zw== X-Received: by 2002:adf:dc0d:: with SMTP id t13mr98023wri.158.1634911370204; Fri, 22 Oct 2021 07:02:50 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id u10sm4789913wrm.34.2021.10.22.07.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 07:02:49 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org Cc: loic.poulain@linaro.org, benl@squareup.com, daniel.thompson@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH 1/2] wcn36xx: Treat repeated BMPS entry fail as connection loss Date: Fri, 22 Oct 2021 15:04:46 +0100 Message-Id: <20211022140447.2846248-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211022140447.2846248-1-bryan.odonoghue@linaro.org> References: <20211022140447.2846248-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211022_070252_064618_17B5DAC9 X-CRM114-Status: GOOD ( 13.81 ) 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: On an open AP when you pull the plug on the AP, if we are not already in BMPS mode then the firmware will not generate a disconnection event. Instead we need to monitor for failure to enter BMPS and treat a string of failures as connection loss. 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:435 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: , Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org On an open AP when you pull the plug on the AP, if we are not already in BMPS mode then the firmware will not generate a disconnection event. Instead we need to monitor for failure to enter BMPS and treat a string of failures as connection loss. Secure AP connections don't appear to demonstrate this behavior so the work-around is limited to open APs only. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/pmc.c | 9 +++++++++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 ++ 2 files changed, 11 insertions(+) -- 2.33.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/pmc.c b/drivers/net/wireless/ath/wcn36xx/pmc.c index 2d0780fefd477..592a9416e51f9 100644 --- a/drivers/net/wireless/ath/wcn36xx/pmc.c +++ b/drivers/net/wireless/ath/wcn36xx/pmc.c @@ -18,6 +18,8 @@ #include "wcn36xx.h" +#define WCN36XX_BMPS_FAIL_THREHOLD 3 + int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn, struct ieee80211_vif *vif) { @@ -31,6 +33,7 @@ int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn, if (!ret) { wcn36xx_dbg(WCN36XX_DBG_PMC, "Entered BMPS\n"); vif_priv->pw_state = WCN36XX_BMPS; + vif_priv->bmps_fail_ct = 0; vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER; } else { /* @@ -39,6 +42,12 @@ int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn, * received just after auth complete */ wcn36xx_err("Can not enter BMPS!\n"); + + if (vif_priv->bmps_fail_ct++ == WCN36XX_BMPS_FAIL_THREHOLD) { + wcn36xx_err("BMPS fail exceeded connection loss\n"); + ieee80211_connection_loss(vif); + vif_priv->bmps_fail_ct = 0; + } } return ret; } diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 9469feed1475f..871aab7fd4e60 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -151,6 +151,8 @@ struct wcn36xx_vif { } rekey_data; struct list_head sta_list; + + int bmps_fail_ct; }; /** From patchwork Fri Oct 22 14:04:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 516140 Delivered-To: patch@linaro.org Received: by 2002:ac0:bf50:0:0:0:0:0 with SMTP id o16csp1117813imj; Fri, 22 Oct 2021 07:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLXY0sWAAA4/S+JYtUWKzDz20udFw4/PrG884sk91pw/d6S+Je8KLFWAExiyP/m7C/uCcX X-Received: by 2002:a63:a119:: with SMTP id b25mr9556161pgf.358.1634911381072; Fri, 22 Oct 2021 07:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634911381; cv=none; d=google.com; s=arc-20160816; b=aCq+CdRTpiazDD+4votfg0LhmCR7ZSVA7Q6L/jjSQDzUABYUYU/e/eVHwSD6pULJxw kge+kdDiRSjyq216q6weXbyW+gO0hBN8yCVqszxaUx/XYr2SaeLaXcNE1Gd9knAdZewj j2M/9k33sO+gpoxXW9W0u4v6leewUeb8bIfDTTil/5CEerXIFeHNfrDLw3vdzLtugeR0 Z/9zVIjwPBmwFfusLk2Q54isInS+zGqzAoSgmJRtm2jMXw0TIWiezgO9Dwzp4QXug1d9 jUgyWcy5oqtOVki7ClWK8Sl3fihaGnTYx1l+SDyYVPnVD9HMhmD0bAfdb0ysNtX5xM5O 6A6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=4I2iJp5zRqmlD4Zm6XNDCsUC8XzGbS2DYZGfLfhOWPo=; b=Ze8Qb5jxbtIf2mUpRBt1LgdzrPeVpo1EwKyvHd7xy6P8xw30NjVRaEztTyYadsZIq5 6mZhXZ1stl5v/Lbx9e/Lmn5sm3N9MMFZ7whwtw+9wOwA0UdXOYjlkwankU4cihHcRyhp H7Maz16roFDocpht4C5j6GMKisQGW2XaDTLngS0+Q/oTeQ+oWZA8/cCCxph94wJvVEls bWYwZdzb1T0rHrGHyNx+df3zt4ONKlR2ZBW5OyBCPN9cFKHoQFK5fHV8gNPUwvstGUQ0 mem/oFoy3xGV7P5haTnC8644/9PM5GezjMtBd29+ja+9hHfL2GS53rlTehs++e32BayQ 7UPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=EWE0ylFO; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fLir7Dqk; 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 f31si13315862pgf.371.2021.10.22.07.03.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 07:03:01 -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=EWE0ylFO; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fLir7Dqk; 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=4I2iJp5zRqmlD4Zm6XNDCsUC8XzGbS2DYZGfLfhOWPo=; b=EWE0ylFOPCYvbo 1c7Ph5MvWdzKrtwg5BCFgxUPtnw/jDdHofk1tMJCm0UpUZ+R2aaYxVmIf5TwSJZSmzigQ+0RytXDt CCdj31Lgcad9XmQAJARYgyn0+8/aRfmRlcqYLtMpt4XifZZegngF7c+4DtmOwUeVA6V0I6RcqE7va rq8KC6x8bU7VfO9FvN3tZ/w29iawNS7H70kr5pyGJU83Nb282qsfse32JybacKyUWbzCsVKylOpkx NQ9A/wlDaZ0nchk6Qtt7KZsck288kyBmDNkaj17kqNqwqT/hGHoJ1+CE1rRHteYdMsVaV2aqtuFD0 PtHdvbgfnq3IwyOk7OwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdv8N-00BBFh-Q8; Fri, 22 Oct 2021 14:02:59 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdv8L-00BBEw-Vz for wcn36xx@lists.infradead.org; Fri, 22 Oct 2021 14:02:59 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 62-20020a1c0241000000b0032ca21cffeeso1427084wmc.1 for ; Fri, 22 Oct 2021 07:02:57 -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 :mime-version:content-transfer-encoding; bh=T4Nk3Hb1HsyhZPRogPEUdNfaLZGUChQQzivfooHsEkM=; b=fLir7Dqk6fgYma37ewRvTVRxn6IZc1RrbPajMnaSA0kE5BeD+XRNoVolBNruhQE7vm EpmhKcMoOLMh/fjc7wnyX/ZRTgxOtCLKB3FNtvJAM/MJV52fmf/xCl6KTUz4glzkt7v5 jGJmhpH+beeMHGTQjQNEQ9iSxsaM/LaOsRhaFVMTdDRbdXcdCsAyC2bqtR4BX98yFQ6g y8NyvC9flihxVz7yzq78MQzTqx3csoHIFfaWs4Ub6ZSBcIXrMX5XxFU+iOTmNNiGQx+c mRH/PC3paMGbg0Zx7gbCGOSW7rk3HuLTxPMFKgkVbZACT6GqtALv6/RNyePCDjyUT0tZ RA4Q== 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:mime-version:content-transfer-encoding; bh=T4Nk3Hb1HsyhZPRogPEUdNfaLZGUChQQzivfooHsEkM=; b=jpRQeEFFLvmq9OBvoo54MNKBu64sfa9LIGyGrKcXhsq+oRPh2zQPUaefhv4/AicApL mEYfzMugZB0X2FrZKU08kdoQR6uXr5wFMs5U7Cirxm3/TedpkbjLZ0kF6INA5shwpj7N 513E/plsDZKq8vaMKaAgTEGK5W95mL5c8cvHMrkOWnsXd2TerqCTr1+OH4sJ3GT4j4JC F1WIHJDNksU5HtNJ/ej90EyBPM3MZ1cSkYRYkCBs7rv5B0J3xjC2e3+BVP5eZrf+b6wu RPKgXWExQKJ2wVjNq39Ud5Fzh3p5g5mjAD3Z6IDOyExyXyxE2ut6oz9qBi8xaP9cC3uy EolQ== X-Gm-Message-State: AOAM531OTJzLOZCtkw5fHT/FfuqrDtaUDzDQLk4lLcyirovJuM06k/xM YG/X6zHvE/f4+R8VAZMup0BElg== X-Received: by 2002:a05:600c:3b99:: with SMTP id n25mr86934wms.50.1634911371435; Fri, 22 Oct 2021 07:02:51 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id u10sm4789913wrm.34.2021.10.22.07.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 07:02:50 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org Cc: loic.poulain@linaro.org, benl@squareup.com, daniel.thompson@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH 2/2] Revert "wcn36xx: Disable bmps when encryption is disabled" Date: Fri, 22 Oct 2021 15:04:47 +0100 Message-Id: <20211022140447.2846248-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211022140447.2846248-1-bryan.odonoghue@linaro.org> References: <20211022140447.2846248-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211022_070258_053552_2EBD31A2 X-CRM114-Status: GOOD ( 16.00 ) 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: This reverts commit c6522a5076e1a65877c51cfee313a74ef61cabf8. Testing on tip-of-tree shows that this is working now. Revert this and re-enable BMPS for Open APs. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 10 drivers/net/wireless/ath/wcn36xx/pmc.c | 5 +---- drivers/net/wireless/ath/wcn36 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32d listed in] [list.dnswl.org] -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: , Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This reverts commit c6522a5076e1a65877c51cfee313a74ef61cabf8. Testing on tip-of-tree shows that this is working now. Revert this and re-enable BMPS for Open APs. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 10 ---------- drivers/net/wireless/ath/wcn36xx/pmc.c | 5 +---- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 - 3 files changed, 1 insertion(+), 15 deletions(-) -- 2.33.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index fbfa9947c4a5b..ad75e6faa3bae 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -630,15 +630,6 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, } } } - /* FIXME: Only enable bmps support when encryption is enabled. - * For any reasons, when connected to open/no-security BSS, - * the wcn36xx controller in bmps mode does not forward - * 'wake-up' beacons despite AP sends DTIM with station AID. - * It could be due to a firmware issue or to the way driver - * configure the station. - */ - if (vif->type == NL80211_IFTYPE_STATION) - vif_priv->allow_bmps = true; break; case DISABLE_KEY: if (!(IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) { @@ -966,7 +957,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw, vif->addr, bss_conf->aid); vif_priv->sta_assoc = false; - vif_priv->allow_bmps = false; wcn36xx_smd_set_link_st(wcn, bss_conf->bssid, vif->addr, diff --git a/drivers/net/wireless/ath/wcn36xx/pmc.c b/drivers/net/wireless/ath/wcn36xx/pmc.c index 592a9416e51f9..d8119241b2fe8 100644 --- a/drivers/net/wireless/ath/wcn36xx/pmc.c +++ b/drivers/net/wireless/ath/wcn36xx/pmc.c @@ -25,10 +25,7 @@ int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn, { int ret = 0; struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); - - if (!vif_priv->allow_bmps) - return -ENOTSUPP; - + /* TODO: Make sure the TX chain clean */ ret = wcn36xx_smd_enter_bmps(wcn, vif); if (!ret) { wcn36xx_dbg(WCN36XX_DBG_PMC, "Entered BMPS\n"); diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 871aab7fd4e60..8111488fed7bf 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -128,7 +128,6 @@ struct wcn36xx_vif { enum wcn36xx_hal_bss_type bss_type; /* Power management */ - bool allow_bmps; enum wcn36xx_power_state pw_state; u8 bss_index;