From patchwork Tue Sep 8 18:25:10 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: 249332 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791805ilg; Tue, 8 Sep 2020 11:24:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT/ctB0icAwVCY0c+GMzDS5lBBPcJsH+AZWNfmdqh5GjEoW50tMgffdS/DVF6N+kvwuYHt X-Received: by 2002:a92:1e0d:: with SMTP id e13mr65766ile.66.1599589473900; Tue, 08 Sep 2020 11:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589473; cv=none; d=google.com; s=arc-20160816; b=nyGfmzqoXXCubwnB23QZI6d9gWG+ksDLx1HWNSenFwFVJl65CfvaNQawG520Skkk7f lEuZIsNBvxGjsXZOAkEXFBC1wXvp7Nwa9gDcV2uPWn3/FW6nYFRIfY+5nBxU90fUNy6K 147FAMUB7Qgt6Qy97Ts06Cjz3dgqn2qMZCPSKYXj9YEwTBQIxwwZlCO/O0e53kBwqDsv JwOPvm2MjxvYD4vchqEDeZFH4/4JWickgZfKdz/qXULrwkMSLvQKo3hviKbFcLBy2Wjv +1VlOh+YK1Gc4bHpuKKhZVUubdlrEvFrbQsKyN2lxPLPrD4jOXT/a/LpQnRmyRzIw8BT n8Pg== 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=flXNHQYuvE/kP9x2ix+60tIaj+7wI5SXY3ip5wDBkGM=; b=bFNnfzm9SGqgr1yavY8OaPCg7553zWU7U/rVdHuopA0jmIQMrK2hWdYI+xtPVWvNAo 7jmCyxUU9NCLUwCC7ZDzQEoqRxO6aQhUtwU8GRpPvv7tCjAt5rluSG0nWx64I9yOBsYO EFIPHPAm5SxLi91vW31XnNyj2wc/Qot0LZ2xErBOJ8y5D3xU3ZlgCj9+oja2YL41lPhW GGLqLaaJ0yY+MlKj0lyficaWWD1j9h12jiE4ROXKDthosUmZLRO7swWlyO85vJF+RUiB 7Es9TNEWcWEt6nPg5H8302Kh6qCR3/j36Fc+hxPLOfRgvJO/M3SB3crTkETnHUvnNv8n htMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=FqeXXV7w; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=vfytRyIW; 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 t13si17339966jaj.13.2020.09.08.11.24.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:33 -0700 (PDT) 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=FqeXXV7w; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=vfytRyIW; 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=flXNHQYuvE/kP9x2ix+60tIaj+7wI5SXY3ip5wDBkGM=; b=FqeXXV7wgyIwu8CPvbeVxOF39 LbCn1HNONKaD592vfV34pG0U8a1J4AQP3Nn2n941Ltqsjlj1gFxcC6frpKRnKX2xHYnG/CJ/0kQWD 6zCDBkpeQ317Djuuq6Q01j9CKeYmTALi3Y4QIiaoPJ0orK2FnbdDn0rXD2lSz3hzSFUK7Valrb9PO OUJvIwyuQVNDLLV8IEZDeL+esyB2enMkG+ozO2nNkTSarMDdRUeBXW103XZRYzH9iwenYznXaVj4D 59N6RbY+28lKygk+T16OYtk7IAiU3sFpVXNUrmoI9yJ5nQOqi6c5K1HxmabSDqd1De5K7enq8QUiM Oe4UboGSQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIA-0005I7-PF; Tue, 08 Sep 2020 18:24:30 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiI9-0005Gl-AG for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:29 +0000 Received: by mail-wr1-x444.google.com with SMTP id s12so194589wrw.11 for ; Tue, 08 Sep 2020 11:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yBk3qb6esZU21s8yt3ET2KrYd742m2TmS8YznjO4lK8=; b=vfytRyIWj9sZ1Y6Pgz4Y1o9VVwDmzeiVbWWGa0+XVFHMhQ662ftEfe/xnNCbSdlgBF YNtKCqHg5p9RrjJkZXPMXXoPS/QhQ6qzEIwOlnTmndpCo+a/sNt8K+bRYKGdLvh2sw2m oaLAzdMD55kPkR6Hqxn8HxdQqyoe3O1XkLNVOiId35WEkHUaxM9H3gGUni/EsTj8sxVI X7UIvLBXaigqQax5r5PM0Ihrg4/oKSnFdgyvAA0SL6Ru3pHefBOSCp8tcRB/MupVkYN8 JNKRGGMhyPdbTRPC9VRbSHnMnXS4Axy8qOG8TxsXZjw878u9dhyWfnRGyZtB1ucgP+p7 pmvA== 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=yBk3qb6esZU21s8yt3ET2KrYd742m2TmS8YznjO4lK8=; b=AJXSRyDYaH5rsWI3kX80OsXNbYzkNEUz89HN5ih8gWnQlrwfIJUOSerB6OSe6Zo7IO Sk4f3o7J6rApczZzBPNz8cSdHLgRy8l4WeymDCIx9UYi/20RIyjvw7/RSHem1a4WJRhG yNPNLD7S6kZHvjqX8dt6td12HhUwkFnp6Rqnvv9DGXVQeGwKqIjSc1WNPdK2jCkaRH7V Li5kVFiaD9R9yiks5l1H43xUnZLCDWZIa5t6qnQydgW2fsGVcFhTul59GOMipYXWjKbo fMsvSShXYNMzDbVmoVqmmaKIl0HGPLLbSivqdo6eRtTX3xfUOJoQcDf+RHjYWbSCryZu VSgQ== X-Gm-Message-State: AOAM530lHjQGkQQDPkNqvmuQdwywjgzmGq31GRSmPr0qOLA/VQ8MX6hq XI8MbHnw02peUKn1oIXBj94uvg== X-Received: by 2002:adf:fe42:: with SMTP id m2mr860212wrs.367.1599589468376; Tue, 08 Sep 2020 11:24:28 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id f14sm352447wrv.72.2020.09.08.11.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:27 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 1/5] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Date: Tue, 8 Sep 2020 19:25:10 +0100 Message-Id: <20200908182514.2870410-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182514.2870410-1-bryan.odonoghue@linaro.org> References: <20200908182514.2870410-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-20200908_142429_370518_18F85847 X-CRM114-Status: GOOD ( 12.82 ) 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:444 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 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 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Adds HW_VALUE_CHANNEL(hw_value) an access macro that will be used to extract the channel number from struct ieee80211_channel->hw_value in preparation for also storing PHY settings for 802.11ac in the upper bits of hw_value. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 2da81d9926c4..ebce1ed7adf7 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,7 +83,9 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; -#define WCN36XX_HW_CHANNEL(__wcn) (__wcn->hw->conf.chandef.chan->hw_value) +#define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) +#define WCN36XX_HW_CHANNEL(__wcn)\ + HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) #define WCN36XX_BAND(__wcn) (__wcn->hw->conf.chandef.chan->band) #define WCN36XX_CENTER_FREQ(__wcn) (__wcn->hw->conf.chandef.chan->center_freq) #define WCN36XX_LISTEN_INTERVAL(__wcn) (__wcn->hw->conf.listen_interval) From patchwork Tue Sep 8 18:25:11 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: 249333 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791827ilg; Tue, 8 Sep 2020 11:24:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX0eXKk4keiYDMUpMO/QD4eBZa9lPjHm3AR4SPBuyINdzd5unFxe3nuiTMI/9Ts07vZTBH X-Received: by 2002:a02:3445:: with SMTP id z5mr233511jaz.134.1599589475396; Tue, 08 Sep 2020 11:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589475; cv=none; d=google.com; s=arc-20160816; b=FwIzPIdBI7R/svuVq7OX7bhd02/sBAxhbA2s7AdI/xErg8zMoZeHrG6/uiaaG3eWCe gTk0AOFAyY1MLDyGl0wsuAh2af2JJXfIvB0D0Ic+LutJ3/+xY/B9YQWhSgTNJPD0fGqF lq3ogHXhKJN9knrwPhN0E+vqe42FhpDC3bMIMt++bLbX9pgD7lAP+3tA8QNX7BGotvYW KQ9cIsyeaqdZ63X+RNLjbXO97NlNwWlYw9lFVmv3S6TDg0Q4+BiTLp8str0LvClv9+oi 3DSZ6WfQ+9ACdl0kIr1axqNAT6HpqTr6G7nyMGx3FhZV7SRS0ULiRwMBcNWU1bzoXa0n X50g== 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=vRb9QufzR3bbLErzrUL5Jja4TdQVOnZs6zmDOlDW2Zg=; b=YfOt88yNE8djAIYS6SEKA+xQJ3vtScSa5FCQS5d9H1zMPhdJ6tp3OVO2gCdQKdWmzl MiULwYXEFKabUU9oW3opiz7mHzXF9/LIBEyIoVFdUm4aEu2IbrgSGOSnWsqP/k0OKpX5 nausA8bkzniB1umibGwaolL6+25SkN8kBbXBlSVX39lsmjIddtM+f0EQWg4N1Dv5F0Y/ wkNcqCMfGJXL2EBBA73+Ah7qKvxACDhVBEPeIcP09yiz4URBBT7VrFjz4zZdtybnjg4G lXMcNAJKwUdKdSQYzKadm9p7H2zgiDxzbQNMORAG99DMcU+jJE0v3h3uB9qQjZfmK353 fduA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=TpBxNOyV; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ac8uAcsV; 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 l9si203681ilf.60.2020.09.08.11.24.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:35 -0700 (PDT) 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=TpBxNOyV; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ac8uAcsV; 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=vRb9QufzR3bbLErzrUL5Jja4TdQVOnZs6zmDOlDW2Zg=; b=TpBxNOyV1nVFc9dHA6fFix3Nu jdLAwPS1w2Jq/H8fxUQ1wIeXwxqHYrqQGd0EEw+THZT/vzBaelHWnjuGgjPSsTymbUcQIQKiiygj/ Kmd/3+RuvGvV7J/hImxHqMy9DGNGQN/C1AjrcubkXk2ZAx2mBkjN8BUsJpSehFo8IAmASrmvgF1Y0 WrjGnRnsKtkFRFp/zD7wSZ0nJqiFkM9/xjfBbwUUNL9X4OydYUL9KBJLFDq6YheI238qIab52yjNu KMnky0NvwUU4tjoGq2gU60GeGbaVvY7ggjxZZGOY0Yy1qDfM1OzJYaZOq9ABP+J0TAaphUKPfNJ0J FLbZtuVjg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIC-0005Ir-9N; Tue, 08 Sep 2020 18:24:32 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIA-0005HL-8z for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:31 +0000 Received: by mail-wm1-x344.google.com with SMTP id a9so310842wmm.2 for ; Tue, 08 Sep 2020 11:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gaKj9UYwL9cF8yxrv9sO92SpT2Gzz1dlnqtTFbOc6oo=; b=Ac8uAcsVs78nGTpERZdQVEDRlMPFk9nHjRFW8vO3Q8BY19VU8uIVYp1C4MmQLbl5r6 AfTE6qHyGR/yUSNBlYF3m5fpFYXNYSXbLf7dOOlPhUZQZXMzeTvW2j0hb9cnrGXdVnCh zVh3aK+L2yQlmZgyPeH10xOnHudgyMm7Kw5VBHYcLLIln6IRECY3iE0tw4MgxbKOx+26 ovkg6SbIqzPaKUwYW+atKVSBp6JQB9PxmFJuEmXoWIT9010T+a6twRQgj7ZIRmf0pLqf 65cq2eszl5i23tPZ03vS05vtjqWxUuoQ4MahTcGbNwxhG1yh7yDp4Qd40ShplOdHDkJs cQYw== 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=gaKj9UYwL9cF8yxrv9sO92SpT2Gzz1dlnqtTFbOc6oo=; b=NVUuSpRkW+PAEsbbm+HyOUSDGGqOf/jdwvG7X3rfy3/Ms3xiALLX7qJ8dIEYm5ldDr q4EjqiU6bEuFujXiB0o4KwaPCTY0+LXcr9j7wLCPPUSI0kDg+nJOkQKl30nWVgWj9hMr m+0sizprEE49QC3VW1NF0G+uFxNi41iWQ97GSBTAQ3+cX7IIWH+ItLuZi9OoaEUD37YR 40CGSErdolsO81UlAoqDF2cDqE6q07P8EQjcbzRaoDg0lAcCxs0HVVwLHWQFZT/DawVL EwmoDnwdpQtge3tf15Npm+5cBUdWHd8ndvdE9TiJOinW8DZW8ykRukF1rMeoGQ18YQ8m VUlQ== X-Gm-Message-State: AOAM531YV1llZSaYa/xrna89ZeHMaM3znzBuzfExsKln7ARMO9p/i6Lg McsZo5+OSnrIQ51b4x+4sm26IQ== X-Received: by 2002:a05:600c:2146:: with SMTP id v6mr347813wml.159.1599589469352; Tue, 08 Sep 2020 11:24:29 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id f14sm352447wrv.72.2020.09.08.11.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:28 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 2/5] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Date: Tue, 8 Sep 2020 19:25:11 +0100 Message-Id: <20200908182514.2870410-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182514.2870410-1-bryan.odonoghue@linaro.org> References: <20200908182514.2870410-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-20200908_142430_368566_825EA755 X-CRM114-Status: GOOD ( 13.00 ) 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:344 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 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 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Uses HW_VALUE_CHANNEL() to extract the channel number from a struct ieee80211_channel->hw_value. Once done we can use the upper bits of the hw_value to encode PHY related data. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 2bb1803ed06a..1496566ecb31 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -758,8 +758,10 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif, msg_body->num_channel = min_t(u8, req->n_channels, sizeof(msg_body->channels)); - for (i = 0; i < msg_body->num_channel; i++) - msg_body->channels[i] = req->channels[i]->hw_value; + for (i = 0; i < msg_body->num_channel; i++) { + msg_body->channels[i] = + HW_VALUE_CHANNEL(req->channels[i]->hw_value); + } msg_body->header.len -= WCN36XX_MAX_SCAN_IE_LEN; From patchwork Tue Sep 8 18:25:12 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: 249334 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791858ilg; Tue, 8 Sep 2020 11:24:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc+JM3PNwGobyX06zdvh5pTlz8IBY5x0XgRjwpFhrRZMhcfeDPtXiUSFJ+yjd5sFG1lk+u X-Received: by 2002:a92:d188:: with SMTP id z8mr45034ilz.292.1599589478002; Tue, 08 Sep 2020 11:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589477; cv=none; d=google.com; s=arc-20160816; b=A+UdXrU1cthaDusTFWgo3zP1gj8l5GwP9XOYGEW4s8bedLOh0CuAPsEjU2DzO3D20M tdgA2o75jcbvbjovdxktXm2EJe/XSlyj1dVcZEZAZOMAgYtTKQwCqasFsrDVHBaRPZLe IAVqEPV7z2/hBTih1LyPCdG95iohTikOSwdaTlr+x2MdmX1GULmJJXAtLjMHilaqCVKM q9nankAwtzApPMT9ohhEpl5Zm0ENI3khhZuE8ltKhZd7BPJMWKCkAvosPpbMM2029ddA xWil54rhU4JZ3G47/3q4tkbjOJFLNbxagr7szPFcTy/RQZGuY67Hz7s/49BB/hnTRTCK mRJA== 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=24BKZVtj12JRlleNm6PPRQzhJdaLhvOx7jvBAIsYZMo=; b=GH0Yb5duaN5h8uewYUViE019JEb9h//zc898kPWrMMgYIYYuguL337dwibWiUg0o91 7onlsodPbWrshk6OgkMPcXwRnt49nrcJ46HsS3gkdrX8JnE8uq8/aJBHxLAYJWpTDwSo TnWgHyqWZ1V1jpEsGItmN4bbe7Eggz/X2jjudWXw9mQBdiTQdNExxKnBfYnJ0H+pz0oe GjV9l93zENYz/5PiYW18VYvvSMEcvJn1AzKVTnGwO4QGrE7EvGs2a5pL+pRPLitZZ0Lx m8oTugM678jRRpnWyygPF01d/lXZD14BgmGvfGtWleCCPGwpKzZUoE1Q7DxcJTyJfjiT owZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=sNONaGjK; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="sJ3q/QCw"; 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 l10si17206712jad.28.2020.09.08.11.24.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:37 -0700 (PDT) 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=sNONaGjK; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="sJ3q/QCw"; 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=24BKZVtj12JRlleNm6PPRQzhJdaLhvOx7jvBAIsYZMo=; b=sNONaGjKq7UT11JiZ2A8+x8d0 u6hUxM+k9eZu+l5zMEBWxB9QafxcmonIyUubyWW+a2Irgo3cSOGob+SRfa0oASyE5zTcXDcvT3Ayt mVdNnCe+AWLmiK969fCbyjpQcDtZxAbuO9GV8mjbWcZu9WF9cF5jJWDuuryV8ehzkNQ9cZNn0F4Pk Lspk7GoEcLdlTD5XlY3Gahn0tXovBwX2Zxq8yF+CjuQdwg+cPKmQJ82v/hXnS7XL2CPhZjgVNxCc1 rzoNDfXhLtIJG11ysI5v/pZvV2LDpQ68IRc5sFQiSjS8SRF4psgbYds0BRqbyh7hsGQpoXJRBQE1G 8nNWQUpBQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIE-0005Ke-SK; Tue, 08 Sep 2020 18:24:34 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIC-0005Ib-PV for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:33 +0000 Received: by mail-wm1-x32c.google.com with SMTP id a9so310903wmm.2 for ; Tue, 08 Sep 2020 11:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gyyyc+eVVPBc5oNmWeDufnX8Vdj7EzlctFSImbJVqV4=; b=sJ3q/QCwIc5SBl90sX76a7rYUxHXmw/hI2OdDgqa5uMO6+nU0PVtWNBiGXjLUpnJRs 4DKButEsv7yhTfdhYOLclK/k1Z7zaFL+0dapLwIL36vAU9naeeQtEWstLCA6uHtJ8ADD Sm9csVq9dWl0ddjzV6ykuPGWVoSBHZFjHwStRBeAsZMjbwJQmO4w9hHS2qWTJgjnw3ka la6A6F010eJ6r+IWIk7vl1BUtg3+Wl1061az25RqR51HQdEQxRCgDaHex4CtgwkhTh76 Ba2W0NoiDL4Hyn22esZN7ZvoK2VuEYzUsgAOaiyE1bPJ1T3+3hCk+fwcVBQ2hJRAv0pi OVOA== 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=gyyyc+eVVPBc5oNmWeDufnX8Vdj7EzlctFSImbJVqV4=; b=rrgvf27H9X9PhGuELj5+bWE1yo3Jw6Y7bvlZ5TwcnTAijcL5wblv2Pd/7+6ZZ9Krdf wcrY3yfKOu9A9Mggz+LVrNeyduroy4A1fcNOqasGrolN/JoL89C0UiG0aG2QKHzfam8N W/hX0BrXpoWmNeJRN/PnOCQGhB39yWJqXQ2s392s3s5bi7dBOHt7J6sGufAxZ1XxCnga Ha2P95IPkk7E27L95UL2UpVZrakK8IYamY5iiRyRAZ0bwh6AQ1LcSlsWU0kufsoH6i1Z oEFELpQS8qlh3j2XEL2wsR6UeqpOoyIXj2U0fGnv9yciq+H9rjZZWiEBHtXJsJeDOLp2 YOSw== X-Gm-Message-State: AOAM532N4RS1iCWWuGsYSYKaURDOjLdzEA2aRbmv6q6bYVodoKKOGnDx Ug+wKVCoINlNDNZk4EysUXKHIQ== X-Received: by 2002:a1c:9ed8:: with SMTP id h207mr409361wme.116.1599589471144; Tue, 08 Sep 2020 11:24:31 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id f14sm352447wrv.72.2020.09.08.11.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:30 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 3/5] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Date: Tue, 8 Sep 2020 19:25:12 +0100 Message-Id: <20200908182514.2870410-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182514.2870410-1-bryan.odonoghue@linaro.org> References: <20200908182514.2870410-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-20200908_142432_872400_13F504F1 X-CRM114-Status: GOOD ( 12.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:32c 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 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 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Adds HW_VALUE_PHY(hw_value) an access macro that will be used to extract a hardware specific PHY setting for a given channel. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index ebce1ed7adf7..71fa9992b118 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,6 +83,8 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; +#define HW_VALUE_PHY_SHIFT 8 +#define HW_VALUE_PHY(hw_value) ((hw_value) >> HW_VALUE_PHY_SHIFT) #define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) #define WCN36XX_HW_CHANNEL(__wcn)\ HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) From patchwork Tue Sep 8 18:25:13 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: 249335 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791870ilg; Tue, 8 Sep 2020 11:24:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwylfbbXFHRlKmReHNDSd099mUsQ/WL8KTXl8NFeHJpIZZU7ISGTlI9RQoQAhmOcyC3JQl X-Received: by 2002:a05:6e02:66f:: with SMTP id l15mr50428ilt.234.1599589478862; Tue, 08 Sep 2020 11:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589478; cv=none; d=google.com; s=arc-20160816; b=M1aFLZIoTWqN+kmRMA0pW7GdmncB1yMCsnMhILmQjB0sIrjxIW7EjrtLGrCsvlSvxK 0l/eXjntEOO/rutxUlAE9EoMhTzV5BTkv5Sm75WlX2/7P+pdRK0hEMAipXhazZeyQIPc OaPztb0iwvgL1RJNZuCuhYUmb6Caiymd3ij/zjenjg6DYqhUidV2HkVyMa9Go8NeEaju +T67sPEir6hw8c6QZ4QZQc9CZFOD7i2cJ92F+Nm19eg+guP/FOLVqp0j3P5ZFHiiSqVb KzDziX3FMjqusgOBFkTOT578+K9uL8VLvnpMzjzLqMgY8iqbR6Z8iZyoGZOmSO8qQujT 4ojA== 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=7RFJrqp0m0HBg/5Ihod6aOPb+Foa/JoostYtuwJ69/U=; b=PEnVilMe9+09xWUphElFG25HKSYC2Cq5sxrRq/3cgf3Z2dJCtusqxpzl44ECRHFXXr zHLz5YNKw2VqarGwcqhdIniDgRZIRkL0SOyh67H4xdJRkNd/rx0dVG++dpC28pnjVhvR HZPDcrW/VOJgC5+rIMk7OHc/SnNxdoZW/Ov0noI5tm/D0Cv5Te83axHC7neAXtSQgnLp kytvxXaa0HvekZ//OJYp5SKFIL1ATKW9crtWP1sSR7CaTCZWXnC7hiip10ozGDGt98wE TUACcOtrExfSVpH7au1qvkdXCV+31fd+n0psVRBwVKIOYFaCrU0u/GYAAGTmJng+t3ll EbqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=IHZtoy6n; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="eM/nGswS"; 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 z2si14291946jaq.6.2020.09.08.11.24.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:38 -0700 (PDT) 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=IHZtoy6n; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="eM/nGswS"; 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=7RFJrqp0m0HBg/5Ihod6aOPb+Foa/JoostYtuwJ69/U=; b=IHZtoy6nPyzcc39cS0d7fUDce FY7E/SdXv2NWVqCfpvW43CEFliiafalUI2wm1O0psEx/qRsNcJMgi2DVooYFkW8fxmyoajI6oj8Jr tj/gT111MGTdtzdMAf0QTWyZ+4O3gXNRcEAaCzPFJlqJxMBDBsyc0nKi3A0C+eXGLITqdUHMn90Iw v727XEW2Zuh3E4w5/2Y27yNlYtwmc/1t29otNByKjQv0mfx2+D7tHBTW4Cvt2wN0SecftnzuSAtGX Xi4sjW57WmoXECOcKEPqTVSD6htxc08UvL7VvpSznn4VrVIhJKcmFq/3oSSjGLWMcGw41uiiCd8pp 2iuo5E8Tw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIF-0005Ky-Ie; Tue, 08 Sep 2020 18:24:35 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiID-0005JD-CG for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:34 +0000 Received: by mail-wm1-x343.google.com with SMTP id z9so313055wmk.1 for ; Tue, 08 Sep 2020 11:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mrTOqER7Ro+hee8gyXLo9S/3xLKcWq5aNxrYU4kgAEA=; b=eM/nGswSaJQtep9usH63Ja+wpPAhQ+zIKb8VCATdPqi3jbLtCrM2NZ3edq6PtLr1c2 UF7u+82n5N6B8CZjewP5FnNRH5gUVjrpuRRPrMyH7Fg2gfyJqMS8nVlUM/Y9zx1U2KxJ W15bk5wPavz5Vru0hyJyrqPYnj5Zchc2mVbtBSP3SCZtusYkNdxxaDK46Stl1gTwBolC OAskN1Jd8VayZnqzYdUAld5tHQSFu7258BkR7jPjonlfk/XxX3edXeboToXN1V5cn5n5 MV2rTOBnJztCJg6MxQlyqSfcAIwKTxSH9zDdAVU1N1TuxEWnOilolxPMp/3TvYJritXL ye5Q== 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=mrTOqER7Ro+hee8gyXLo9S/3xLKcWq5aNxrYU4kgAEA=; b=bP4c29Vk9P8f+/2zy6i335WP+sNDgIIa37t5KpiFrezM5BQZgln8l2nZzCibkvZlMm hHFrcnwoXa9ORl/v4R8RYOh6j+NrBOBY3kqDT3sqtZ9g0R1qiDmYvoRIVv1KPs1GVpaR hN28pkSfOrJa24UDzB3aZBjNlizIdGYYivuGSknTMFLd+N6D1miXvlDU9DoKbLPxIAA6 nd+dN+ISPAztUVoAuVc/3FDkODYv/7hyavJS32t02P0qx+bK8dhL7tc1YzZO32V/MwA5 t93vjiGZkxFO532HjGTMpKR3TD0Xqe4LSAwgoqbHiLiIS/Rg53dWiFLWE6+IYwt92Imk oIqw== X-Gm-Message-State: AOAM531GdpV8y+2elR09THuS9kCSazMGfLyrzj+L6xb9TSAkoZKMD4sD vEEysFJeS0HsAwXDf0Kv7/y3uw== X-Received: by 2002:a05:600c:2155:: with SMTP id v21mr422856wml.118.1599589472460; Tue, 08 Sep 2020 11:24:32 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id f14sm352447wrv.72.2020.09.08.11.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:31 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Tue, 8 Sep 2020 19:25:13 +0100 Message-Id: <20200908182514.2870410-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182514.2870410-1-bryan.odonoghue@linaro.org> References: <20200908182514.2870410-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-20200908_142433_418650_210577B5 X-CRM114-Status: GOOD ( 13.00 ) 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:343 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 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 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit encodes the 802.11ac PHY mode for a given channel in the upper bits of the hw_value field. This allows for a neat read-out and application of the relevant PHY setting. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index ba37439352a7..2c2b6178c8cd 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -39,10 +39,10 @@ MODULE_PARM_DESC(debug_mask, "Debugging mask"); .max_power = 25, \ } -#define CHAN5G(_freq, _idx) { \ +#define CHAN5G(_freq, _idx, _phy_val) { \ .band = NL80211_BAND_5GHZ, \ .center_freq = (_freq), \ - .hw_value = (_idx), \ + .hw_value = (_phy_val) << HW_VALUE_PHY_SHIFT | HW_VALUE_CHANNEL(_idx), \ .max_power = 25, \ } @@ -67,29 +67,29 @@ static struct ieee80211_channel wcn_2ghz_channels[] = { }; static struct ieee80211_channel wcn_5ghz_channels[] = { - CHAN5G(5180, 36), - CHAN5G(5200, 40), - CHAN5G(5220, 44), - CHAN5G(5240, 48), - CHAN5G(5260, 52), - CHAN5G(5280, 56), - CHAN5G(5300, 60), - CHAN5G(5320, 64), - CHAN5G(5500, 100), - CHAN5G(5520, 104), - CHAN5G(5540, 108), - CHAN5G(5560, 112), - CHAN5G(5580, 116), - CHAN5G(5600, 120), - CHAN5G(5620, 124), - CHAN5G(5640, 128), - CHAN5G(5660, 132), - CHAN5G(5700, 140), - CHAN5G(5745, 149), - CHAN5G(5765, 153), - CHAN5G(5785, 157), - CHAN5G(5805, 161), - CHAN5G(5825, 165) + CHAN5G(5180, 36, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5200, 40, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5220, 44, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5240, 48, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5260, 52, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5280, 56, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5300, 60, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5320, 64, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5500, 100, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5520, 104, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5540, 108, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5560, 112, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5580, 116, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5600, 120, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5620, 124, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5640, 128, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5660, 132, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5700, 140, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5745, 149, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5765, 153, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5785, 157, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5805, 161, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5825, 165, 0) }; #define RATE(_bitrate, _hw_rate, _flags) { \ From patchwork Tue Sep 8 18:25:14 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: 249336 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791884ilg; Tue, 8 Sep 2020 11:24:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlQ7brupLUnoc3TcyEAzYpvQHM6VNhqbBb8TEv3lUSlU7rMeSnywoKE2kNkg5gbzVwSr1u X-Received: by 2002:a05:6602:2e81:: with SMTP id m1mr148647iow.64.1599589479892; Tue, 08 Sep 2020 11:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589479; cv=none; d=google.com; s=arc-20160816; b=o+d6urE5oKm3qheONuXvA7n44SepUq+hfeAp4Rmh1cbDFeKl6QCNqmXTk2HlXzGpBv K940f0VG6KL0bQcdyZCOVl6pK/6zYpSmTABRMGrwNosjy69UbAaizWR7kzTxNqFMNE+P VIuY+W7qm91P6vX5opmUoq7gEMTssc8XkHISKXusNJjko+LxMhAh36MUw4v37CreYlsB IOVjEbPkhRfTcBFXUIC02HPUlmQr0A2LUEAdN2NYh/CKlgPlAkOdDYQbinqz4GAb6IAA Oh3EpurNdz+Iqbzt/hcvXNL7CnQtuSPOyT7/PZyMUtWSXA4TWOi6EjMQswj9gwZsiDFW 15dQ== 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=I05txQgasHej7ubvx+21Y2r/S3ajalfk8IASMaX6RI0=; b=oEThVm+k61Dxah56fJxO6bofvK7q9Sgrw4fYmsW+07ZRiJq7JHiVcVdWgLDja4IdoR qabcRCMIRWKG5Y518gX+j/8nENs/IqXMtjUz2zcxclI6TPUcqnF1vZlHDIn89y5cgZfN ejNbfXnxOpY8lxhrxE/uxLx3Ze7B5lPCAJtA1EKWc+gKtkQ3poDG3gipBvx4yCBGVbQf iWFFhBfnGdtGK2tBxWHZSkWmthQTN9uyOWisg8tG4eX3nRGEEuvalFymQAJ/dXA/sqMG ZDzlYgeE/cpBRFypg5zl0rcsbQRBUmgfGTrvscNbLyp1IhgVBopnnmbR+MuGADcmFb0l Pnow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b="eobcc1/E"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=l8+7oeDr; 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 a12si14242460jac.29.2020.09.08.11.24.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:39 -0700 (PDT) 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="eobcc1/E"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=l8+7oeDr; 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=I05txQgasHej7ubvx+21Y2r/S3ajalfk8IASMaX6RI0=; b=eobcc1/E7O+1IPutesQvLjjud i0LCerViwiFq7Obrm9Paig8rhynwaOHlxkx/oB8UPeo2I/TkTOuBS0h2I8UHb5wndFXkesNRvYeyM spMcN5qh9NNpOEQiT5cTWhL8CPWyZDFwjXQG2YzsL86EH57e2HDoLN8FAIOPwRN9NHt4Zo4FemFfM bWx1ckQCI9vMFyiKvbqHRYjaLIASAqdSPU0m6pZZGkUxcVSB4uW58JTpwLQejiyJ9fSw+/PGacotm 5UUnQ1PJsAhSXUQA89n9rQAyT/qNklYSHT7rMOP0vH2Kl8dpAlVwoLq3FpSNVD4If2CV1n0PwlYoG z2JyjmGcw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIG-0005Lh-VC; Tue, 08 Sep 2020 18:24:37 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIE-0005Jt-7p for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:35 +0000 Received: by mail-wr1-x442.google.com with SMTP id k15so198105wrn.10 for ; Tue, 08 Sep 2020 11:24:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IRlqLg9pl8OW4kRzEvgaiZLGm2xa7Kg6ZD9o++l3c7g=; b=l8+7oeDru28u2/5tvVbKvdcQgatZk1l5v2+keKRJMkc3yev3c9OtYmO+gq4gF3L6RP zcy//DAVaJJ7Zo+Z0YyuS9u7Ds9xAMNQPbQdXHMkPYuiOnO0Jxm9CVkYdS0lU4qBNdYP 4wHhB63oHnZfQWitn4s5KA7yPZe3hIs4BG3iY0xHu5H7tsfrZli0qiMcS3DG3UQbW25o d5a9Mpw7r6Lg2k3ipiOoOq2nDovJmYGWpHLngoaAhVPFOIZNiVSa+b6/MppfyZZZYplm F9kXe3uSxR1rCFHhoJjS4iAaz+y5W8dP1RnST4lh6yxixDDbxYOPLZNRsTqm6J+mzlOd 5Kuw== 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=IRlqLg9pl8OW4kRzEvgaiZLGm2xa7Kg6ZD9o++l3c7g=; b=TuS7F/DIrsKOobPMQGFESt8X2sk0o5Rg45GXO6Hzo+oVkxUxdnqmHhkkiXJ5CaU1ly SSCIpxvjo3tneIbgLT3yj73NAT0sdFZV/0SfEfrnsY7OwAlxZV9v5l/bg7u6Ta1RD1dG rHPzblfehIqxOgIfoq2pT9d7cA2coyHBrrJXNyjvetAeubBD39KGmYBX9z1mEY9ULXUc I929uTjCa553xpHt7N/iyxGjOVEqDqCPgBuZXF8FOoxYSZPbZmm4T6VwiowQVaSWiFQt ie2kzcY31Gnx+LA3XUsEpn58E+P05anvM8tponSZfPtEGhloDqPoQ++yb+Y/gslbX5yH Ev9w== X-Gm-Message-State: AOAM533zOu0ODfsZIBeY80vajWf2xxifZx/vl66n6Hb/1BwtXNijsmck tgwR1Y368lRTGhP4OsFNG4PEnA== X-Received: by 2002:adf:ed12:: with SMTP id a18mr989961wro.178.1599589473429; Tue, 08 Sep 2020 11:24:33 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id f14sm352447wrv.72.2020.09.08.11.24.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:32 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width Date: Tue, 8 Sep 2020 19:25:14 +0100 Message-Id: <20200908182514.2870410-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182514.2870410-1-bryan.odonoghue@linaro.org> References: <20200908182514.2870410-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-20200908_142434_330191_0C789FE1 X-CRM114-Status: GOOD ( 14.87 ) 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:442 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 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 Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org For the 80MHz channel we need to set the PHY mode to one of four PHY modes that span the 80MHz range. This patch latches the hw_value PHY field previously defined for 5GHz channels directly to the parameter passed to the firmware. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 1496566ecb31..04822edaf631 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1485,6 +1485,7 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct wcn36xx_hal_config_bss_params_v1 *bss; struct wcn36xx_hal_config_bss_params bss_v0; struct wcn36xx_hal_config_sta_params_v1 *sta; + struct cfg80211_chan_def *chandef; int ret; msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); @@ -1524,7 +1525,13 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, bss->dtim_period = bss_v0.dtim_period; bss->tx_channel_width_set = bss_v0.tx_channel_width_set; bss->oper_channel = bss_v0.oper_channel; - bss->ext_channel = bss_v0.ext_channel; + + if (wcn->hw->conf.chandef.width == NL80211_CHAN_WIDTH_80) { + chandef = &wcn->hw->conf.chandef; + bss->ext_channel = HW_VALUE_PHY(chandef->chan->hw_value); + } else { + bss->ext_channel = bss_v0.ext_channel; + } bss->reserved = bss_v0.reserved;