From patchwork Mon Dec 28 16:28:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352754 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027796ejs; Mon, 28 Dec 2020 08:27:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJydXm6LlxZWlmacrukrP20DuY59CAtx1a5S9mrpMKoX49t88RS+/XYNXlE04hH2ohyM5PHI X-Received: by 2002:a92:6d12:: with SMTP id i18mr44897690ilc.48.1609172862739; Mon, 28 Dec 2020 08:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172862; cv=none; d=google.com; s=arc-20160816; b=dky+GiKph4AFp0R0gP3NTxYZnNSiisVlYjtogB0IdGSxnwNoXZoCXoNitFNPKXfOJB hO3QrzhunkcCxHXmjV/AJ3O8wZ4QdgmwKe8tcQlqoIPIIJNzOsO8qTnlMVTB9j5TbFXb TdON0pnx/vtZhXPb/B8uUFkUCGfcED1yG3JkKc79JbVTkJPCbmH9P/0Ao2HCbkyUQ3NI OpXa7ZDiQa1wzeb97rg04sO3u79lTnIrISuSrAroyGl8G6PIhekV9fnOAN9zDTV/jjh+ XVpvxqT6G6rYst3OkXzcregIaOjQ37jcF3VhHXmvnuWGhMzE7PL4bfw7yulRaCgu0ARM 8qlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=Z4O9CyDi1Ci+XLipXIM+elR8KtUS4hFEljeGaQym9Nw=; b=Ghe41PlEpuqsOrpRONJrBYoueUtNFvOAXHdRLAKNPbi2znamiEttkFx5ALRRXev435 7tedQ5Ij6cRJLH8lu9DhxdP4GdER2LtlmmRzJPxqkjtqt4Ne2FqztbBy875pBcpBKhn+ S5rDFPWrmtU4G+pJap6jcrXmtH7lEuL+UBnXAcOzi0Bf35YIHtsbpfH5RwoOfjk6I6PI Pm29fc8y8Vc9kpEQRnzO198UOneJze55ILjsPk3dZSMuA3P6/vO5t/OfNBz/BvJgj0Bv 3d0T7fVFvl0LEcFcFnLZ7L2ypov3GMJJt9ed/HNFRlHhAlpCpfsCg9akCKwNF5/zov18 efWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=rgQl9OQZ; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ohwfsIY9; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id l16si28288080jaj.31.2020.12.28.08.27.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=rgQl9OQZ; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ohwfsIY9; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=Z4O9CyDi1Ci+XLipXIM+elR8KtUS4hFEljeGaQym9Nw=; b=rgQl9OQZz0edadWobWnU0JvYb y2QbgKBVX+RsdBDdZLQPL9n/RhroyJ/2JRrxu3OU5LkUYATkgqWBZQSXIUpPZTDK45gK8NrWMgNIc o7QBP6ipN2/4+mLs2n/n8DtNbCCv47vC//op6CXTD5hszlaR1hzcbvq52yEkpS8kHs39KsXlRjnyb uzFAG+eUpBHYnK8ntPvvOytqgGHmFqCC49JBVk5f7oLzVHo5Rg2HdpgFos5XfVHhj8rwaGgAi4FJz U0rPJzGhwU/6FbH/ThBpIE3nxkeHEBLbM0rFCjj0tDX5g/YQJ7aEj+BaOKhMWhlaM0C5K4aKX6jGk uPn1eJXAQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMv-0004Wy-GF; Mon, 28 Dec 2020 16:27:37 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMs-0004UG-4x for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:35 +0000 Received: by mail-wr1-x430.google.com with SMTP id r7so11757553wrc.5 for ; Mon, 28 Dec 2020 08:27:31 -0800 (PST) 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=61/IO/ybk77sJ5G1Q4pxAhHWdP2licw/COCpz/eNPLI=; b=ohwfsIY91vM7KCpWo6qaIHvnnIEVW3ex02xQKCE0YWnD2g0f4y4fUHm3Ju3H/T2h7i PD7oGMW+5AHto7R1zbs0rGu3oV3P+f/Gn/RdCocp9jHIn/5OZik2dD6/0S6kC1ha7wHp k2951AzIgZs3f5+QdOH1wgKQsLXb+wWdwIV61arjejbVWnNJgBN2x73sFbCa9lbE8Ihu Z5CPXc3P9aQwZTu5+W5CE2xZ0e/FzaBUM+p8bx6vU/Gj1sAu4ljdElFCm+qkp6P9MqBi 00vy7szTobHGI4ZLvsFrabclDQjqc0tYpM6lPfuL07i62sWZ1OAvOFUByRxMVG4Q1qjK SvCA== 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:mime-version:content-transfer-encoding; bh=61/IO/ybk77sJ5G1Q4pxAhHWdP2licw/COCpz/eNPLI=; b=NOeaEjCeu6a6tCJFMwh8sLpkmlMAguaxxXqtmC0+Rgf7IBvnaCJuKf9xLEadw70Dhf 6vmV5dTVlFzKOAt3TbKsUIJYusXB/nZUf1E5IjfUWGntJJUuTQl2m0FNWbKE7lCq5s4h K96VakrUQleIq9l8dmKkjjdkiLgLapn5L36Vu+LJhUhiURz2GHJZ/gYnUBGt+kenIBpF fXvK5SeUPUqBaHRK35EjV8NpOh/0XYauDFqIh9v+MCREYosz+8+WitXACETgri+wjkib O2P41tnm6P13BZNlH8vARGW4wMHhNffMLPNVyYvO20aHBa2K0LpT32pqn7dXHidKvQzr AQqQ== X-Gm-Message-State: AOAM531fFNDPUTmR18yUoRt+NSBz/RKGI9N4HwW46kSIPjAycdYFIVbI /1nlaGNnI2JOB59HccrjwR5wzQ== X-Received: by 2002:a5d:660b:: with SMTP id n11mr51861229wru.407.1609172851213; Mon, 28 Dec 2020 08:27:31 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:30 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 01/13] wcn36xx: Return result of set_power_params in suspend Date: Mon, 28 Dec 2020 16:28:27 +0000 Message-Id: <20201228162839.369156-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112734_217637_38FD72D7 X-CRM114-Status: GOOD ( 12.04 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:430 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org wcn36xx_smd_set_power_params() can return an error. For the purposes of entering into suspend we need the suspend() function to trap and report errors up the stack. First step in this process is reporting the existing result code for wcn36xx_smd_set_power_params(). Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.29.2 _______________________________________________ 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 5867bd9c2f64..a863a90232c9 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1091,12 +1091,14 @@ static int wcn36xx_sta_remove(struct ieee80211_hw *hw, static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) { struct wcn36xx *wcn = hw->priv; + int ret; wcn36xx_dbg(WCN36XX_DBG_MAC, "mac suspend\n"); flush_workqueue(wcn->hal_ind_wq); - wcn36xx_smd_set_power_params(wcn, true); - return 0; + ret = wcn36xx_smd_set_power_params(wcn, true); + + return ret; } static int wcn36xx_resume(struct ieee80211_hw *hw) From patchwork Mon Dec 28 16:28:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352756 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027813ejs; Mon, 28 Dec 2020 08:27:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzu3x2WpdiS8ekd5Iirst5rRuTiDcAH4E5C4gEK8FAeZDWbtMPRdwyjbKreh3+cBt1pTgCH X-Received: by 2002:a02:5e81:: with SMTP id h123mr39246472jab.36.1609172863631; Mon, 28 Dec 2020 08:27:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172863; cv=none; d=google.com; s=arc-20160816; b=Bx0zxRfKiL4oYd/BWUbNcAilpKxKu9lYy3XoURtazE5o8pvrkKNLncXDoNRkUsHXE0 RTdrmnDX7kRhRgG4Ac24Dj57CcBbqK+D7tjlIg6Rptm5uEkszgBJj5f6uLFiuDKB7lNB yybDkmKIZmvBLxBorsm1nWZ2NPO6vGzBwR2nDKZSbhFyZMpvP+KJZT/9Bm20wtBSUeA1 eXAm7mUc/JkIZZp8zLWTL7Jo9C55J4ZmS4OUASlltpeW9+OXh+HwWElewFIm79viCR7v 4ko4gwBi19gpKkmvHrXCyP2RAVHmxk882gGFQBBh9TfjHFOjquXB3gTP9fmm6N7AVgpu BqSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=qCQ5t7RSx/3/DA1PowlYXau7XMqq7ZvuWoshx65lql0=; b=RF2fBhiB+/vg2F9odgBSHxklw5dk69ujU3ytimyKVSwCDaEbWI16Hz7HEpy9nDcWjG GbVYk9lGHi6ISYID4pSBJmK4s2AmWNYjHHVeGHMJIVYyZCd4MI6+lIysUD8rtWxTE6VG OMJvo+Lo2pBZZi3ZwdGOQKPF7KIC7QgXd8CXT8xHiQCoKNF18sTswacHCc2GvCApqIlQ GFFjEj0tM1/TGe2CGhqwWbBnC9kYJg2dM1A71FH4JnNttRRik15sh/w6fIYvgQnqL6mg Qy5yC5tBZNrMQqHaeLtigdr/+U9Xwwab6pb6QGWqDaw5MLfGZQB+RRFjBXknAUeVQlPD e+rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=MVCOq2SM; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gMjL3dHh; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id l4si27156991ilg.22.2020.12.28.08.27.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=MVCOq2SM; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gMjL3dHh; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=qCQ5t7RSx/3/DA1PowlYXau7XMqq7ZvuWoshx65lql0=; b=MVCOq2SMzk2bHBsC5QnyZFHrL nazTxdGJ9K4GRuHNm8tvm50YYmdHeLmgO9li8GaZQqCpxxCq4i1iPdWSlI1bKbU10VIunOWbMmU4U GG5JwqVQwJSNknStGRBMxViEf9VYYUGMbN0lSqtSIJDD3Q69rAmiwIE/ci9zvn07QKwfH8c7nCR7u xZzs7wyYXHkALUQVoWYrWXYseMM/66QbcNv+GyQkCfbngKsewvtxdbvHVwyVmIkEXUNAXSmqBwpDH HENcO5QBafI2gVUF1cS53f5RoWzDytcV1Py0Kx+u+QqXH5AzFooxWAwifV5NwvlfaAMwrnsn9gqZa 2T0YbJg7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMt-0004Ve-Pr; Mon, 28 Dec 2020 16:27:35 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMr-0004UH-Lq for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:34 +0000 Received: by mail-wr1-x434.google.com with SMTP id t30so11797290wrb.0 for ; Mon, 28 Dec 2020 08:27:33 -0800 (PST) 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=b09nwm7NaeS1J9x71TcNl2allAdNLCiHKyq9pTgIlF8=; b=gMjL3dHhsy2tfSfXubl1Td3kE3jdr+nWcP/IaMuZUtClF/usQU9BEY4wiqWeG/Ip36 sYe+UCnI6Lgbgn4KT2APFWFdAlXD1kRSDlzn8yDEK2Zup5+Ntuvy8jXG1M5K9X8H8MIz ZXhFT1Tk+FfJLbNS/FHsT3Yz45uWXLsPGybv++12wxhooX5lZdY+DcHoEyYqb/4N9YRz Al/Z56dPnS+8jgu9VpZiY6JxiwRTsiujTplUO9jBR6uTdwUJtNAueGpRwkv/IUOGToYh QvogNviebwyhN6q38sWAJFAKw7kzb4teoOCUoj1X06k8WSvnUQbcPoCPjPNxDdH+/3ir Iipw== 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:mime-version:content-transfer-encoding; bh=b09nwm7NaeS1J9x71TcNl2allAdNLCiHKyq9pTgIlF8=; b=cZcHLmdirikEVh+gzazmGA+16PCIsMC2e36SfKp6wE1VQDtOuEM1XXRytJYgAw7MXR /ThMm41cTkt6Pw/TeINmaJFprMfUVapL+qhAGO259FrYcWkAy33T9URp7ozkrs3kLeGu Lzi06D5Zdm2cXJ3GZOESHg2TnS6VeiEXSaW5KBk0aqZZNAlveOeEBtv+LL0e0peN764H IknnWxRq8/WnqSX2Sbqktelu7BDVlTU2a9KSzU4mvKWBXe9DIE91ambSOxIpZWq5A2a2 Sq3be3ba/TxiS/5xb/XET2pcXCak9KhKLGxUZgBaCFh60u4NXl8WFthwTDBz3QPyB1np DZRA== X-Gm-Message-State: AOAM533uVlHem5PZVj7fgIfX6rUr5XeCflJpJm6Scd5vGv8f/HrtYQNq vA5CIsyscsR63GmFoOaVOy8bYw== X-Received: by 2002:a5d:4641:: with SMTP id j1mr52201878wrs.94.1609172852271; Mon, 28 Dec 2020 08:27:32 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:31 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 02/13] wcn36xx: Run suspend for the first ieee80211_vif Date: Mon, 28 Dec 2020 16:28:28 +0000 Message-Id: <20201228162839.369156-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112733_767804_9188AD38 X-CRM114-Status: GOOD ( 13.21 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:434 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org A subsequent set of patches will extend out suspend/resume support in this driver, we cannot set the firmware up for multiple ipv4/ipv6 addresses and as such we can't iterate through a list of ieee80211_vif. This patch constrains the interaction with the firmware to the first ieee80211_vif on the suspend/resume/wowlan path. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 43 +++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) -- 2.29.2 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx Reported-by: kernel test robot diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index a863a90232c9..b90664bdf6ee 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1088,15 +1088,39 @@ static int wcn36xx_sta_remove(struct ieee80211_hw *hw, #ifdef CONFIG_PM +struct ieee80211_vif *wcn36xx_get_first_vif(struct wcn36xx *wcn) +{ + struct wcn36xx_vif *tmp; + struct ieee80211_vif *vif = NULL; + + list_for_each_entry(tmp, &wcn->vif_list, list) { + vif = wcn36xx_priv_to_vif(tmp); + if (vif) + break; + } + return vif; +} + static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) { struct wcn36xx *wcn = hw->priv; - int ret; + struct ieee80211_vif *vif = NULL; + struct wcn36xx_vif *vif_priv = NULL; + int ret = 0; wcn36xx_dbg(WCN36XX_DBG_MAC, "mac suspend\n"); flush_workqueue(wcn->hal_ind_wq); - ret = wcn36xx_smd_set_power_params(wcn, true); + mutex_lock(&wcn->conf_mutex); + vif = wcn36xx_get_first_vif(wcn); + if (vif) { + vif_priv = wcn36xx_vif_to_priv(vif); + if (!vif_priv->sta_assoc) + goto out; + ret = wcn36xx_smd_set_power_params(wcn, true); + } +out: + mutex_unlock(&wcn->conf_mutex); return ret; } @@ -1104,11 +1128,24 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) static int wcn36xx_resume(struct ieee80211_hw *hw) { struct wcn36xx *wcn = hw->priv; + struct ieee80211_vif *vif = NULL; + struct wcn36xx_vif *vif_priv = NULL; wcn36xx_dbg(WCN36XX_DBG_MAC, "mac resume\n"); flush_workqueue(wcn->hal_ind_wq); - wcn36xx_smd_set_power_params(wcn, false); + mutex_lock(&wcn->conf_mutex); + vif = wcn36xx_get_first_vif(wcn); + if (vif) { + vif_priv = wcn36xx_vif_to_priv(vif); + if (!vif_priv->sta_assoc) + goto out; + + wcn36xx_smd_set_power_params(wcn, false); + } +out: + mutex_unlock(&wcn->conf_mutex); + return 0; } From patchwork Mon Dec 28 16:28:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352753 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027784ejs; Mon, 28 Dec 2020 08:27:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwycWnUEmEhkyb0B0TWk41SVXgrpt3k6H1fwnyr0DO6KHeRtgaFhVTyVtktg4myKC6OARp4 X-Received: by 2002:a92:d2ce:: with SMTP id w14mr35973580ilg.182.1609172861739; Mon, 28 Dec 2020 08:27:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172861; cv=none; d=google.com; s=arc-20160816; b=Nn+6B7Gb26QSXLzd5zWuw3O2n5R4Q81nJsG1Qdd+c9fZUYfvbfvxvVr2eLnAOGUNXB XBJ1hcyqSmINBZNZGHqwwmaHZyNj3BX0/s7wbFwYNzSbUK6GFObfvanSaB1kWxTvGke4 NVA+lIfo8bFH/K0Bz9VrX0c2MAVFz156GiT05XdHzb7E/mlneCtRve4tTl0E81BeCf+b AE83vyAtXxaHkwThNgGwdt7hoqVeR+3mdNdd46QkmOO1RVdmZ/hjWNSwz6E+1M//6Psg W4eW7Weir4nk02qAzf7Y/OaJEnOqG4aIWUoalzisiQ302+rLhisS+mqLD2DawoHsraVU 1QHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=n7Az0J5jcfbSONfd55br67CG8vitRKN9kH6XIj6vyMU=; b=euiaigfrUHHjO9PhFXGi8vcjCZKauyz6HOioBS5fzCxkIpY4o/oajrqNXWoHQwA+Jp 29DsSQUxThUrvK9y4MBOqtXayTOjnHowWLOrMSw7LyZCKQJ8ppQImK4lcrUaGVbfjOyK /K1Ps8ajopgDJGnG3yr6GrJZzIsYXABTt7QU9JSq+6Nx3QpY5Hhp2vPpV43mAPvwFPsC fK8gcvm6XM1UEeZYTtzef7Mt2D1aN3J6Nr1khHW8Lg5oOrl7YmG+uiAlhhGgSfpc/ePw dEi/215YOEsy8LNgN1hodObQS83CTFaILo7mqh2q26Twj1Hw8/T0sl4YI/40cVd5bcrZ /+Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=oNVM7lhS; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TNcq2zx3; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id d21si30799207jak.116.2020.12.28.08.27.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=oNVM7lhS; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TNcq2zx3; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=n7Az0J5jcfbSONfd55br67CG8vitRKN9kH6XIj6vyMU=; b=oNVM7lhS8DfPCzCzp2QZ4jyCh +dPolD1W+PBUfEQ3xtxktEpDrE686GqoQS2NifmaoW7tQ6aHu2OJKBagLdVKY3kL//XXpEpUlRFiy Q/D7ySqfDeu4NdOWsIgzNpmiHnHc+rdTk1pXNW6nj1nuT997Eh0lSDyLqBdhMn45pg5pk6erZK7tF CexXDKvgcrFxDlN6Betcv2810FtIRq6iolcM9eOSiWtkOvQMDkEpnXMBJhSsPe+9FdLGwnCaZuVbS wcXJH1YahS7UStHNBZL2YhBs8CmhBbkHWE0dlg94Isg1bY6ytfTe0epEDVpYb4Nw+RxM4hc40Anam bmbMVUzng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMv-0004XC-SY; Mon, 28 Dec 2020 16:27:37 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMs-0004UN-NT for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:36 +0000 Received: by mail-wr1-x42f.google.com with SMTP id i9so11768473wrc.4 for ; Mon, 28 Dec 2020 08:27:34 -0800 (PST) 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=ltohQzViTXov8BpVEXom7/dF0P1+ZXvRdo3+msQAQjk=; b=TNcq2zx3qOV1ztzjb/fZgvXmN9Yay15r1eWasNdPXf0Gsz2NbNj+WiXlN+qKpkvz4A gyFIz/uM1mjGlhXkEdL5aa2GPbY2gC2ybctZxYxVXj7LMVz7EPvDPJVlOb8N6sDjXSB8 HwAcKjNnqj3A4QL9woyMPy3rS4266mz9Z5ADD01rfvg6yBcANGiqDpqrH9XlGO2dxVGj ia/KG4akeqWRm9Th43EqVJ/Myrk0+QL30isyyojsWEEt7uwctobz8KePxH+9IkjF5g3u HSoGTCI4oDtSZfP1j3wu0i/32QXRURDN4s51n1f/h4PRg/8yulovLR96aeVLY6nneSlg pVgQ== 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:mime-version:content-transfer-encoding; bh=ltohQzViTXov8BpVEXom7/dF0P1+ZXvRdo3+msQAQjk=; b=WSg77MmhagOcMQubE50zc+KJAlan6oK2oFUKfkj1JRpiM7vmi+12Ywg+EqzonxFxrq TVIZRNa6ipGMvNuxuqylm7IM2YRu0QLvv1O3RB508rtpkIAljs4Ujbx+7L3QxMsUJAhc x1vxuntbnVpEPRC3w/RLnD13CvoP36AJr5/oQ3KdtsTfzK3ceGsYZzPIFqL+FWj06cQR OLtWE683oNuD73Xq4v5vaQ5YWSUvAhqlvAXRUAVGUKILcVG3sD5GATBXSUwoQDN6Yq3Y CReB4KOtJPzE4LBTNOY9vUyK3Cm0Drm1mTi9kZPNB9XAak/d9djXSx8khxD49AZyKZPm snVA== X-Gm-Message-State: AOAM531bbUSC8xJO8FKT2h7ffB1dhUgGwq4UiVfCNuF0e9+ErjW3paNA LdL8v1mjGyOGtSOxjZlfNxxFkw== X-Received: by 2002:a5d:4f10:: with SMTP id c16mr50826921wru.398.1609172853329; Mon, 28 Dec 2020 08:27:33 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:32 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 03/13] wcn36xx: Add ipv4 ARP offload support in suspend Date: Mon, 28 Dec 2020 16:28:29 +0000 Message-Id: <20201228162839.369156-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112735_031788_666A8D01 X-CRM114-Status: GOOD ( 15.36 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches 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:42f 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_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit adds ARP offload support. Firmware is capable of responding to ARP requests for a single ipv4 address only. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 10 +++---- drivers/net/wireless/ath/wcn36xx/main.c | 5 +++- drivers/net/wireless/ath/wcn36xx/smd.c | 38 +++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.h | 4 +++ 4 files changed, 51 insertions(+), 6 deletions(-) -- 2.29.2 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 65ef893f2736..b56c8292fa62 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -3465,7 +3465,7 @@ struct wcn36xx_hal_rem_bcn_filter_req { #define WCN36XX_HAL_OFFLOAD_ENABLE 1 #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2 #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \ - (HAL_OFFLOAD_ENABLE|HAL_OFFLOAD_BCAST_FILTER_ENABLE) + (WCN36XX_HAL_OFFLOAD_ENABLE | WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE) struct wcn36xx_hal_ns_offload_params { u8 src_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN]; @@ -3487,10 +3487,10 @@ struct wcn36xx_hal_ns_offload_params { /* slot index for this offload */ u32 slot_index; u8 bss_index; -}; +} __packed; struct wcn36xx_hal_host_offload_req { - u8 offload_Type; + u8 offload_type; /* enable or disable */ u8 enable; @@ -3499,13 +3499,13 @@ struct wcn36xx_hal_host_offload_req { u8 host_ipv4_addr[4]; u8 host_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN]; } u; -}; +} __packed; struct wcn36xx_hal_host_offload_req_msg { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_host_offload_req host_offload_params; struct wcn36xx_hal_ns_offload_params ns_offload_params; -}; +} __packed; /* Packet Types. */ #define WCN36XX_HAL_KEEP_ALIVE_NULL_PKT 1 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index b90664bdf6ee..c463ec7c1568 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1117,11 +1117,13 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) vif_priv = wcn36xx_vif_to_priv(vif); if (!vif_priv->sta_assoc) goto out; + ret = wcn36xx_smd_arp_offload(wcn, vif, true); + if (ret) + goto out; ret = wcn36xx_smd_set_power_params(wcn, true); } out: mutex_unlock(&wcn->conf_mutex); - return ret; } @@ -1142,6 +1144,7 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) goto out; wcn36xx_smd_set_power_params(wcn, false); + wcn36xx_smd_arp_offload(wcn, vif, false); } out: mutex_unlock(&wcn->conf_mutex); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 5445277dd8de..4589c3d26027 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -2757,6 +2757,43 @@ int wcn36xx_smd_set_mc_list(struct wcn36xx *wcn, return ret; } +int wcn36xx_smd_arp_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, + bool enable) +{ + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + struct wcn36xx_hal_host_offload_req_msg msg_body; + int ret; + + mutex_lock(&wcn->hal_mutex); + + INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_OFFLOAD_REQ); + msg_body.host_offload_params.offload_type = + WCN36XX_HAL_IPV4_ARP_REPLY_OFFLOAD; + if (enable) { + msg_body.host_offload_params.enable = + WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE; + memcpy(&msg_body.host_offload_params.u, + &vif->bss_conf.arp_addr_list[0], sizeof(__be32)); + } + msg_body.ns_offload_params.bss_index = vif_priv->bss_index; + + PREPARE_HAL_BUF(wcn->hal_buf, msg_body); + + ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); + if (ret) { + wcn36xx_err("Sending host_offload_arp failed\n"); + goto out; + } + ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); + if (ret) { + wcn36xx_err("host_offload_arp failed err=%d\n", ret); + goto out; + } +out: + mutex_unlock(&wcn->hal_mutex); + return ret; +} + int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, void *buf, int len, void *priv, u32 addr) { @@ -2805,6 +2842,7 @@ int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, case WCN36XX_HAL_8023_MULTICAST_LIST_RSP: case WCN36XX_HAL_START_SCAN_OFFLOAD_RSP: case WCN36XX_HAL_STOP_SCAN_OFFLOAD_RSP: + case WCN36XX_HAL_HOST_OFFLOAD_RSP: memcpy(wcn->hal_buf, buf, len); wcn->hal_rsp_len = len; complete(&wcn->hal_rsp_compl); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index b1d8083d9d9d..1458682ee715 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -146,4 +146,8 @@ int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, int wcn36xx_smd_set_mc_list(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct wcn36xx_hal_rcv_flt_mc_addr_list_type *fp); + +int wcn36xx_smd_arp_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, + bool enable); + #endif /* _SMD_H_ */ From patchwork Mon Dec 28 16:28:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352755 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027810ejs; Mon, 28 Dec 2020 08:27:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxyhxOGT6sCbtRPJfpsA31O9V7lW3pjF0yoltXRbjeqZczz5P4gqg/N0zqHMyooeTwk6UWe X-Received: by 2002:a6b:b2c3:: with SMTP id b186mr36211792iof.126.1609172863367; Mon, 28 Dec 2020 08:27:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172863; cv=none; d=google.com; s=arc-20160816; b=sgDaTPFwEg7YRAljNHnTGqZeB8AOSl1n7t98oUDXVu1I35CDHtsrbzYCPhWQq/u8Tb emu6dox6QE/w8CkPiMK2xa+tBhqzVsmPX6r+UCg0pjkWXyrbpeBhdF3/VrAWhBG80XW6 LRarMiqXsnxF0vffdJTEt3geVMgcLbdPQjkeuU6d/FaFkrM22ZdFsEqz9AO7uCa0ZcVw QVjCCefM8ZmanDRZcH22BAXN3DjH6bkh1SiLs3J0wUUYcd1epzchg/o1t/4sha9uj7Go YQ1/lgBT/qIBqSDTR/U3UcBT08oohMlLszeBry86UvggrImStTyrqBZtsSKtO8tBZDHs QkBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=AGXfM5wi7v0b+MjLBorXl2LTIf243mAcDzS8Al6ARJw=; b=ZWnh0/dFgV0gK6ro59FUWxebKfEbgNRBoiCAx8S/Bpok3akDAIG2GfREFFDqnchF9J hiw5GZzYAO3NaN9w5SpBfPP9BiASYpQNNep6a1/F6i5gD8n2MZ4DurC/03kcj39HJoCZ S2CNXre2uAfy3c8QoqjNy5sNMm8VpOLKxL538HMydsbhR9ZPxwlVD07cfAcqJ2tPm0PP Zjf780SkO0cbD9MsmmEvNWo/QjsIWUo36iLBkLRbtH+QSgIzgEKBW58YN59sXrsXsZRR u+vfUuMJMSEXRsEMXcHQwKEwIFqZff5AqgHgfldNoMRm3kVjnv0Po2hDZ1GAweNx68N3 QJsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=pH33kQZz; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HlLRqSVj; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id u17si42539849iog.74.2020.12.28.08.27.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=pH33kQZz; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HlLRqSVj; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=AGXfM5wi7v0b+MjLBorXl2LTIf243mAcDzS8Al6ARJw=; b=pH33kQZz5njjEksS6KDvxKuBY JFs6m4MZ+P3gYB/Xdv00tBcv/xbqavQvflyK8q9A156Ivy2wP8XC/0Eh9ZvVuDuY7uNgjSEwhrXw6 lyquy3n1QXJ56kcgoL5WU8MTgql0xEsdSdcm/U2UeIXuDMX8P310JgJfT55zYtlIw7xU4s7Bh0kNu Rp7mBf94bfPQCFbaaS2Hagvto9W9aBGsOeHY0lrZ45LUA1gjwCkdCSqWVv0Dd9PQx65CPrGLNLiDW ooeedTHE8VhzkP1Ju2La6XSN19smljX5ZsOfCm15iNOYNgeVIgPB9iNlauywi2wu35W1uf3qG04up NvR7nV20w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMw-0004XQ-89; Mon, 28 Dec 2020 16:27:38 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMt-0004V6-QR for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:36 +0000 Received: by mail-wr1-x429.google.com with SMTP id d13so11723478wrc.13 for ; Mon, 28 Dec 2020 08:27:35 -0800 (PST) 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=T3vbkvpnDfJt+kYGiWTgD3Sze4DdRUv6z46Vf171QE0=; b=HlLRqSVjKEqFUmImV6+YMe8wWB5FdGEKQ5bUlfpiH2xr/VO29pKZhEsb9GumPp18SQ vii9CEasaZOZxGUBMl5M2WnAuw5rIdIuAbiZvAv5ELfnqmLUqx/VSCTINRmdlmBTVVdU Qie9VcxQtU9Tsh+fr6Nljsef9QususTRx8qvdH04KuYbbu9KA+6ElJaP3WA0y3Owxa0s GBMCHIN5EbIxlP9eFgL5B2ilzCvVBIiovlS/Cl7f1ZUKDtarjXAaoRFtUau/3GkSFf08 TE664YOJoYis+6Robyvm2l+n9TB8VCMuXP4tFnDLeK53yvxqYPImxhcMzgZitf4WXHqd Yw6A== 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:mime-version:content-transfer-encoding; bh=T3vbkvpnDfJt+kYGiWTgD3Sze4DdRUv6z46Vf171QE0=; b=qpTFWlWN545+mNzVMieoArUEvL6xCUv6/61YCy6r2X7dRFn+SPGaFzR8iBiKUiVzPq njRNt4vBQe5g2/pI0P3k7fQqny3kAQ7w3JDU0pQ3h8yWin2jQ0ui51AgMzoupQvjjacE E1apqPUsftb4uDYNwljWov+UoOGDubOHhbXBHWtp4Ndus0O1aRmFD6o535t6VvXYbiBL pX8wEWmeb4q4/IYt+VsIDVFxGbiixy1OK6njBCXDYdh2P9l7rnE9Db/KTk00gcVMa2ac jgpi0PqCYd9DrQ3AWskDx/zzUCobLko0EI5q/P+OcAgMAAyvhD79MMdCSAzWaOB+BFme Y4CQ== X-Gm-Message-State: AOAM533fmjyRjk8jYBC6Q8Rr09aTDC2hJ8cuq0HuwudFinRqdDZYhw8X ItJqnd++HVvsWo2RBW5y9Wmz5A== X-Received: by 2002:adf:fd05:: with SMTP id e5mr52106185wrr.225.1609172854451; Mon, 28 Dec 2020 08:27:34 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:33 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 04/13] wcn36xx: Do not flush indication queue on suspend/resume Date: Mon, 28 Dec 2020 16:28:30 +0000 Message-Id: <20201228162839.369156-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112735_897310_20DBB876 X-CRM114-Status: GOOD ( 10.77 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:429 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Testing on Android reveals that the flush on both suspend and resume of the firmware indication work-queue can stall indefinitely. Given this code path doesn't appear to have been exercised up until now, removing this flush to unblock this situation. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 2 -- 1 file changed, 2 deletions(-) -- 2.29.2 _______________________________________________ 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 c463ec7c1568..745512a6ad83 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1110,7 +1110,6 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) wcn36xx_dbg(WCN36XX_DBG_MAC, "mac suspend\n"); - flush_workqueue(wcn->hal_ind_wq); mutex_lock(&wcn->conf_mutex); vif = wcn36xx_get_first_vif(wcn); if (vif) { @@ -1135,7 +1134,6 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) wcn36xx_dbg(WCN36XX_DBG_MAC, "mac resume\n"); - flush_workqueue(wcn->hal_ind_wq); mutex_lock(&wcn->conf_mutex); vif = wcn36xx_get_first_vif(wcn); if (vif) { From patchwork Mon Dec 28 16:28:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352757 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027818ejs; Mon, 28 Dec 2020 08:27:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8IzQK8Ju7UMQeQuaFvlN248XqV5F+icxwhqYC7fhgpsAXFKnyXmaPVVhzpF9rUhKktiF6 X-Received: by 2002:a05:6602:20ca:: with SMTP id 10mr36819785ioz.51.1609172864295; Mon, 28 Dec 2020 08:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172864; cv=none; d=google.com; s=arc-20160816; b=RiAUiVqMvYYhrntUMajtua9Pjgg8hcznckbnrffl09riPzPwScD3qaW2xmnNpy9ggu f5ZRMS34XtF5KwSm9Dfj6AMi568fpMXYNbYCbjZzun9CQUlPIaIDCCi1POPXodde7Dnv H69szdegcFdOyyVaxOOxiidIa50f7gHMVBDjv+0AC4R833VwZU7qoFxmue6VVDejFMCv D6l/q7I3/fWWQgeXURWXsnqcKpDQL9vXmUDv+YWdU5ZdYxFXJhdUMzYOtNvogh/jJtu7 tQAkYrowqA1OoZ2PqI0vcBCyxg6eupEFiSBtX0swFtAeSSii9w71LQQDKxg/h8sseR5a /mVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=aoXY6EyZlYlZjQznkfzyeu2md8MyimdrmmKkBquG/pY=; b=tVcNwTDR7MsRCF7C32Neu7w6Lj065/HJ6NPFFIJFl3M+a+/eO5rU1IF8wl/pGMzKPc MEjDYiNLExvtDiy6hJdkTixOdaKoGEHMkSIjcCHUOM/Y97+7F6zFiTBnFmSwSNfcCo8b dk75z94h6snTf6f5bc4KwiND7eN6p/8WaOz0bJQvkolbuOhFeZfa3JGmVgW3qWEgvT3e F+qTpyKEGDcReIvH3JHWSiV2ulW5CqWdQ8yjJGlqNS5KtuCg5CZgBXpYQR9mDEOR1iUw oZsyVWL0VAqeJkKAhf1RRmz7aGbzPS2qeqP7L0BOirs22RP1iOrZOl42O5SygNUd1ULc DANQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Z4Jr+Z+G; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BoOU0ANX; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id r2si26735025ilc.77.2020.12.28.08.27.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Z4Jr+Z+G; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BoOU0ANX; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=aoXY6EyZlYlZjQznkfzyeu2md8MyimdrmmKkBquG/pY=; b=Z4Jr+Z+GNZ1mJkbBy9LCiRfXY unVIyPasE2onmlWqDrQs0wyCFaR/jeGPXRU8DCHn5tDF/3Xdvxzm0xQVtd5LfFPN+EEau2t6AFUk7 D7IgctyfDqFJp0xGv+im2pacEidjoOk3uIpld77dQa9/UwkQDtUYokDrgDN6o1etAUdfrOEku5WH2 fl/Q0UtERW05Uue8bX0tTSd6d2KFEhnSQcXj2Iydmerf/E7an/IbTVLqeuu/HamFkSGM/o8jHDvL8 U3rK7EcV05tY1sOWO6RCgrJRuBoUFy9IiNVORbCgtoeYeWML+obVXX1nOBL1JRrhtnImfqhsxug5L TazXC6K9w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMy-0004Yv-HJ; Mon, 28 Dec 2020 16:27:40 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMv-0004Vf-1T for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:37 +0000 Received: by mail-wm1-x329.google.com with SMTP id a6so10711915wmc.2 for ; Mon, 28 Dec 2020 08:27:36 -0800 (PST) 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=iDdF3uI5gFdqmwiYK0tEjCdYV2ecZWcbZfnAQ4bZ1CA=; b=BoOU0ANX8yCDMe4XiOnt9LuvsQDVlam4Q/nxfCF1k7+Kk9LRsqNdl7KfphAdrXbyxO mdcbKdYjgPSSKwP7YjAdulk6A6l0YU3xHTuEnVor96EHNQhq7WtJholEDiR7dy6Lx+zW 1/AIZHqITSqC0H/CGq77GCnY5m3BG0MC8C4wDJq+dWOc9Uk/ansp+rYXm8HDag76Xzvt n0QcJZje5RY6H69oNCZsMYjYwoNMM0VA6gQCwVdSM6+sClQpb/hB2hTCBvUETmpPIYFh fG1Z+mVomRO6KBnR77XWEMIj7iMmiYRwT8Bq/RiOhWNfp7vgXMmpGSWRJJLWlG0MTBDU tqbQ== 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:mime-version:content-transfer-encoding; bh=iDdF3uI5gFdqmwiYK0tEjCdYV2ecZWcbZfnAQ4bZ1CA=; b=fSXMzGDom5LdEOqtx2TBaSA4OF0C/4inSPzvhu2OicRWzPFFAcOzc8vgzefXpYmu5/ X6n3qH3F9U0yKkbkAMkwAQvMG2o1EMMPUi/F/3wtOuFyMydTiIP7s/6jf6eKUYApSlbT /9IxlRPUcWWTet4jNa00xyWKuB7ErBRgbai/6KSsB5LBjoHhCDPdjUyQtAfvelsArmuq A3gkWeTTBqFkpaiNgPxvyNvp5UDhQdmDgY1UjM9OIcM0igEYwBa8jXQb43XYnUNEctwb QYXhDvyU/aWkw/iPvEtoNTYQyZ+gJKB7JxO0S+B5nVr8oBc5lQA4DAW3hqU31wCNIBfi IIPw== X-Gm-Message-State: AOAM5325vvlCgZg/CC6PjKnpnLZXoAVGvp/rHVxDWUwqCU7MzlC3JZQf 575E99MgK6uSptT4GZOPnL1v2w== X-Received: by 2002:a7b:cc0f:: with SMTP id f15mr21235738wmh.29.1609172855527; Mon, 28 Dec 2020 08:27:35 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:34 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 05/13] wcn36xx: Add ipv6 address tracking Date: Mon, 28 Dec 2020 16:28:31 +0000 Message-Id: <20201228162839.369156-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112737_097646_8B5F6693 X-CRM114-Status: GOOD ( 16.02 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:329 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Taking code from iwlwifi this commit adds a standard callback for ipv6_addr_change(). This callback allows wcn36xx to know the set of ipv6 addresses. Something we need to know in order to get wowlan working with ipv6. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 1 + drivers/net/wireless/ath/wcn36xx/main.c | 32 ++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 8 ++++++ 3 files changed, 41 insertions(+) -- 2.29.2 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx Reported-by: kernel test robot diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index b56c8292fa62..90333daed845 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -3466,6 +3466,7 @@ struct wcn36xx_hal_rem_bcn_filter_req { #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2 #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \ (WCN36XX_HAL_OFFLOAD_ENABLE | WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE) +#define WCN36XX_HAL_IPV6_OFFLOAD_ADDR_MAX 0x02 struct wcn36xx_hal_ns_offload_params { u8 src_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN]; diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 745512a6ad83..af59638d696f 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "wcn36xx.h" #include "testmode.h" @@ -1215,6 +1216,34 @@ static int wcn36xx_ampdu_action(struct ieee80211_hw *hw, return ret; } +#if IS_ENABLED(CONFIG_IPV6) +void wcn36xx_ipv6_addr_change(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct inet6_dev *idev) +{ + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + struct inet6_ifaddr *ifa; + int idx = 0; + + memset(vif_priv->tentative_addrs, 0, sizeof(vif_priv->tentative_addrs)); + + read_lock_bh(&idev->lock); + list_for_each_entry(ifa, &idev->addr_list, if_list) { + vif_priv->target_ipv6_addrs[idx] = ifa->addr; + if (ifa->flags & IFA_F_TENTATIVE) + __set_bit(idx, vif_priv->tentative_addrs); + idx++; + if (idx >= WCN36XX_HAL_IPV6_OFFLOAD_ADDR_MAX) + break; + wcn36xx_dbg(WCN36XX_DBG_MAC, "%pI6 %s\n", &ifa->addr, + (ifa->flags & IFA_F_TENTATIVE) ? "tentative" : NULL); + } + read_unlock_bh(&idev->lock); + + vif_priv->num_target_ipv6_addrs = idx; +} +#endif + static const struct ieee80211_ops wcn36xx_ops = { .start = wcn36xx_start, .stop = wcn36xx_stop, @@ -1238,6 +1267,9 @@ static const struct ieee80211_ops wcn36xx_ops = { .sta_add = wcn36xx_sta_add, .sta_remove = wcn36xx_sta_remove, .ampdu_action = wcn36xx_ampdu_action, +#if IS_ENABLED(CONFIG_IPV6) + .ipv6_addr_change = wcn36xx_ipv6_addr_change, +#endif CFG80211_TESTMODE_CMD(wcn36xx_tm_cmd) }; diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 71fa9992b118..5a5114660b18 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -18,6 +18,7 @@ #define _WCN36XX_H_ #include +#include #include #include #include @@ -136,6 +137,13 @@ struct wcn36xx_vif { u8 self_dpu_desc_index; u8 self_ucast_dpu_sign; +#if IS_ENABLED(CONFIG_IPV6) + /* IPv6 addresses for WoWLAN */ + struct in6_addr target_ipv6_addrs[WCN36XX_HAL_IPV6_OFFLOAD_ADDR_MAX]; + unsigned long tentative_addrs[BITS_TO_LONGS(WCN36XX_HAL_IPV6_OFFLOAD_ADDR_MAX)]; + int num_target_ipv6_addrs; +#endif + struct list_head sta_list; }; From patchwork Mon Dec 28 16:28:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352759 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027833ejs; Mon, 28 Dec 2020 08:27:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyy1MmaLoKE/qsaO2nphJykhxzHyF1k50hR2NUikUpoFQTK88CO3O0m4SGFQj4r/nAJw3+C X-Received: by 2002:a92:ca47:: with SMTP id q7mr43263769ilo.239.1609172864891; Mon, 28 Dec 2020 08:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172864; cv=none; d=google.com; s=arc-20160816; b=HETx0tlV7IlqRP4VX5PMt72hom5Z50PJSU4yOb2pm2L8UJPqXH/4/cn7MkWkFRFbxt PU5zg69nxN5ElRd0GoL628AeZPgWVHCcrJqz3glq7JR7LrP8b9SjtyeVT6yrmy01w70F s7UJBxza98FOja/beYSXCg4I+Tbce7RCETx51pAycjv3LFfeoEl1NVKrVSIJFMmkPl/S Fs6TmZGUB4O+zEUfQtFcV+0HAEZ3Sohi7DjMi09j8eyvHKvabHOSo+2G5xd0/WKPhqC9 6205RFKR2s9CddswGPLTEskDPHkq86qnejHm+p3q5fE8082wmKwOySPfxJBiJ7KlQebk aXkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=nwtXo+EnOAt77p/beiq/HCTEXC5gjwLGuRd/ezp0YcM=; b=RwpJ5EUNQCQjwwSS2pXLh8w+moL1yy0MzG1kcn9hWA1g1fm+bgS+yTZuNa89Nl2ADF OPo7eBp6m1d3KyXoOGgIV4zu266uovET+uF82WLp7kl3IjcuDZ9lLj2Cc90+yR59Fvs7 oRS3m0P/WLjtB/F4EVTV3Td6npn3XJtmBFvXsIfS7bgMpUm9Hv8kHRkYlY9evfbI6Lgk 5scuGCEKPDKVY0UEqMAlyrUK0pIJqOhgcUlAzu3WCMbPvFu70RzIGDhf7+8LcPWQPoUr /yC9QtzVnyif+X1KaHxlCTs+EzAfIvM2NgfZPVFrqJJJ0I3QRVZBFG03TPVtp/5KEv4m kTTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=VZ6PCKNk; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ncQR+r9l; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id b8si45161945iow.50.2020.12.28.08.27.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=VZ6PCKNk; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ncQR+r9l; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=nwtXo+EnOAt77p/beiq/HCTEXC5gjwLGuRd/ezp0YcM=; b=VZ6PCKNkW5UjU1ZFD48Ojc7iH 5wUuyfmkJJDahDtGTSwYmgo1LH3yryQGASDsUX/uw71HoJuTIBmK7z4IDWjOSDAzidrxvU7Cjn6oK yppp3l1tK2he1z1kCpKrSFnkRESJGtz75SQwEFjMhct/jA+3HZ8xz/yXumVO+s642lH8Rxwbwqeb6 h9iosefRR91QUGdj2fRQAnh2SbO/eFVT05UdPkjwqNjcYo97B+k7xphNLRG6tn0slp8YBl3JyTZb+ r5ktxo+N2VzqmPcr+K7m4RxVbevduUJL+cxpamrrXjaa/Yyd5V2XcgOKNReo3VODMGa5IkrwG864A 2f0302uqw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMz-0004ZR-6b; Mon, 28 Dec 2020 16:27:41 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMw-0004WU-7b for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:39 +0000 Received: by mail-wm1-x331.google.com with SMTP id v14so10714861wml.1 for ; Mon, 28 Dec 2020 08:27:37 -0800 (PST) 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=eY+3wBeOdVNx7S6ZBSAwS1KofM7X7bObYB96unqy4iM=; b=ncQR+r9lZZkIE3sgyoMcN8o702yKXfL9OlBMszw4uGwYyuaT02B/AGYNFVE1czHUDD 2Mgg5Zjc4a1SckslqrBQKnCpn4Y1nYx0apXcyagRp4XEzzQSJ62kryAAb0p9TqwQxFNh i1HChmy7yRkCJDeLYUhbzFTC3lxGLCtumc5ir7lJUhoHmWoDhlalqXPZyV1bZq6XagQg F+xc8+h9UXhXw5pjp6YhMrlvYkNxNEKh1chcNjLjvxqeQ5fM0tULWUNxXlPxfpilTD8l 4x84es3irx4BEbTg20xqpweQfBqKYTdUnTCBtisoVoFTt40kBHIfKzkzz2/KrxObhboA cVew== 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:mime-version:content-transfer-encoding; bh=eY+3wBeOdVNx7S6ZBSAwS1KofM7X7bObYB96unqy4iM=; b=h3VFMVcsevweb67kX4ZqZmlB50VTKTreXKRVGYeHpy0uA5poyMxQsDNw7VMIseQfXv S/ARD9K0YVhACIQyRHgJwWL8Q0FLJWeBSHu5uuhUGI+xhqT1PdxPoXuYtXIHTn8MMwji igHSen7pk3HSEJpsF4DzNSL6q3fMTDCiuaOR9BxdrN8F4zCM/4cOVvIhgZVvzgeYRObl yaz/h3VN6RoOzruy0JmWAewkQoShMrFXECYf2ANHZYXME/vKvsKpzPdGpLIrM9kHlXiB 3r1mUoU2bQcz4u/yr+9cmmRMMO9pnl4CE1l+ClLRW8OMwN9cqAgcfhZTO8p0UuaU0TSB RtUg== X-Gm-Message-State: AOAM531A/jUg9i9crO5cHKK+BPkfZedAlLG9UnDgZI0Xwh2spNkcj4nn XaxNanjwkqeCTkvFpYwMMDxoBw== X-Received: by 2002:a1c:3987:: with SMTP id g129mr20816495wma.86.1609172856720; Mon, 28 Dec 2020 08:27:36 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:36 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 06/13] wcn36xx: Add ipv6 namespace offload in suspend Date: Mon, 28 Dec 2020 16:28:32 +0000 Message-Id: <20201228162839.369156-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112738_307643_DAC8C219 X-CRM114-Status: GOOD ( 14.34 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:331 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org We need to respond to ipv6 namespace lookups when in suspend. This patch adds the necessary changes to issue the appropriate firmware command on suspend and resume to enter/exit firmware offloaded ns lookup. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 3 ++ drivers/net/wireless/ath/wcn36xx/main.c | 4 ++ drivers/net/wireless/ath/wcn36xx/smd.c | 55 +++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.h | 3 ++ 4 files changed, 65 insertions(+) -- 2.29.2 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx Reported-by: kernel test robot diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 90333daed845..3b949b0b3792 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -3464,6 +3464,9 @@ struct wcn36xx_hal_rem_bcn_filter_req { #define WCN36XX_HAL_OFFLOAD_DISABLE 0 #define WCN36XX_HAL_OFFLOAD_ENABLE 1 #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2 +#define WCN36XX_HAL_OFFLOAD_MCAST_FILTER_ENABLE 0x4 +#define WCN36XX_HAL_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE \ + (WCN36XX_HAL_OFFLOAD_ENABLE | WCN36XX_HAL_OFFLOAD_MCAST_FILTER_ENABLE) #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \ (WCN36XX_HAL_OFFLOAD_ENABLE | WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE) #define WCN36XX_HAL_IPV6_OFFLOAD_ADDR_MAX 0x02 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index af59638d696f..579bb7f4db9c 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1118,6 +1118,9 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) if (!vif_priv->sta_assoc) goto out; ret = wcn36xx_smd_arp_offload(wcn, vif, true); + if (ret) + goto out; + ret = wcn36xx_smd_ipv6_ns_offload(wcn, vif, true); if (ret) goto out; ret = wcn36xx_smd_set_power_params(wcn, true); @@ -1143,6 +1146,7 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) goto out; wcn36xx_smd_set_power_params(wcn, false); + wcn36xx_smd_ipv6_ns_offload(wcn, vif, false); wcn36xx_smd_arp_offload(wcn, vif, false); } out: diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 4589c3d26027..b05f1e1f253a 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -2794,6 +2794,61 @@ int wcn36xx_smd_arp_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, return ret; } +int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, + bool enable) +{ + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + struct wcn36xx_hal_host_offload_req_msg msg_body; + struct wcn36xx_hal_ns_offload_params *ns_params; + struct wcn36xx_hal_host_offload_req *ho_params; + int ret; + + mutex_lock(&wcn->hal_mutex); + + INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_OFFLOAD_REQ); + ho_params = &msg_body.host_offload_params; + ns_params = &msg_body.ns_offload_params; + + ho_params->offload_type = WCN36XX_HAL_IPV6_NS_OFFLOAD; + if (enable) { + ho_params->enable = + WCN36XX_HAL_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE; + if (vif_priv->num_target_ipv6_addrs) { + memcpy(&ho_params->u, + &vif_priv->target_ipv6_addrs[0].in6_u, + sizeof(struct in6_addr)); + memcpy(&ns_params->target_ipv6_addr1, + &vif_priv->target_ipv6_addrs[0].in6_u, + sizeof(struct in6_addr)); + ns_params->target_ipv6_addr1_valid = 1; + } + if (vif_priv->num_target_ipv6_addrs > 1) { + memcpy(&ns_params->target_ipv6_addr2, + &vif_priv->target_ipv6_addrs[1].in6_u, + sizeof(struct in6_addr)); + ns_params->target_ipv6_addr2_valid = 1; + } + } + memcpy(&ns_params->self_addr, vif->addr, ETH_ALEN); + ns_params->bss_index = vif_priv->bss_index; + + PREPARE_HAL_BUF(wcn->hal_buf, msg_body); + + ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); + if (ret) { + wcn36xx_err("Sending host_offload_arp failed\n"); + goto out; + } + ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); + if (ret) { + wcn36xx_err("host_offload_arp failed err=%d\n", ret); + goto out; + } +out: + mutex_unlock(&wcn->hal_mutex); + return ret; +} + int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, void *buf, int len, void *priv, u32 addr) { diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index 1458682ee715..380ea58b58ec 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -150,4 +150,7 @@ int wcn36xx_smd_set_mc_list(struct wcn36xx *wcn, int wcn36xx_smd_arp_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, bool enable); +int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, + bool enable); + #endif /* _SMD_H_ */ From patchwork Mon Dec 28 16:28:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352758 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027831ejs; Mon, 28 Dec 2020 08:27:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5u1FcjKKkHrukUfXwTsbAvIWLj8M4n9D/c/FLAA9nXq0vlkbiSYAbMP2s1Y9GPlaoAiaf X-Received: by 2002:a6b:f112:: with SMTP id e18mr37158831iog.195.1609172864806; Mon, 28 Dec 2020 08:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172864; cv=none; d=google.com; s=arc-20160816; b=sAixwJteKUTpIgJaLct1nOvhJxiLpTpvq5tl8yLRcQNrzVfLZLTLvM1EzJr2Igq5Au oeGwgQ5g2S2ZyaLX3yVLQG7tAQFrdZEqbAkvwlOOPq2JK37Vvg2YEP5ODNpF5qllQ5ES wUjJImjuvYPSuspjNZPVM03khB2WN5lMAJgUDa4R9cnMNzhdlEAZeMapEQD7OVsl+A8J wO2RThbJ501d7U2sDkZHhWV7PinAmi+/2cgfHhFQIzXr+MJn9MnnlJ9zqklwFJJ2K6Ko v56FAL8P5dFL+FrLAtPXBBPb33bpdYQPKKTW/Jo7ccfOFLFptwrCysNQRjOPzDTRmBzJ aSlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=/5sCdG28a6qbKhaNfr706UFm8VTVgQVYhP9uuc7P+qg=; b=XIdqA9CnPVQAx/bGL7sZoHDNo82LCWLEVAa3Ot/WYCGqNuKsbWDhRWn/MewZMzful7 O/a+vARG2K4WJT8+OfejbzXHnMkykLwksTtypW9EquT+Hq/ptG5f6lDLkL/MekoDS0YD U/2if8w9DAyHnOaRW5tbq2toOxPi0T6lZOpFnVG6WGs7ritvvEnzr6XcZozbRLdjHgZo sd3RIx4/BnqMyrnOiJGZtvzBc3O3fjSDbwJuXi2iZ0W/13JQwnkTgnC1ZT5ukWvOqp02 uHLl2wTQI1fzlvaTi3Hy3DTemMUf21kAYYv3bAMpT15pIcEvuse7tmv2/kSm/rPP+NWf zQuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=jO5E7ThD; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EVKR8oMh; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id 13si27339822ilx.79.2020.12.28.08.27.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=jO5E7ThD; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EVKR8oMh; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=/5sCdG28a6qbKhaNfr706UFm8VTVgQVYhP9uuc7P+qg=; b=jO5E7ThDwKPg4oBIHzdzpG//7 CCN4V8c7fNKuD1WuVy89vTqH0YpEVOQAIwrFVYhrhbGMgEcF+5DmAwV+qBSclPumMxOhMV9vRyc9L lE+DA7wX9cGGmj1UQFQRYlnoYPUtR7kU5J8pgqXnQ1UGms6TDyDHO0Pr5Olkof9U7nLNeqQnxLJz8 PFr60vVmKFo/xHMQwy7L8cgqO13RA2ygWJEHj1YJMNA4uGQvBEhswMl0aPLFpToSqQuzHws2Qh1QK Z+pLmdtJ1nlqGtVOEHEn9jMACDUcWgWfRVUifObwutid1Bj6SQkEgYpFdp70Pl5nsfdkquksV6e30 TiRcdJzIw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMz-0004Zo-If; Mon, 28 Dec 2020 16:27:41 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMx-0004XR-FQ for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:40 +0000 Received: by mail-wm1-x335.google.com with SMTP id y23so10209989wmi.1 for ; Mon, 28 Dec 2020 08:27:38 -0800 (PST) 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=2379O66VphKJpmO2g82hANsVKjqZJjjcsBFp5fQ4u1I=; b=EVKR8oMhtX0As5WNmh8JN3OWq+S7RHBuBSTyUloI/QRt+WWdJmTIiCnTgFqe22EbSK /BCoL3lZW99W6I9f/AJgaoveCGSHHK8RJr1bvY67hJ0oZ50/ktoK6fOpF30kgQKNPiRi gVwz84mYOeis8CuPen4bhTm2fVb211DfWpVJzmPmeeXQBEjAWOiOxRnuC8EwOmzPqwBJ 3bxFuT+4007KXisS1zsILzcQzcWLmZC9H0sU1Fge2OEJwXJ8TM1EXC9DIkoHj/hHsNYB DNChGbM8kMMfjQ+eGUJJJFFcs2Tlrr3qde0xeVmZbu7TvdfyLWENiqZzM+ZROD6LE4Go garQ== 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:mime-version:content-transfer-encoding; bh=2379O66VphKJpmO2g82hANsVKjqZJjjcsBFp5fQ4u1I=; b=Q+QhmCeZKzwzzMlRMKnKvbF9ipt6D9fC9GxQflJDWaa3ExVM+hBX3yd9cLCxP7siS0 Ul7a7+BcWO6EUvXLp7OmwBKLwdEVPWxRFpuOk09KCs/3FjVMT+4NWu4koMpv5vYszgLG EnIFoAjgJgm81wfO5DHejmquSLE2m45TWMTajZl43YfvRJfMubtLIFDK1lFFNZi5U8li vK0MatvM2FIOp3AwW54wQLtxop1Atdfao/4ibm8B+A5yqglFoFPC1J0PMNbiq4Dqlage Z8E91q3T6ElOqeZzV/Kl82UGqinNwxu7lMbfw8zeueE+L+SNoC53RVibbh4iQIOsXlES xH+Q== X-Gm-Message-State: AOAM533CmqTOj/Evvw/Fvxhwp57JngiK4NPgYo2x8S2g8yDUsgSaCNLu ++alqV3aFN76DjV5B420mJpAzA== X-Received: by 2002:a7b:c4d5:: with SMTP id g21mr21392477wmk.92.1609172857943; Mon, 28 Dec 2020 08:27:37 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:37 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 07/13] wcn36xx: Flag WIPHY_WOWLAN_MAGIC_PKT Date: Mon, 28 Dec 2020 16:28:33 +0000 Message-Id: <20201228162839.369156-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112739_550177_5C4721FF X-CRM114-Status: GOOD ( 11.31 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:335 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Set a flag to indicate magic packet wakeup support on wcn36xx. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 _______________________________________________ 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 579bb7f4db9c..cfa2e2d20a20 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -173,7 +173,7 @@ static struct ieee80211_supported_band wcn_band_5ghz = { #ifdef CONFIG_PM static const struct wiphy_wowlan_support wowlan_support = { - .flags = WIPHY_WOWLAN_ANY + .flags = WIPHY_WOWLAN_ANY | WIPHY_WOWLAN_MAGIC_PKT }; #endif From patchwork Mon Dec 28 16:28:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352760 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027866ejs; Mon, 28 Dec 2020 08:27:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJytSAxKjZjBgAqk7hPhPCmOippd0k1PaEDIzmtqXcqgzuQLyDsblmYRlXmsAnuRXdIUjy+L X-Received: by 2002:a05:6e02:1a04:: with SMTP id s4mr44366325ild.8.1609172867122; Mon, 28 Dec 2020 08:27:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172867; cv=none; d=google.com; s=arc-20160816; b=1K5y3TtdTJFXzP/fwGaXjASzIlSNlVay0hQYqtrrO0pXGC0q961Bb6okTKY3Muh0Is BDOcdOIzn+6t+sbY9n2EVIlyBy0Ubrb4ibw2EnF3temZ0PtV618JEqwIpfeTxP814Sj7 R/Pij7rQN5XT6FiqzLZRbV3EE1tj7aD/qRIj1mQENZl5i79Ty1wvTDApbETvUI2D9Qah 19RehBBNC1L2aEAvc7d1eU+XC4GMctMROAmBx/3ypAELZcJL0sqkJXa3Kgqu9KWO8lxO HWrrARgqIBfQTiBGEZT8N/zLwVZ8T3HiK3Dv+mG6cqcdjN4ZPew0LtSb6JKAepEqt5rm /dWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=XlQxnn08e24DZBuHTjzhSoC5MVaR+jhWW/cbRly9mjI=; b=iVNiojNj7+CFW8cFZENfTWiJ3lgrAeMOSAinkxPN51etAmLafs0nNb1Ib+6ePhYudP h1CHQ9eQUQlhjb8c8EbXK/wYCL79j5fuRGF3MVUor6lfCwUZx7W0v+W/5AUDgvXOeMd6 XULBi5LsAXD/wTKldLmnNHwqH/aex0cYIzF8ayTw03bO/GBT8poLJcAryxTm5aycTo5H 0sMpQpN86b3L8xtNd0W0ZtxigQJeNnkxxSl+OXeGFBL+09HW0XdmeLJ97vzEmvbmJ7F/ 0Y/RBusS8V9jtEUnSZKLZ+LvdZyekGnY5WDVTqDPjJ3ERQ0vhcfsQvFgIr1i27m/HoSW OC6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=ekru19YZ; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=sBv7gYlC; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id q5si22649790jar.4.2020.12.28.08.27.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=ekru19YZ; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=sBv7gYlC; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=XlQxnn08e24DZBuHTjzhSoC5MVaR+jhWW/cbRly9mjI=; b=ekru19YZJ4YQrHrc4pI0OkBev 3bqBmRlj+308C0c3NKpHzgGLSUp2nGPXtJUuhWgR9bWxlef1rV1E9kSj34J8QSamV+ZZ1oQdF0A3W dfSo5VPS6K3pq+fZmmdKLdguUSmYqWPNOluZWRF/KIbUOB/UFX1uVJd8ziYHzytEVK2VGxHocWI9Y G19oIpS0QUoI/QGRO6IQuJkXC5VnG8JYeBM/zaeWWQrczfAbsZHkCidAQlBVyuUyejuUTV11xQK+5 8G1Q3C/EzWsB+bNE/fMthj0iHuSMMrFgSDhTDtUyh/bk5tGV32yZKMN1qXi1wcAuEFbap48zbk5Rq gyH6+9Qnw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN1-0004bM-AW; Mon, 28 Dec 2020 16:27:43 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMy-0004YT-Kb for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:41 +0000 Received: by mail-wr1-x42c.google.com with SMTP id y17so11738782wrr.10 for ; Mon, 28 Dec 2020 08:27:40 -0800 (PST) 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=3RYdIFmmEj5YWYc3o4ND5KeefyrBxeCm6bmJ8jzGapI=; b=sBv7gYlC5bwoIjuph34kxZMbuxPUbZIfw1OmJfrwhOXDfPje0X7xRUHPRJjIvxuiMB xVlg9Afvzp+bZiv/4dc/ZYP7vJGyvYlAaSTbcg7qtyf7eqPJDrzF6vI9nz0twKMbBM/g vO0t6SVPa3PhKn1AZQPHDbva4KJs4FpXKKmG9BeQ7kGEmY7GJ4YsaM03ikiKBmeLKiEz +9jL7eml+wdEQ22QDH2AFb9qhncK+oOJ025/6a9x7fknF0AWSsPyTusylh2gYRcXsqhM Y815//TB/Ns3uj15lFr/C86FzicCdc8ZveLsGCGhNyv7tR2xHX2Ak9e+JHmOzlODYVue wujA== 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:mime-version:content-transfer-encoding; bh=3RYdIFmmEj5YWYc3o4ND5KeefyrBxeCm6bmJ8jzGapI=; b=LqbQXruvFOAnXOs89X3X4gW2nY7IRPhnr/E97h1RG0UOTLzyrm1i3eL5vNTfE29Tfb l2Hw/oy0UHIOekiESu3JgWf8iKDkYnKAnewAXJ9vnNC1W4OyirjMBSiRHEEwHKyt+0PX /tyguIRmDCcVUnkYVq2HrIwo0Ca+vE1Hc8Bt2v+fkxfM55hoHuU6KgWM23LTSl2tjbS6 CteEajgGaaNw8MjSr5k+ccDmFi2n4+my3KU2GiqvTId7+l6VqBD6tQ2m+UaBDtAJayGX AzFrHZBn0RnfyjY7Pbwh3BQiX4o9SGR3t4U1UpkncMC9HTHCGdhOGNh5GNbTRZQaZNXG IUiQ== X-Gm-Message-State: AOAM5312INxtZHJCbdzlKVfA/IvFTklFNewfaD4G7ERd6+kLt+0wioTl lnlNclqYH81p7bvwR2j9CU25ig== X-Received: by 2002:adf:d238:: with SMTP id k24mr15458581wrh.414.1609172859208; Mon, 28 Dec 2020 08:27:39 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:38 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 08/13] wcn36xx: Add set_rekey_data callback Date: Mon, 28 Dec 2020 16:28:34 +0000 Message-Id: <20201228162839.369156-9-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112740_773336_DB9A9982 X-CRM114-Status: GOOD ( 11.79 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:42c listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit adds a callback for Group Temporal Key tracking as provided by the standard WiFi ops structure. We track the key to integrate GTK offloading into the WoWLAN suspend path later on. Code comes from the Intel iwlwifi driver with minimal name changes. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 19 +++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 6 ++++++ 2 files changed, 25 insertions(+) -- 2.29.2 _______________________________________________ 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 cfa2e2d20a20..b3388e4a76d2 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1155,6 +1155,24 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) return 0; } +void wcn36xx_set_rekey_data(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct cfg80211_gtk_rekey_data *data) +{ + struct wcn36xx *wcn = hw->priv; + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + + mutex_lock(&wcn->conf_mutex); + + memcpy(vif_priv->rekey_data.kek, data->kek, NL80211_KEK_LEN); + memcpy(vif_priv->rekey_data.kck, data->kck, NL80211_KCK_LEN); + vif_priv->rekey_data.replay_ctr = + cpu_to_le64(be64_to_cpup((__be64 *)data->replay_ctr)); + vif_priv->rekey_data.valid = true; + + mutex_unlock(&wcn->conf_mutex); +} + #endif static int wcn36xx_ampdu_action(struct ieee80211_hw *hw, @@ -1256,6 +1274,7 @@ static const struct ieee80211_ops wcn36xx_ops = { #ifdef CONFIG_PM .suspend = wcn36xx_suspend, .resume = wcn36xx_resume, + .set_rekey_data = wcn36xx_set_rekey_data, #endif .config = wcn36xx_config, .prepare_multicast = wcn36xx_prepare_multicast, diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 5a5114660b18..6121d8a5641a 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -143,6 +143,12 @@ struct wcn36xx_vif { unsigned long tentative_addrs[BITS_TO_LONGS(WCN36XX_HAL_IPV6_OFFLOAD_ADDR_MAX)]; int num_target_ipv6_addrs; #endif + /* WoWLAN GTK rekey data */ + struct { + u8 kck[NL80211_KCK_LEN], kek[NL80211_KEK_LEN]; + __le64 replay_ctr; + bool valid; + } rekey_data; struct list_head sta_list; }; From patchwork Mon Dec 28 16:28:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352762 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027881ejs; Mon, 28 Dec 2020 08:27:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/DXFR7c7mLoyPjGbAh899cklIXPptn3U3KVLXaZH2kosNqaulKYR6BxG1GZ2+5n1xQgXq X-Received: by 2002:a92:cdac:: with SMTP id g12mr43762367ild.145.1609172868334; Mon, 28 Dec 2020 08:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172868; cv=none; d=google.com; s=arc-20160816; b=PTZ9t2TYSdSRLiKGx/ZGNg67UDTb6eXapP4S8l3CPSrgjSSi2auSXtCmR1PzAf4wwc s2vPBD0NjFCUumMUl1DzjEGR5N61vmETIEgEKUTip236RythB81dIOS0sO96aOUNLdr+ o5mcHVBrZKJms/tSx+Y8K2+uGJntz7sIDVLnHQXt+niSqzsihYpOytsf20IaRemckkvT ownkrzFVyUb8ab8cuJsIX1QM5ml1Z0iFZWQVoKD0cbE2/LUUZ6bUax55S2LnGaPi+zLk vdpzSSrY2zhOtW1345etnhVJvRG8peHzr1In5s6uarzvAdX61COnyLfUUph5ncS+SaEO kfHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=HBG1YM5oBkrCKteuS+uzqBW9yTkmuNgnB/8ZvdlKSCQ=; b=iEZ6VbVT4TYSeTj8VdEJn3Xatyci8bpTVEMQTtFzhy7qa7AO32sTekLrHAMzlV37eE 5W4ckmBqaNG1+2IXmkHgJIPQOSOtj82VJjN4IcFkEaqGsC2KMcZMoz1JGjKlpV02tWRe A5KoOIcRPLoAiCMzpSNThip4BUZh9+a/BEglYhIuZrZ+RBwseAPkuZSbk3W8fo5s3H3n GJ4moRvT5/zsQ67DNRqd4pOrq8YyKc/prLixlWduvRR2uht+wC6Ei6CK6bDTJMCpM59U B2blKK6Hf96yvfpzkd137l6WohgWlzwoHyowlAW766ocd2eirId4EnAiyHFi0Pv+yYwJ PCFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=WRR+XNmC; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VmVxNNjd; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id b8si26981920ilo.54.2020.12.28.08.27.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=WRR+XNmC; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VmVxNNjd; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=HBG1YM5oBkrCKteuS+uzqBW9yTkmuNgnB/8ZvdlKSCQ=; b=WRR+XNmCG6MvbfFuuyN6fNJ6N P2Rm9vdIyBuO8sDSOoOQ4pNm6qB5Enogbm9ngQlgCiAqVNeJO4dwAmuGGVIUwwDBkAdWNNrBmzzsY cvQ+xzLAKC4IQGHoJ6OPVUg5qsk/Ugv9mFJ/zTb540MQRb7eIwvHwg/GUZS0Y207Q9sagXo00h8Hn kk/HhtyQzCiYUbzBJO0bud20/aQetgC11dZsO4BBtbkxWQe+cj3E7fn5yQvjpnNQ7fFua7mb1hp6p Jl4ASjHGX19KeSI8NWJSFidnkxpt7ZdylVt89NC6DL1sCzn8uSEshdlAYM6Xy6ZxFGh0FnasqJWau vKsBYsGWg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN2-0004cT-Pi; Mon, 28 Dec 2020 16:27:44 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvMz-0004Z3-O4 for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:42 +0000 Received: by mail-wm1-x330.google.com with SMTP id q75so10224769wme.2 for ; Mon, 28 Dec 2020 08:27:41 -0800 (PST) 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=6D//l+W7/CZ439o0lMCQJjFN9QzC2gpJYA4w5visRz4=; b=VmVxNNjd896mlU5ueCgdu15CNfm8kvPBCtyjbFXP01LwiiBqXclXGJUDWgRp2WdLDv jRFEda+RODG6Xero3gU9pt9BA6OdwZ0xVpU6yKMUHVf4aOOrJop3+SnlYLrQrGSzT1Jd A3pskoAKOCpnGai634CPnvlhslIeJpZZoDLnZa0UQjp9i/ww2qTuKRXmddAh2WOYe5Q4 Q8hKewjHqQDoREExy4DBaeYrWdXX7XGmqSzY4Dm/BUBWM/ndBnf3MXk7Acq8k32EvE3+ gy6vwizEcYaEbr7Ftu5noh7zrbKtD9tQ/ca/+ubycO1hfcwyq12R+d6qExrvwJeJwTEh p7YQ== 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:mime-version:content-transfer-encoding; bh=6D//l+W7/CZ439o0lMCQJjFN9QzC2gpJYA4w5visRz4=; b=cuBhf/weM+vbf959iG0k5eJXWl1V6ARKCnhjytWPJGHmsZSVHxdEaJfYA+3amXhFNL e+UXQVPd5eUx77vhvU+UyNBBb1GH4X47OCk/1LS6lnOQdMBQd2iIGmmWiZDwYJtP1R2L /Co0yu07ozvldTpeDCHZXWjoTP1kVZ6pV/gYGNEorCWMu1jIrYcRhaaHxpWKWnHNjJT+ +0xJUdGSyeFaM8kHoQSAajYwtb05W79udwSEBLziHGdf1asI+ZLWxmkWkQZtKLnjQzCj KQZbkl9/eXQRZldwxBrg50pJpyYoQM/sGa5/k4Viv5hXIoxve/EI7pBqZ5elW51ZfdM/ amEg== X-Gm-Message-State: AOAM5315z+FvHCNhRivgX2C98xsWNYRF4s5QQUOA54NBy05IIMIeKrye DFX/r7HxPfqtGvpjyXBi49arkw== X-Received: by 2002:a7b:c19a:: with SMTP id y26mr20489509wmi.20.1609172860318; Mon, 28 Dec 2020 08:27:40 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:39 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 09/13] wcn36xx: Add GTK offload to WoWLAN path Date: Mon, 28 Dec 2020 16:28:35 +0000 Message-Id: <20201228162839.369156-10-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112741_933137_F6A025B7 X-CRM114-Status: GOOD ( 15.98 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:330 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Using previously set GTK KCK and KEK material this commit adds GTK rekeying to the WoWLAN suspend/resume path. A small error in the packing of the up to now unused command structure is fixed as we go. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 4 +++ drivers/net/wireless/ath/wcn36xx/smd.c | 38 +++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.h | 3 ++ 4 files changed, 46 insertions(+), 1 deletion(-) -- 2.29.2 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 3b949b0b3792..1f3c2e840232 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -4905,7 +4905,7 @@ struct wcn36xx_hal_gtk_offload_req_msg { u64 key_replay_counter; u8 bss_index; -}; +} __packed; struct wcn36xx_hal_gtk_offload_rsp_msg { struct wcn36xx_hal_msg_header header; diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index b3388e4a76d2..aa2a416daa7f 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1121,6 +1121,9 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) if (ret) goto out; ret = wcn36xx_smd_ipv6_ns_offload(wcn, vif, true); + if (ret) + goto out; + ret = wcn36xx_smd_gtk_offload(wcn, vif, true); if (ret) goto out; ret = wcn36xx_smd_set_power_params(wcn, true); @@ -1146,6 +1149,7 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) goto out; wcn36xx_smd_set_power_params(wcn, false); + wcn36xx_smd_gtk_offload(wcn, vif, false); wcn36xx_smd_ipv6_ns_offload(wcn, vif, false); wcn36xx_smd_arp_offload(wcn, vif, false); } diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index b05f1e1f253a..db7988176526 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -2849,6 +2849,43 @@ int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, return ret; } +int wcn36xx_smd_gtk_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, + bool enable) +{ + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + struct wcn36xx_hal_gtk_offload_req_msg msg_body; + int ret; + + mutex_lock(&wcn->hal_mutex); + + INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_REQ); + + if (enable) { + memcpy(&msg_body.kek, vif_priv->rekey_data.kek, NL80211_KEK_LEN); + memcpy(&msg_body.kck, vif_priv->rekey_data.kck, NL80211_KCK_LEN); + msg_body.key_replay_counter = vif_priv->rekey_data.replay_ctr; + msg_body.bss_index = vif_priv->bss_index; + } else { + msg_body.flags = WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE; + } + + PREPARE_HAL_BUF(wcn->hal_buf, msg_body); + + ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); + if (ret) { + wcn36xx_err("Sending host_offload_arp failed\n"); + goto out; + } + ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); + if (ret) { + wcn36xx_err("host_offload_arp failed err=%d\n", ret); + goto out; + } +out: + mutex_unlock(&wcn->hal_mutex); + return ret; +} + int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, void *buf, int len, void *priv, u32 addr) { @@ -2898,6 +2935,7 @@ int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, case WCN36XX_HAL_START_SCAN_OFFLOAD_RSP: case WCN36XX_HAL_STOP_SCAN_OFFLOAD_RSP: case WCN36XX_HAL_HOST_OFFLOAD_RSP: + case WCN36XX_HAL_GTK_OFFLOAD_RSP: memcpy(wcn->hal_buf, buf, len); wcn->hal_rsp_len = len; complete(&wcn->hal_rsp_compl); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index 380ea58b58ec..dd6710672db8 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -153,4 +153,7 @@ int wcn36xx_smd_arp_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, bool enable); +int wcn36xx_smd_gtk_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, + bool enable); + #endif /* _SMD_H_ */ From patchwork Mon Dec 28 16:28:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352764 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027931ejs; Mon, 28 Dec 2020 08:27:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1Zj8s42SOYBLAjJm2dDfQsqg0+vgSpZHEuTTmfBEA9Ruyr7hK17eLBTuNsgE1UZZR6ilX X-Received: by 2002:a5d:8a1a:: with SMTP id w26mr36789360iod.112.1609172873627; Mon, 28 Dec 2020 08:27:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172873; cv=none; d=google.com; s=arc-20160816; b=01gBC3t9JyXxcnkeosuaaCpEV3nQnZp62Aoy8eGojbofbTlT0jKOna2v7jHg0LbOOK zvxw/TaaiykgztHZrlstbeR9cnqkTJdpcZLvYzV/Qp/gqhDkeKGbVKyRYAfGP8DPIu/4 ekkBsh36uMA54HYmoCqyyIh2DbLDFl9ctE9sb2zQLL0V+KRvYDoWX9TB9cvVaX9wxXfm EReiClujwjWkAbrlz6EXit1Yd9xIvup8OhuWioFWbP5JRLwuxsr5/gUZ2E489BYeapT5 EK8+dbXjPL/Ae1VprVD2PJbHbDy8V8IpQHgKfXBqF0IdAKdKfN/kV0ejkkEeGHhvGRli IUpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=HXJoJcs4+xfXFWA1igW1JddGjOEimW4I4/S504N/gzM=; b=hfSrvynkRSnNwTnO43JAOTeiDrx9NTeWq+joPwlwP74w6fhiuQ3NgTSnRMKB4OEAIr z0TAL8DJyM100zM5g5hofDk9GfFLu0NYStA5ith7oMK+aFr3hLskyiA89m5J+Ibvey3J N5ZrwRpwhh0NtEg+L9LmoxJcUhxlMN/AkF/h5fapB/f4NpHAzYmhhDnmgvIlTQ77CO81 XLvDse26kr/YozW6ICbUFGEHeRBTNk/ejcK+U41CVzDjwPEXNDlarvc4VXo+yRWQrXYk 6J03RClSKaYxL4Jc1DOSz/+5QM3LdwQzfzBZ+5nEM9yCHbaeeK85ZLQeeTZVZUJjsLAK 0WTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Iy9EGUTA; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gDY9SHDE; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id k1si25530261ilc.40.2020.12.28.08.27.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Iy9EGUTA; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gDY9SHDE; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=HXJoJcs4+xfXFWA1igW1JddGjOEimW4I4/S504N/gzM=; b=Iy9EGUTA1/hf26tUKnDtqnuL7 PIvcfOzPeiJLMavUT7bLv8nPzOYaaOi6vtfBH2UDGZel/DmMewGpmY1njnYY6D8vlVsM1MObO5zSw xs+614W0ykGbpXlc/rgYNCwAVA/x9M50LhAgIMgMlaKV2hvGYousd52XSZsa4jChz7ooBXb8ghyU6 9WgfHzCBxv9vUpaGJB9xdiWfeuj7T/Hs01jsjIKOo5SFPzwxquL1HLqHDUzN/o8H5LjH/lX8UnC4x CYguR2PW3fV8ssoriyAvckxpwLzTiiSehMmgD6aP841Ojll8zjGWG7o+lER7NeM52y/1v/gkW1kkB zlBYXSRQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN3-0004dD-No; Mon, 28 Dec 2020 16:27:45 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN0-0004Zt-Qb for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:43 +0000 Received: by mail-wr1-x432.google.com with SMTP id d26so11721573wrb.12 for ; Mon, 28 Dec 2020 08:27:42 -0800 (PST) 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=/3oMZ0XZXTwR2OTVYcKlJpwlfLbWhAGf9POHgc7WDlA=; b=gDY9SHDEwZjqC5Yd9qSLQtJPQfZoC4Dfg1PYZrp9vO7Ru4H2lyZlbeSkIfDarXy6/o PHZj0iSyKYOXRa+0HAuIKFrLubu0fEA+C6OB3hOfX33qLnsMpEYylxlUS6EThMlLALub iA5PLE6qgNwsEsRepf03KcLGzm75TgwLIGr/MGfY9bx9w87l2GUXnSQVTRY0PSv40GkY c42kvOthOu82NX8GmP3hpthn5fLW6nzpNzB8zs/kc12X7RKpjavNP+xOOsVyOfgDNwTa 8fcUsgXO1KzJr993fIbtVjlmrakiIwrUNcG0riDzcbQzG+wnJfrXH3q7CLhUjtaEkTH7 oRJQ== 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:mime-version:content-transfer-encoding; bh=/3oMZ0XZXTwR2OTVYcKlJpwlfLbWhAGf9POHgc7WDlA=; b=RUl5h6o1sf5xEJymlG3jeBUyvpQtihLLRZ/lPe6L8UCwbAFDSPuYTwHD0xVhTvV99t wFmCHdmgM/f0DSoswZ/Xy/nM/aIMC2Jo6xW0H7Fc6Rm9NfKU8QFYJJsMB+L24pk52/Dm nmSBvd7H5Zp8xuOY2eKi6MXpk7tYZgd4JvAIvkarFdOLV9FUGDNkIlOJUh3ta2X1DVbR tI2gWcx8D87hb26xWBuqgyRHNaz/au9z1pvQ7v53ksUzKOGoAQ0PGdNr77KwYnaRVpdu Uo0WCy94aTy6CL1QaIi06Npi7+TeniIvI2unCwKjNIjYAb5jpjFSIAu2oMj7lR1DdB/S xbsw== X-Gm-Message-State: AOAM532NIF7iz5ZcYZ+RPp9uFKVwUd8Rq0mpy2q60JgRE8fNtXt0dDYT Cm4UxInwXg7RhP6LQogPgBJDYQ== X-Received: by 2002:a5d:67c3:: with SMTP id n3mr51447656wrw.297.1609172861427; Mon, 28 Dec 2020 08:27:41 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:40 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 10/13] wcn36xx: Add GTK offload info to WoWLAN resume Date: Mon, 28 Dec 2020 16:28:36 +0000 Message-Id: <20201228162839.369156-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112742_903188_29B276D2 X-CRM114-Status: GOOD ( 16.49 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:432 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Having enabled GTK rekey in suspend, we need to extract the replay counter from the firmware on resume and perform a ieee80211_gtk_rekey_notify() so that the STA remains verified from the perspective of the AP. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 4 +- drivers/net/wireless/ath/wcn36xx/main.c | 5 +- drivers/net/wireless/ath/wcn36xx/smd.c | 72 +++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.h | 3 ++ 4 files changed, 81 insertions(+), 3 deletions(-) -- 2.29.2 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 1f3c2e840232..455143c4164e 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -4919,7 +4919,7 @@ struct wcn36xx_hal_gtk_offload_rsp_msg { struct wcn36xx_hal_gtk_offload_get_info_req_msg { struct wcn36xx_hal_msg_header header; u8 bss_index; -}; +} __packed; struct wcn36xx_hal_gtk_offload_get_info_rsp_msg { struct wcn36xx_hal_msg_header header; @@ -4943,7 +4943,7 @@ struct wcn36xx_hal_gtk_offload_get_info_rsp_msg { u32 igtk_rekey_count; u8 bss_index; -}; +} __packed; struct dhcp_info { /* Indicates the device mode which indicates about the DHCP activity */ diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index aa2a416daa7f..b48a3f0dcc0b 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -173,7 +173,9 @@ static struct ieee80211_supported_band wcn_band_5ghz = { #ifdef CONFIG_PM static const struct wiphy_wowlan_support wowlan_support = { - .flags = WIPHY_WOWLAN_ANY | WIPHY_WOWLAN_MAGIC_PKT + .flags = WIPHY_WOWLAN_ANY | + WIPHY_WOWLAN_MAGIC_PKT | + WIPHY_WOWLAN_SUPPORTS_GTK_REKEY }; #endif @@ -1149,6 +1151,7 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) goto out; wcn36xx_smd_set_power_params(wcn, false); + wcn36xx_smd_gtk_offload_get_info(wcn, vif); wcn36xx_smd_gtk_offload(wcn, vif, false); wcn36xx_smd_ipv6_ns_offload(wcn, vif, false); wcn36xx_smd_arp_offload(wcn, vif, false); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index db7988176526..dd12575f33c3 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -2886,6 +2886,77 @@ int wcn36xx_smd_gtk_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, return ret; } +static int wcn36xx_smd_gtk_offload_get_info_rsp(struct wcn36xx *wcn, + struct ieee80211_vif *vif) +{ + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + struct wcn36xx_hal_gtk_offload_get_info_rsp_msg *rsp; + __be64 replay_ctr; + + if (wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len)) + return -EIO; + + rsp = (struct wcn36xx_hal_gtk_offload_get_info_rsp_msg *)wcn->hal_buf; + + if (rsp->bss_index != vif_priv->bss_index) { + wcn36xx_err("gtk_offload_info invalid response bss index %d\n", + rsp->bss_index); + return -ENOENT; + } + + replay_ctr = cpu_to_be64(le64_to_cpu(rsp->key_replay_counter)); + if (vif_priv->rekey_data.replay_ctr != rsp->key_replay_counter) { + vif_priv->rekey_data.replay_ctr = rsp->key_replay_counter; + ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid, + (void *)&replay_ctr, GFP_KERNEL); + wcn36xx_dbg(WCN36XX_DBG_HAL, + "GTK replay counter increment %llu\n", + rsp->key_replay_counter); + } + + wcn36xx_dbg(WCN36XX_DBG_HAL, + "gtk offload info status %d last_rekey_status %d " + "replay_counter %llu total_rekey_count %d gtk_rekey_count %d " + "igtk_rekey_count %d bss_index %d\n", + rsp->status, rsp->last_rekey_status, + rsp->key_replay_counter, rsp->total_rekey_count, + rsp->gtk_rekey_count, rsp->igtk_rekey_count, + rsp->bss_index); + + return 0; +} + +int wcn36xx_smd_gtk_offload_get_info(struct wcn36xx *wcn, + struct ieee80211_vif *vif) +{ + struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); + struct wcn36xx_hal_gtk_offload_get_info_req_msg msg_body; + int ret; + + mutex_lock(&wcn->hal_mutex); + + INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ); + + msg_body.bss_index = vif_priv->bss_index; + + PREPARE_HAL_BUF(wcn->hal_buf, msg_body); + + ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); + if (ret) { + wcn36xx_err("Sending gtk_offload_get_info failed\n"); + goto out; + } + ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); + if (ret) { + wcn36xx_err("gtk_offload_get_info failed err=%d\n", ret); + goto out; + } + ret = wcn36xx_smd_gtk_offload_get_info_rsp(wcn, vif); +out: + mutex_unlock(&wcn->hal_mutex); + return ret; +} + int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, void *buf, int len, void *priv, u32 addr) { @@ -2936,6 +3007,7 @@ int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, case WCN36XX_HAL_STOP_SCAN_OFFLOAD_RSP: case WCN36XX_HAL_HOST_OFFLOAD_RSP: case WCN36XX_HAL_GTK_OFFLOAD_RSP: + case WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP: memcpy(wcn->hal_buf, buf, len); wcn->hal_rsp_len = len; complete(&wcn->hal_rsp_compl); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index dd6710672db8..b225c805107c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -156,4 +156,7 @@ int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, int wcn36xx_smd_gtk_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, bool enable); +int wcn36xx_smd_gtk_offload_get_info(struct wcn36xx *wcn, + struct ieee80211_vif *vif); + #endif /* _SMD_H_ */ From patchwork Mon Dec 28 16:28:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352761 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027879ejs; Mon, 28 Dec 2020 08:27:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2tI2Fm0RCD3ZsKK8td2WmOlqIqz0oYq5WgGD1JEF2JWA4pKONX6oKfxyL1rJ7MHO6Nu7R X-Received: by 2002:a92:c5a7:: with SMTP id r7mr43245642ilt.219.1609172868343; Mon, 28 Dec 2020 08:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172868; cv=none; d=google.com; s=arc-20160816; b=WDJLtAdJDVB/sKO0QWEh7ikJUvsOKCY/eS0KTLSbLJuGWRaFdVRsmWtzsbSNKdgG12 abC9D+3CbF7a30VTjRcl6W00usqF6NfeAbLLXeT7C13REcNTi0U0pw5475PSZFfQoCiF 09a0Q87sj2dSmmy9EVaWSgU4p0wn+4hUNAgaLqhM1xqjE82aHZVzMaz6cIUBJB1C9Vbm nTzKnZufvzCmWkc/wwg5A7G/xLmKO8Ai2fII9QP6v9d51wuntiTIj7eqsp7HyvIOtimS wxkeLAyBhidslLaI4zEk7PgAgD8PwUz3gEtjc1BovvoqsmJ4n7KFpv1GJdPv9ziw9LJd Z3HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=oVwxwzIX2tBv4bQpvfqCPMajHbIcawgc4QMWebD9O1k=; b=quam59MYDJxhGHG/0KAXYB9CcYPMNEZP0kU1tJPYRAwjQ3PqjagjjqYeAcYq9FwtBs 6ple/tI7FpgGTChSFjpmLJinNSUg0yZ1YJ5IkipJlcjwesGETeFZAbFpysTE4+ydEUwq lPRCzS6Vw5zCeOMyeA5CWJ59jco3UTJvITIAbpCE0kJmagYeIG2vnSIr/JrKiWqzW7XH qpPjx/Gy7rxKbMwhmKNQNITcBvwjvdcDNqjx7Bfbmvo4WA+o3egoh3NuWB20kfWKhzia /1lDbv5M2Ww6HkMQMVq7k8xI9kIcWDeWkseg6KQO12iMb/SkbtlbB/pYATc023x/SpK1 hJ9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=GQE1+4iK; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=W68ezXvA; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id b14si24693440jat.85.2020.12.28.08.27.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=GQE1+4iK; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=W68ezXvA; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=oVwxwzIX2tBv4bQpvfqCPMajHbIcawgc4QMWebD9O1k=; b=GQE1+4iK7/etIzElmPww2x2V/ caxu06t9qNccSUnUG5UKNicGZY0QOVqgUF3iNz1aCOVRtX9Mf+GEWxwR3X/Lrhtm5fx3mVxva5p+V jDiC97GqYmaWonzgsjlEwvcWAy3QzMZinsrK+abysIqFHGu9pJJOxwvPW7zNZFpDzjOdfLWjHaUFa z40GIBw/fVNQBERTG3R03YnH+2/b7sdW4CpHypJ7gpke5FDEb2Xl+/I4cAucxH+V8Lmu/NWuJ2I92 F+bqyCbZcDV35X7SUqnUI33gQqsu50AQ5rAo3T/YPuz/aiKIJRXJC0e2SR2VPQrFyklUzciYPfwFG ff2SV717A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN4-0004dh-Gp; Mon, 28 Dec 2020 16:27:46 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN1-0004b2-Gb for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:44 +0000 Received: by mail-wr1-x434.google.com with SMTP id d26so11721613wrb.12 for ; Mon, 28 Dec 2020 08:27:43 -0800 (PST) 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=DaRR0s0yK5BJ7snyCgYM3YYfv91qTFP1bIba/mfbIt0=; b=W68ezXvAn1yxyVAM4VLHizolz0Zwdnfq4KSit0A1itMtMF/iQt5vHWpmasiwR8uOY6 iANb9sWGbtrbzeK/2coyGmKHcgTznst/IFmzz58rglUrK3yrf/o0Unk1N9xqCNiv5K9G dVoRFsdMxtSBEIj5/lIAqGdf68XwohXZr4GkE03yD0sx3+Hpjl9Mf1+88LmEFof3f9A5 Gz0UF/f8vOQTFFO9Hi6Ul2dl5n/YNNa9bB7u66lD2wQ/VEWkiAAqdQpxOE5jPQMiNSDM UfTwZj/9RK4nNR1G8vwEERUulwQ/iXCaVMez0lxLzfkiizSQFW0gdJrSrYnJ/mhZ1RyT 3vlA== 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:mime-version:content-transfer-encoding; bh=DaRR0s0yK5BJ7snyCgYM3YYfv91qTFP1bIba/mfbIt0=; b=QvioNdOXgAu1CzecB10Nv+BS/3C6XW5bWypxciOnxKX5S2F8lF4Xpxw9ih/EjstN1o V2Aonb2AAfbixQQJwQkrDX/PmAW9aGMw+3X6LQbwuX+eO/CKqVquitWlMjf7NDHqlaI4 AVFhiydn7I6dCDUkMBsds2WRpUX9JkTDGyl829YRW5NfqB+Kt8xwgqQ1PIgtJ/82MHBD 13xkeVRg6QfM3jZagVmGN2eu7pqSestsubAaEMaaO+kp9rqCoNIrgNaRqDEAM0l5zokc 3YO5bQYU9nWMJFldw6eBxQPJA+P4QdweuQa/vylNH0XHz22HYjAaEWQTjWqyKivdZQu6 v5GA== X-Gm-Message-State: AOAM531sIYgqiFIcwVuKC29yG90Jkg2DEwjE9dURKyhtRqKx3SYueAb/ cBcjtuoVER/4kzufMca250X6lA== X-Received: by 2002:adf:ab56:: with SMTP id r22mr40739831wrc.351.1609172862552; Mon, 28 Dec 2020 08:27:42 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:41 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 11/13] wcn36xx: Do not suspend if scan in progress Date: Mon, 28 Dec 2020 16:28:37 +0000 Message-Id: <20201228162839.369156-12-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112743_611027_5B24CCAB X-CRM114-Status: GOOD ( 13.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:434 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org If a scan is in progress do not attempt to enter into suspend. Allow the scan process to quiesce before proceeding. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 5 +++++ drivers/net/wireless/ath/wcn36xx/smd.c | 13 +++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.h | 2 ++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + 4 files changed, 21 insertions(+) -- 2.29.2 _______________________________________________ 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 b48a3f0dcc0b..feb909192c8e 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1113,6 +1113,11 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) wcn36xx_dbg(WCN36XX_DBG_MAC, "mac suspend\n"); + if (wcn36xx_smd_is_scanning(wcn)) { + ret = -EBUSY; + goto out; + } + mutex_lock(&wcn->conf_mutex); vif = wcn36xx_get_first_vif(wcn); if (vif) { diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index dd12575f33c3..378282a93aa0 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -731,6 +731,7 @@ int wcn36xx_smd_init_scan(struct wcn36xx *wcn, enum wcn36xx_hal_sys_mode mode, wcn36xx_err("hal_init_scan response failed err=%d\n", ret); goto out; } + wcn->scanning = true; out: mutex_unlock(&wcn->hal_mutex); return ret; @@ -807,6 +808,7 @@ int wcn36xx_smd_finish_scan(struct wcn36xx *wcn, mutex_lock(&wcn->hal_mutex); INIT_HAL_MSG(msg_body, WCN36XX_HAL_FINISH_SCAN_REQ); + wcn->scanning = false; msg_body.mode = mode; msg_body.oper_channel = WCN36XX_HW_CHANNEL(wcn); if (vif_priv->bss_index != WCN36XX_HAL_BSS_INVALID_IDX) { @@ -938,6 +940,17 @@ int wcn36xx_smd_stop_hw_scan(struct wcn36xx *wcn) return ret; } +bool wcn36xx_smd_is_scanning(struct wcn36xx *wcn) +{ + bool scanning; + + mutex_lock(&wcn->hal_mutex); + scanning = wcn->scanning; + mutex_unlock(&wcn->hal_mutex); + + return scanning; +} + static int wcn36xx_smd_switch_channel_rsp(void *buf, size_t len) { struct wcn36xx_hal_switch_channel_rsp_msg *rsp; diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index b225c805107c..3488abb201d0 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -159,4 +159,6 @@ int wcn36xx_smd_gtk_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, int wcn36xx_smd_gtk_offload_get_info(struct wcn36xx *wcn, struct ieee80211_vif *vif); +bool wcn36xx_smd_is_scanning(struct wcn36xx *wcn); + #endif /* _SMD_H_ */ diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 6121d8a5641a..36ea768a5203 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -249,6 +249,7 @@ struct wcn36xx { struct ieee80211_vif *sw_scan_vif; struct mutex scan_lock; bool scan_aborted; + bool scanning; /* DXE channels */ struct wcn36xx_dxe_ch dxe_tx_l_ch; /* TX low */ From patchwork Mon Dec 28 16:28:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352763 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027910ejs; Mon, 28 Dec 2020 08:27:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/QK3uU32r/SOSQ7QRQDnDKFuDvkbQ7hIfPHwrNuoQk4P8opj4MPYy+rUjNDfIU8bzO4vh X-Received: by 2002:a92:da82:: with SMTP id u2mr44431776iln.137.1609172871800; Mon, 28 Dec 2020 08:27:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172871; cv=none; d=google.com; s=arc-20160816; b=KHMoAi+r+JbACETLHnyCwIaF7n15S4N7b1ox0nAh/CmFTfgk5FHhWq3g2boB7ejaap IeBn1thb1vUzOg2Vj6mdxjFlX8AqoAWeFrbfr8weozcIIFYDD1P04WpA/kgD12MJXhEb RO4dhX+ss7kKaNaHPPQCxXjRFJWmPkS/6wLRkGXnH0peDi+E7VA5yEGMuRP8HITe+Bpi KfY5rEGnWmGx3F1byjE6/YD1yzdfBF9Z7pukfnJPQVeVW9cZC8jAgVCnnOgCYj4N3p/T 3NRS9qQDGXAvrd6eCB2uLYJFXjZaFzGQayGYNhfuizRsfNBuAdKLOzYiHvuWkdb7EpkE gU/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=tUXECrSONwpDyiV/0P1CqFLsChonBx3/0WMVRhjPjJk=; b=PTcszOX178Wldx6/yFhIidyo6Js21DW/I8tYLOdOuNECilv4cR/+3H4WsxZMnfTxlW 0gx5/XwN0/U3PU3WJAfD97xaTDM9i1bQFLy9BIjjv2F9y8LRjEEvoUqV4emPk3378CkP s2lH44JwUjNGMh17G1B4o1XKHsxVCAx9VD9Rdw4+NbwJ/U+6fI2lYC4C2Xpmnxr4bO6U 3o/trOXfdM+nSOl8CogjWXyfE/4AZBQWPj4TrlLAfs40b4dW/fm411xt4bnqCQ8WlN7K +JaYEeYYHTEtsLB/vHzfKkJnUxZFKVgdIKKWMqi8hZfCpWN1OkoFjxsWnp+RF0kZsh94 QY9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=yBAG6KGH; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Pj7YzXBB; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id w9si26443676ilm.94.2020.12.28.08.27.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=yBAG6KGH; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Pj7YzXBB; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=tUXECrSONwpDyiV/0P1CqFLsChonBx3/0WMVRhjPjJk=; b=yBAG6KGHYRPPJeFjhPmx0beLd dfDnyYl/eyPbP+eL4aKKnLjsm/TuPQBvNUj2NEBl7DBmIPCt90hnJZ30P79JUR6YnqZXPWKtNSPFw 5DnNqkKxIfl8NGugoCN42YzARUftP9mOcVDsCUdOblvIvrzIpGiTzi78Nv1JtNRJ+0gXoGd1Ju4YY YiQN+P8cN0+nkMZyE5RK7VzdF1gC093xvav0VIH+C6e4RgSyeFKhqORcsyQQXuaAsXJQWXixT/BRK KRH+vNl60ghGH0SJ+80KjpteGkyS0HCOGF3dBWVx+/N+uHVU4Sn35i7AYMkYTwexCvmqKPgGSgF71 OPVui3tGQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN5-0004ee-T0; Mon, 28 Dec 2020 16:27:47 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN3-0004cB-1i for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:45 +0000 Received: by mail-wm1-x336.google.com with SMTP id c133so10723087wme.4 for ; Mon, 28 Dec 2020 08:27:44 -0800 (PST) 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=2/sf0TvCOSTx5tivsY1tuBdXidg386Du0OJP+4zFzuI=; b=Pj7YzXBBXro5Okt10fjB6pr1awWUU5epPF2T+flMBEuKCBKkDyiw2D46UhDr0UCC14 JKSkJVjCfcpJkkgr9Z+q1o4Oimy+OAk+OA7i1gyRkFgJPVj5vczFKrz6GgdCR8zAEPj1 DToBAE8FSA5yhdibErba20LK17cloNGREz+iDge38L9w6JIbt0AAuBqAVybD9fW2oqTO HHsKQOhn6Uo1zhaEnGZXrrBMfl6cZfHPql61r/aLY8Wsi60Z4/cePcR4ju/H7/J8DeoC azR4Z0hdiRta45ydB8TcOxmWlxtlfOEQHaJHJbplBgzgOsuIgVdWyvgZvdFEEvIFVU0L yShQ== 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:mime-version:content-transfer-encoding; bh=2/sf0TvCOSTx5tivsY1tuBdXidg386Du0OJP+4zFzuI=; b=OA8WZDZJJp9CLnwZ91qBjs8KRADn2Dw8CDGahLWwnNmyz0zaX+2RvtViGgkF1ThzqS AjpskiNIM+TvPRYoqmVcT5tbbaAAIXSQnVM4IWrq/zWS8XNBTydbMBQOmLeVvMeauMK/ aeEh8knLFmVXNAIr8OrHZPCTlS2UVXscY5vGrMxSeEslDiF2opCCBYdZfh8EC5HkBaYV ZPUDkPDYd3wCuhiqpnYR+5ZVb82hmz8Gz295sPrG0AlwSk78o9pPst3HPefBO4mf2V03 zyzZqQV4m7ujUxFRVROROMlviP+UYJT6LwJybArU08FndkoZpxs2cVXTfy1bAiZvLJFR 5ZEw== X-Gm-Message-State: AOAM530OozSYIb/4PRA8TOeZ5wOj1ISbbcXshk0NP3at/1NFewsguxJX AYhy5lIHFM49wttAX+eDn8LjEQ== X-Received: by 2002:a7b:cd90:: with SMTP id y16mr21524744wmj.115.1609172863690; Mon, 28 Dec 2020 08:27:43 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:43 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 12/13] wcn36xx: Add Host suspend indication support Date: Mon, 28 Dec 2020 16:28:38 +0000 Message-Id: <20201228162839.369156-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112745_145189_29D67D86 X-CRM114-Status: GOOD ( 13.58 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:336 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org In order to activate ipv4 ARP offload, ipv6 NS offload and firmware GTK offload we need to send a unidirectional indication from host to wcn indicating a transition to suspend. Once done, firmware will respond to ARP broadcasts, ipv6 NS lookups and perform GTK rekeys without waking the host. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 3 +++ drivers/net/wireless/ath/wcn36xx/smd.c | 19 +++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.h | 2 ++ 3 files changed, 24 insertions(+) -- 2.29.2 _______________________________________________ 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 feb909192c8e..ec24b0cc5b8c 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1134,6 +1134,9 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow) if (ret) goto out; ret = wcn36xx_smd_set_power_params(wcn, true); + if (ret) + goto out; + ret = wcn36xx_smd_wlan_host_suspend_ind(wcn); } out: mutex_unlock(&wcn->conf_mutex); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 378282a93aa0..5450d56d8e1c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -2970,6 +2970,25 @@ int wcn36xx_smd_gtk_offload_get_info(struct wcn36xx *wcn, return ret; } +int wcn36xx_smd_wlan_host_suspend_ind(struct wcn36xx *wcn) +{ + struct wcn36xx_hal_wlan_host_suspend_ind_msg msg_body; + int ret; + + mutex_lock(&wcn->hal_mutex); + + INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_SUSPEND_IND); + msg_body.configured_mcst_bcst_filter_setting = 0; + msg_body.active_session_count = 1; + PREPARE_HAL_BUF(wcn->hal_buf, msg_body); + + ret = rpmsg_send(wcn->smd_channel, wcn->hal_buf, msg_body.header.len); + + mutex_unlock(&wcn->hal_mutex); + + return ret; +} + int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, void *buf, int len, void *priv, u32 addr) { diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index 3488abb201d0..77efcfa145ec 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -161,4 +161,6 @@ int wcn36xx_smd_gtk_offload_get_info(struct wcn36xx *wcn, bool wcn36xx_smd_is_scanning(struct wcn36xx *wcn); +int wcn36xx_smd_wlan_host_suspend_ind(struct wcn36xx *wcn); + #endif /* _SMD_H_ */ From patchwork Mon Dec 28 16:28:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 352765 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10027937ejs; Mon, 28 Dec 2020 08:27:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9fDw/yJ/wLPA5r09aKbVWjPA++ey+c3dudjDdhNRklMD3n1O1PTaTDvNFuleVc2KDSkpq X-Received: by 2002:a92:ac08:: with SMTP id r8mr43058130ilh.166.1609172874081; Mon, 28 Dec 2020 08:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172874; cv=none; d=google.com; s=arc-20160816; b=g5s4I5OKIsXvWuKPWYa9ld/hWlh7KZ2ikiBaDZrCNzKUZBoCv+gVwjozcDE34HVtKC a4w+9hJuJuOCkACk/w4RVLCXo3CUSTS+jxxWeknSfDOZeBb+OuZUHJXvuw8XwGfutO4o swLxrSqP8xxPnrsaBz8f+22WS7+M2IYKsjgdQk5TE5vMBCpT+IQa9ldOyjb6GWQjqPiD F0PKXngHfQOBAYZb2V4jLGj13FmONVKs4BYZI8NRyWM0Rs2dzLg2Ol2ar5MftM8fjROy rJgJJ/DuvlbbM3t6Be8fFajOmTxgGfYTDrGMibdAb0boiP+c5WOsUanCgJsYwSquAstm /qSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=WY+VLn1NTzhFvova0YzWJV7jFJtMsWguRj5MyOcKXAU=; b=QODwe2rhanibvrp5s1qz9mcr5f65A6VkcaiDL0jaj9jDC3/MVXtU2jZQBBiCPqx1sn IuKYWzE/Qg9yLoMW64j1AAvuGj64W4lL+jKewh9t0gDdIz9YOx2TTrCl7w/2jJ9Y+bth F+TndkvIP1ARvkTLMo01ksxodbf1cyphfY7lSD5vVl6VSbwOblp3LBlfhnItkDlGIM4V 5+YfA7ho8riVmAgV1Jzy1uPKR8GcYGSvchKCyqHI3b5MUuvBV9O+wC0UnGbE4sEMdL4y IoAva1JtTYSaqtM7ZRUp7fVUOOkoNXNWlLr2/csbVciwmG/eCfJItygpL+dAOgidhNPm 7TqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=AO23uI8Q; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VFpSv9qQ; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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 merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id w82si25496290ili.80.2020.12.28.08.27.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=AO23uI8Q; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VFpSv9qQ; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=WY+VLn1NTzhFvova0YzWJV7jFJtMsWguRj5MyOcKXAU=; b=AO23uI8QSaKtviSX6V8fgDv+t 82bg8EsuZ4pOcVDqy+hpmFM6rmzauYbySEg9rgyTrH+PMYpQh1txhcc9rAIFCNAAEOZbWa9k+fQVV +u/2zls6pXMolDBP55p8k9BHMzGt0hO9J0//ujVYlJl+wKcb58Srb3jvQBMc0ur8PE8BmUfT8wGAX 6tHI13dQDpaQzJqorbUe0srxedhuN1WdBTBvMDBJcfc/PkljDNw8ypU6At9WFZxl5lGzR3l4zJYqv eTaVhR3Zx7MITWdJv27e4c/hKvajhyP5KIJ7NWr52uErK00h6DihHusC0Bnp627Z5L2od7gVOsLdh Md/YJsZWQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN6-0004es-EM; Mon, 28 Dec 2020 16:27:48 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktvN3-0004ca-P2 for wcn36xx@lists.infradead.org; Mon, 28 Dec 2020 16:27:46 +0000 Received: by mail-wr1-x42d.google.com with SMTP id i9so11768921wrc.4 for ; Mon, 28 Dec 2020 08:27:45 -0800 (PST) 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=VFlxfdScJISQHEQPsvwi72V6FodBvi35qoUUckJzFhM=; b=VFpSv9qQLSaccEYxNBJkiNrTDCkfCsp9QuL+zJp0/MY99xqzkBMsvIiyPEX1rx8hC2 jwYgblnt27v0Uz8yJblLwtM8z5QBumNrCBS+K9009X1wJjfqVwVyWQAU789vTbcR6rk2 prU+AzGwMIhXHx3ifpjTFR6zchlHJTAKQcKeGZXzOHAxeVjUa5MIPDJe6FOwNSp4N4du 7FUX6hdhIShN4jZkpMkVlF1u+IfiTgJ6QmnpBUOb+F3pUGMMPv7fRxcWONRBBl2ko7nA LwXrFOv0Qi4clbW3T1r8YlTBGCJCH1T6BJznt4xgLadEC06XFxwP6FzxVF6chhY2SKxK 5yRA== 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:mime-version:content-transfer-encoding; bh=VFlxfdScJISQHEQPsvwi72V6FodBvi35qoUUckJzFhM=; b=TiuDNTWxP/6QAczL/Xeo3C5kqOLGcGUbTbHsSIP8oiDIYU+5ylQS3AQ/0LZGal1sJr C3F/u8xazKo5rfJixKYzPa2zyfH4au0MJG2VILokjM4mfLf53T/kmvToZkUJrteFAgRs 1G5I0WIfv1abtdrYd8w+ttlm/WxUm6/Ley1GuOU974UTzm/eYwZ0AFy+LvsHCsy8ZQAj OVxsSu9QSKzv3MY0FbeVIAsSMk4iivE6uWYWTUWwvzJ5ElUnYBEGAvEmZj3siZI8vgWU Big+GHTzPQJXrIIj7R9B+IegP07gbZYlvVMj3Tr9gPksbfFf21QIo2kLRJI4PbLVJrSu PCMg== X-Gm-Message-State: AOAM531EcXwAAL93gmX9/cEzeE7K1O1Q2R7sOtHzdrDlN/VfX43p/202 6g7Zi+VlTRByV4J7wdYno8j72Q== X-Received: by 2002:adf:8184:: with SMTP id 4mr53093783wra.63.1609172864755; Mon, 28 Dec 2020 08:27:44 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id w21sm19523379wmi.45.2020.12.28.08.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 08:27:44 -0800 (PST) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH 13/13] wcn36xx: Add host resume request support Date: Mon, 28 Dec 2020 16:28:39 +0000 Message-Id: <20201228162839.369156-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228162839.369156-1-bryan.odonoghue@linaro.org> References: <20201228162839.369156-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-20201228_112745_855672_41C5DC98 X-CRM114-Status: GOOD ( 14.94 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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:42d listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 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: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org, benl@squareup.com Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit is the corresponding resume() path request to the firmware when resuming. Unlike the suspend() version which is a unidirectional indication, the resume version is a standard request/response. Once the resume() request completes ipv4 ARP, ipv6 NS and GTK rekey offload stop working and can subsequently be rolled back. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 1 + drivers/net/wireless/ath/wcn36xx/smd.c | 35 +++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/smd.h | 2 ++ 3 files changed, 38 insertions(+) -- 2.29.2 _______________________________________________ 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 ec24b0cc5b8c..9a2a6399c8a0 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1158,6 +1158,7 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) if (!vif_priv->sta_assoc) goto out; + wcn36xx_smd_host_resume(wcn); wcn36xx_smd_set_power_params(wcn, false); wcn36xx_smd_gtk_offload_get_info(wcn, vif); wcn36xx_smd_gtk_offload(wcn, vif, false); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 5450d56d8e1c..83452d7f4634 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -2989,6 +2989,40 @@ int wcn36xx_smd_wlan_host_suspend_ind(struct wcn36xx *wcn) return ret; } +int wcn36xx_smd_host_resume(struct wcn36xx *wcn) +{ + struct wcn36xx_hal_wlan_host_resume_req_msg msg_body; + struct wcn36xx_hal_host_resume_rsp_msg *rsp; + int ret; + + mutex_lock(&wcn->hal_mutex); + + INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_RESUME_REQ); + msg_body.configured_mcst_bcst_filter_setting = 0; + + PREPARE_HAL_BUF(wcn->hal_buf, msg_body); + + ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); + if (ret) { + wcn36xx_err("Sending wlan_host_resume failed\n"); + goto out; + } + ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); + if (ret) { + wcn36xx_err("wlan_host_resume err=%d\n", ret); + goto out; + } + + rsp = (struct wcn36xx_hal_host_resume_rsp_msg *)wcn->hal_buf; + if (rsp->status) + wcn36xx_warn("wlan_host_resume status=%d\n", rsp->status); + +out: + mutex_unlock(&wcn->hal_mutex); + + return ret; +} + int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, void *buf, int len, void *priv, u32 addr) { @@ -3040,6 +3074,7 @@ int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev, case WCN36XX_HAL_HOST_OFFLOAD_RSP: case WCN36XX_HAL_GTK_OFFLOAD_RSP: case WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP: + case WCN36XX_HAL_HOST_RESUME_RSP: memcpy(wcn->hal_buf, buf, len); wcn->hal_rsp_len = len; complete(&wcn->hal_rsp_compl); diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index 77efcfa145ec..6dfed8f386d9 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -163,4 +163,6 @@ bool wcn36xx_smd_is_scanning(struct wcn36xx *wcn); int wcn36xx_smd_wlan_host_suspend_ind(struct wcn36xx *wcn); +int wcn36xx_smd_host_resume(struct wcn36xx *wcn); + #endif /* _SMD_H_ */