From patchwork Thu Jun 18 09:17:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 191094 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1225804ilo; Thu, 18 Jun 2020 02:12:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtroXo97fqKcBb/nBAd4RSqr5h/5TsKovd/7fpQV+WNM8tAdEqMnCTVQKxGCtpCLVuEpBe X-Received: by 2002:a50:e387:: with SMTP id b7mr3040844edm.190.1592471572571; Thu, 18 Jun 2020 02:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592471572; cv=none; d=google.com; s=arc-20160816; b=Z8HgiCYVvX0yJBayrPMujPAcL3fWjlForQBDIqnB8qt8fTwxUTtmnnyPZHSUuAZ3Rb Kk0I8cylE/zzrQx2DiTF3RN0XWNgYKv7l1YtOREgUbfVPRLaIgJxKC8RZ9fJqg0Nm+fj xIjdaX7YBfhYIXTBusb4Ba+KH3oTPSpm3dP4gish6TvvG/3TUgI/cVTKRaFl+QeAsCcW eJg8sft+qWlh/gkTLbVWkvap9u+5S0zdoMiFvRMK7HPnbr0uPboNQyH9oQP2XLzaAII5 CUz2NDXHwsMuZ8D5uuVmeK36JrokGpfko2g+0x64bEVtsNX2J5C6INg5SP/eq2hZhBRQ Heqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=htZbEn2KdpU7eJSh8yuTo6kkxCsr60rcFS9ASpUroDc=; b=GCLX2lPd9p02Eb+q24FcgqrwxzwteMIuJj7nFINlgPtTmCIZlTU2bZ2IT/poUN4ilX rpWs7ytBLyrkvRwm/l0YazSEpqrLPjDMYt2JZ6VAQ8MRGq0RMTa3S2fI2QhStQ+3jK+Z O/0Z2xJRIEQT2+W0i9GMWyIMuHnyfqEanI7t0HfG7C6JKfA8iKfTJ/F7rWbNML1r044U cMDAu+QcGaY3IsPft13BJUSKUbegyLFryLUacfdUnq/cjrs26o0ehJ7GEoQE9jSuEhSU XxOScmSz8JfvLulJVWQwwX6u4FpsSP8JGP6n77PnYFhHG1hmI3mfaf5ZoKnMgJd+xtCw NecQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oAPKBxcE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si1558089ejf.208.2020.06.18.02.12.52; Thu, 18 Jun 2020 02:12:52 -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; dkim=pass header.i=@linaro.org header.s=google header.b=oAPKBxcE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728973AbgFRJMv (ORCPT + 2 others); Thu, 18 Jun 2020 05:12:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728937AbgFRJMu (ORCPT ); Thu, 18 Jun 2020 05:12:50 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB969C06174E for ; Thu, 18 Jun 2020 02:12:49 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id c3so5195598wru.12 for ; Thu, 18 Jun 2020 02:12:49 -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; bh=htZbEn2KdpU7eJSh8yuTo6kkxCsr60rcFS9ASpUroDc=; b=oAPKBxcEr26oMMyckNnQUIwAZx87dkFiPrebVQtN2jI08/jwvOran7V7Q6WG+GqJ2S V3I+Rzemd9LQtEkm9ajEpGumfW+RRnhaNCyO2KgDirPg8eq/SUcYoVpNWwvXFZvfLt9C e/YAe4+NJL7oDiJVWwMmgBYEOhyISHd3GAzgsYml1nSSKkiY1JE5pC5JVEiWkKkPhJHn Pgeiqo1vA1g4pV1o1jdwXBegy+RmqGZbpSwTcPahoOCZzXwm38/y0Yk+pj9sDpfL1pzW +miIxAaIcwWJRlJGuMuYHNAxxdT4pNus6O6KENrKqnra1Ap6YM8P31Nt1kucwPCQP3IH 4Jig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=htZbEn2KdpU7eJSh8yuTo6kkxCsr60rcFS9ASpUroDc=; b=ctDMtEXZbkcUeMglB61qIAQAjzsHU2ZLYyuCkgbO8zXpP9ux6wf0Re9+fuUVvfU3YE 88lyjDaCLEHjP15SUTO8kJ/udcw/GDeFZ0zaVwJdYzhrPLui7/IA1okmg2iene89s2Ke 0+et0bBhnAOyrEu3+G+r3rwm79pwK4LILAA5XNqwTbVn/g9+G0wkz3lZhkXU9pe39OCm Yu4w5Z+8FkXPrIlbA0nobl0aIHnq3bhAeQamuo41IeFBTzMbEGnY1i9sFCqgIn/gRn6x 5m++CJGthug8Ku3IWM0wRSujjJ5534Wm84293oTLMhbw2jWcld+L509YgAGCtcRmEjYf NUyw== X-Gm-Message-State: AOAM531bw0/8cTiYme+SZlxGOADgpUDdJCDpcdNhH/avNyg68tQ8nO+c 5b9n3UMJQS/nzpaOrlMktPPXGQ== X-Received: by 2002:adf:80e6:: with SMTP id 93mr3407450wrl.17.1592471568684; Thu, 18 Jun 2020 02:12:48 -0700 (PDT) Received: from localhost.localdomain ([88.122.66.28]) by smtp.gmail.com with ESMTPSA id x13sm2733702wre.83.2020.06.18.02.12.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2020 02:12:48 -0700 (PDT) From: Loic Poulain To: kvalo@codeaurora.org, johannes@sipsolutions.net Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, Loic Poulain Subject: [PATCH 1/2] mac80211: Do not report beacon loss if beacon filtering enabled Date: Thu, 18 Jun 2020 11:17:42 +0200 Message-Id: <1592471863-31402-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org mac80211.h says: Beacon filter support is advertised with the IEEE80211_VIF_BEACON_FILTER interface capability. The driver needs to enable beacon filter support whenever power save is enabled, that is IEEE80211_CONF_PS is set. When power save is enabled, the stack will not check for beacon loss and the driver needs to notify about loss of beacons with ieee80211_beacon_loss(). Some controllers may want to dynamically enable the beacon filter capabilities on power save entry (CONF_PS) and disable it on exit. This is the case for the wcn36xx driver which only supports beacon filtering in PS mode (no CONNECTION_MONITOR support). When the mac80211 beacon monitor timer expires, the beacon filter flag must be checked again in case it as been changed in between (e.g. vif moved to PS mode). Signed-off-by: Loic Poulain --- net/mac80211/mlme.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 16d75da..1f7dfaa 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4494,6 +4494,9 @@ static void ieee80211_sta_bcn_mon_timer(struct timer_list *t) if (sdata->vif.csa_active && !ifmgd->csa_waiting_bcn) return; + if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER) + return; + sdata->u.mgd.connection_loss = false; ieee80211_queue_work(&sdata->local->hw, &sdata->u.mgd.beacon_connection_loss_work); From patchwork Thu Jun 18 09:17:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 191095 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1225935ilo; Thu, 18 Jun 2020 02:13:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZIA9tvUHHrt+xPe63DCYBxnheodZ7rC7k0dClW8SHkaSCoC+Q50AJ9EneyeeqX4ylmtuo X-Received: by 2002:a17:90a:8c4:: with SMTP id 4mr3625323pjn.64.1592471585962; Thu, 18 Jun 2020 02:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592471585; cv=none; d=google.com; s=arc-20160816; b=tZ9rpYey2U57FdYagA9+u3fFABB7UsbKkDeHj7EFtnKZx5BiJYU1PJ0lNA29vu7Kj4 +PS4PGMhsP6rFJ957ZiSu4kOJ59akDcSOCkaZv/NqwIVK3DxENLpDovGBsHKxrnfgpga vHuEXOwnSgJFrDT/1twsMWdc5yLjHQ3KdhDZpgZ2l+bqAnvrlZDSfguNpYdGgXg6nll9 oMccnYR7URaN61akahO7nZiK018Gt75ZkOJzXMyMC0f/dAo3/pj5omYpvP0HB4Oxfkx3 VOoqAJ9iOujTCNU9agqNGd2AjVGLUNer+ZVP12IgGFIk3nwR5Mrfkn/VRg5mYO60rQjh /1WA== 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:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-signature; bh=Ts6XPtDBvWhqXSjvS9p//JGNO57axnGHBUIHjHbxqUs=; b=oIt2MOFOvD+H0pvtJOQqcsJ4rkmUUo03TFsIWVJh/Px1mg4NAPuogdYyj/QJldVaUy lBASR2GWdAaM1d6CYbb6jHRDQs+Bd7cIgeROZPumrJBWuxIuSOIjdobpOjPM78PhfZuT vhkVqKS0ZN1Jxkbo16XaXNLY4JMuWK8nSjC3K4/6Z3QimbXKWcusHibpKPm6pVv3KXWI txXs2BvaimrromRisKqS3iGdFPAyYK5YqCj6adXA+sUINcSL9RgFsYuBtg20I7m7rveV zpjmOxEFOUfVByApdws0zLOtT08AoQVJ86S0wofOF8veeixLgRnSuHi/kz+SkwIDOkgm 7U9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=Jtyh3Eed; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="M/SSWMvz"; 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 k3si1611247pld.238.2020.06.18.02.13.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 02:13:05 -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.20170209 header.b=Jtyh3Eed; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="M/SSWMvz"; 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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Ts6XPtDBvWhqXSjvS9p//JGNO57axnGHBUIHjHbxqUs=; b=Jtyh3EedZbw2LMof+w9RxL5+OJ 7KqJFc7TPfEVPz0QGIv7Xbg1bYKqPu8LiUiau5ygJ50w+k5RL+WyiIy3sI802fv9RVq7UAUcF/hpj QaFG9VadEu6LWvjdQd6pbbpX5lgR1REGQFHzfz3nCupDjvYNH/ss4pFr5VUTN0KHOdh+Vq2+8tvnC pGZz5+eCDaEfW5sLpnjczWgfm9TJjuLuoi6aU51GqnnB56mvIsKrZAH507RNl74BNuerUaRYU93xT K8xkcupzP9Zpwii5LV3O6G0y1KvWsmVify2Mt0F4i52xyeU3va65SfJ+UcZS66OPX+NitOt8hNia0 cPFrJHZA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlqbY-0003K9-5i; Thu, 18 Jun 2020 09:13:04 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlqbW-0003Jk-ET for wcn36xx@lists.infradead.org; Thu, 18 Jun 2020 09:13:03 +0000 Received: by mail-wr1-x444.google.com with SMTP id h5so5251224wrc.7 for ; Thu, 18 Jun 2020 02:13:02 -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=IH8CfyxttC28VAndSUFTqHOfJWsh3TDg2r/982MjPtE=; b=M/SSWMvzhacEPnlAUL0J/MgFgf4bs58IQIirCpnww4e83eHkhaxmplPf1Onu6wRErV nbCSVasensBXBY7ZU1Som9WIIppLlVhWbNYn6pIqToUnN/+qhIngmseNnPCc8t8nhrB8 NCtQZDdTcAbCyvBGs5cSJFVmME17KrwOBdRh3zK2z3SQK1eeFjOC8LfsAa9l85sa0bGx RNzZfczORrInjKQ6lvn/D5q3ZWOhxCKwEYA/fAwHMb/pdS4hJpQjRJL9sgMhFLOXwjXV H2DT94HTXYMllizQsx0dMApf7O6U0iY+6FnH+YetD6GLcn+fG2koQyLbLX2saRS23GDk K8dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IH8CfyxttC28VAndSUFTqHOfJWsh3TDg2r/982MjPtE=; b=Wb7PBbPuf3IsJdtSbO/LAHSmCXJqmA+Z8hc5EbexPwUMqKRoF/Ed4trSiUpjj7jH8r PFyS1QOkgWAuByYi4J2nSV9yOlXEJcPieD9AiiXVdNVLlLEomXINapMmfFvbpsS1YSAn upfBIohMN/mKtwQdg15Vt8J4Z0fZHwDfCCbbJmAJkUQhY//pFPmEHTmiJC/rv7jw9HN0 2HGWIdhX4NUAqkm+Mw0oYDOvEh08bTglWLs3vttQWnu7uTYtysceXOnf9ONp12oE1urO 3hYUDypfDYR7mY7bBLjnqhu57D6apt1/fgmfojEXV4LQib9j0cFZThS9etlWbDAWeWtT 5Egg== X-Gm-Message-State: AOAM532ylk/LGytvUfXpTo4H54SG/JVV+9DPsX7wvVymt+Nz4AoAWRv+ dFalyZ4wWS0fdzZ5G8XsG7BoIkX4/2eWVA== X-Received: by 2002:a5d:6b86:: with SMTP id n6mr3431039wrx.167.1592471581186; Thu, 18 Jun 2020 02:13:01 -0700 (PDT) Received: from localhost.localdomain ([88.122.66.28]) by smtp.gmail.com with ESMTPSA id x13sm2733702wre.83.2020.06.18.02.13.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2020 02:13:00 -0700 (PDT) From: Loic Poulain To: kvalo@codeaurora.org, johannes@sipsolutions.net Subject: [PATCH 2/2] wcn36xx: Advertise beacon filtering support in bmps Date: Thu, 18 Jun 2020 11:17:43 +0200 Message-Id: <1592471863-31402-2-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592471863-31402-1-git-send-email-loic.poulain@linaro.org> References: <1592471863-31402-1-git-send-email-loic.poulain@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200618_021302_479552_6F2A1F8C X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) 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:444 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_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wcn36xx@lists.infradead.org, Loic Poulain , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org In bmps mode, beacons are filtered, and firmware is in charge of monitoring the beacons and report changes or loss. mac80211 must be advertised about such change to prevent it's internal timer based beacon monitor to report beacon loss. Fix that by setting/clearing the IEEE80211_VIF_BEACON_FILTER vif flag on bmps entry/exit. Signed-off-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/pmc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 _______________________________________________ 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 1976b80..2936aaf 100644 --- a/drivers/net/wireless/ath/wcn36xx/pmc.c +++ b/drivers/net/wireless/ath/wcn36xx/pmc.c @@ -28,6 +28,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->driver_flags |= IEEE80211_VIF_BEACON_FILTER; } else { /* * One of the reasons why HW will not enter BMPS is because @@ -52,6 +53,7 @@ int wcn36xx_pmc_exit_bmps_state(struct wcn36xx *wcn, } wcn36xx_smd_exit_bmps(wcn, vif); vif_priv->pw_state = WCN36XX_FULL_POWER; + vif->driver_flags &= ~IEEE80211_VIF_BEACON_FILTER; return 0; }