From patchwork Wed Sep 9 15:36:56 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: 249488 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524383ilg; Wed, 9 Sep 2020 08:36:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwRC8a5Pnng14APMKj0THHagVliodXw/DGGQMYXUnFCe7HtLChkDQTlb3KOk2nF0Q5h0/g X-Received: by 2002:a92:6b0b:: with SMTP id g11mr3695502ilc.62.1599665778487; Wed, 09 Sep 2020 08:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665778; cv=none; d=google.com; s=arc-20160816; b=H4NfZXsHCKK7R6bMZWOJgDIKBBbopbPBU02draO324rmygzSdYQLrGzBsD7FcYZF4V m2aFPfb7HWyJXKlEkt7mURfc2EP8x44NsyUrMiV1E33FFSXzjjobw+TbSxU4aAQE5TX4 jNAmwEHJ+qXXG0BNNHPviHvdNzUy5e9g6tbfssKWom5msHHoOlpffmefFOmULfj4M4PO lhFC/ugMrM6vb4Tqj3qEQ9jXGfTPi2PCvv2UAwA8ltPpuB0/omnILkc4kXrfKcFbBrU9 nBp2zoT1nNtD7VBNKfMZNbXCppO+6xFrn3HKLjh1NNLaHWefnPwUa5ALROBhYRPv236G 5Ogg== 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=t6uRc2WjLQk2kwZJ52UDnqpYh2PaEnGNpgIxt0loaE73Qn4yVNzMXdxlR8ffzdm5QN /3WWbCGknDUVxYCl0QG4hKSSDAtXYj50OpXi1jxz0Ykjjn6kC1Mip+CI3mPlg/sC405/ placET0r50Od8RtoyACqbJgdYpMRcY3DqV/WwMxorruYuddnUtPxT5a6dInp7XSTRm1+ 8LlCSQeXC5BI+M0kUKM4XKIB565zXpests3fVMAO5PcjbBURp4Ki3zocsVTcyKS9iZUO fD1b78vFiG/cHIPth0lAF26CleuauAnu0tmBNEz+46l54rUVe0YW9skfTz4Ap1w4h/n9 XmKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=weVi8zBO; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ryl0P748; 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 d9si2692386iow.71.2020.09.09.08.36.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:18 -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=weVi8zBO; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ryl0P748; 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=weVi8zBOfn3NDHApKIsqotrm0 AGppr6JNXHAEhUGEY0EPlvtA6dLfvFYD3b58vpO0C2japBQ10VxHsghO+N4/KwC9+LKD7n/u4TBOf 7GbO3Og63Q59b8AaTeKH/ldv6OWwscI6sDFi3SHdmEEopjgsXpWQ2gJXs6aGs1fuwbpy4I25x3R0k mRWhXAOwxXPK9V8VliaSBRn/yQSUO+7eb18Cr/BQzzk2uXAG1NJ41IdDGSfEGiri0RBB9o1sQM+YB PLsKTBa40OAzZf55BmZVpGWVJpG9ITw5Txa9rMs38ad4pujp2c8UemAAuZ0N7royZeYgFrdvGhvsC DOJACINYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28t-0006av-23; Wed, 09 Sep 2020 15:36:15 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28r-0006Zs-A4 for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:14 +0000 Received: by mail-wm1-x341.google.com with SMTP id b79so2823074wmb.4 for ; Wed, 09 Sep 2020 08:36:13 -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=ryl0P748MZ8rG9TDba0ufAdoBfzNc1lAOrSkQpNfJGTGL1xxNXSKZEu7krXwZiErCo yz65cPyF7XXpl87SBMs3J7aZJKCzF1kcQGM19d4DBEDoHtgPJXQtxg5U2l8uAg97dtli krj4Ib0VH/5fdgT4WutCYHLWeV37MbgWCG32IDsAgV4tVQMrX1+2wuv4cNhBuAG4mDmb Nq6WFCqeO7EPuP/15IhkvAWY1eF2XRicU5RhhI0W8SDCPbseS/6Xzv808rApiJqB0TCT ZctVhcFvf96HqEehmvm8ihygjR75Hfom6qrE6CKgiizx0QL5q+sdZkrVXBdZBpFYkz4L Hcbg== 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=rdCVY+zorEmv4O3yYyP19n4Ig9FChEjASXFra3N8UNLzvKxGRjstm6xyIb87T/Wgi/ vAVZ5vJnUUPB/rIHAahVQuyekPvumpPbOXc+zYds6U6iy3U+RIHp8EaH8U+VWCX1dg3I y/n3jlsZYupGoIIflBxFrNZkyD5T/vI/Qvn9RGiIodRKQC5773hvgxhrJw4zmU+RYmzN DRx/YHNoGIFyuz/Ox8OXa+yF6Wn79TB/7Bwr+HJAYu3xeOppwmoWkR7R2G7/EIMGW0jJ CtzjmajS0FomMGc6jdxuVq9qpUPVY4BxExuL3RuSMtToNL3gzEhxWuP9+qHayg2MgUOB vWCA== X-Gm-Message-State: AOAM5325KvlK2MxtnnCe1O9u40hDtoz5yr4FXgNH7XLiSKA0LADQFgc+ IcXKoNshJLsMpJ9B63XNu7a6QA== X-Received: by 2002:a1c:2903:: with SMTP id p3mr4281537wmp.170.1599665772328; Wed, 09 Sep 2020 08:36:12 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v204sm4619807wmg.20.2020.09.09.08.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:11 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 1/5] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Date: Wed, 9 Sep 2020 16:36:56 +0100 Message-Id: <20200909153700.2904977-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153700.2904977-1-bryan.odonoghue@linaro.org> References: <20200909153700.2904977-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-20200909_113613_367772_59B9B3C9 X-CRM114-Status: GOOD ( 11.54 ) 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:341 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_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 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 Wed Sep 9 15:36:57 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: 249489 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524430ilg; Wed, 9 Sep 2020 08:36:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMak1TAp6cXyAb489GrL3mXjHnpxOZ6dw3M4oGDyC0oBWYJBaKttIAIbE17c181GWYoLUt X-Received: by 2002:a92:750a:: with SMTP id q10mr3765736ilc.59.1599665781039; Wed, 09 Sep 2020 08:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665781; cv=none; d=google.com; s=arc-20160816; b=IzLE6NDBGi8J19lAep42XwSPbEEjicIrP2rgKLO39fA1ENZk3ly8j0sg/NgCGcUFMB VSM+8loK86oDSXR8w8Su3PUKM6vrfjpjhKNk7tSDhAyaKMHfFZTKIFKvxNg7dvu0xYQ3 np72jVNBdSObU9uYVcf1xY1NzBacte7HqJAEZ0mMsgwUj+Q361/4wGjOXVXaO7ZazrRq SMsGbUoOeb/JL+JfLzRnHjidoWUeEhWy77AdMqoa9VkdAHRpqFHxJ7Do9ZOxDiAyxox3 gYp3Y9FNLR5PLK4VP5WHxyNhITHRWvHdeSWk04Jr3xNxaH1H/C75ptMm8w/jbBBQ7RtX 4voA== 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=Sa7tZOnl24BZ86ZDgr8RF9bMCBxLy3MvxLHGncl1rXA=; b=SvqjJHrObYey8o003x31HAEWnvaeFIBFtUq0BXqNZhaOo6t4XspemVCmHbkNl4svT/ mHbEGoe0ApHdyzerq9NvmiqrmmWMDQoXOZ04w+0aWo6UiZnwGlk/ua3DsXrmgMY5A6Gj ExhQotG+nmXPfypHUKwwSX67maGJ/KYb45VBb/gA7B6EJ48Mwp8DZFxaVon/1O4U098o I/5WAHl1WiW9HnbxJW7+HM2dq7/j0k8r3OBLk/jjNqoKQkRxbScLgikdqFzU5RA1UqqC Yi6T5SlwnMXLP4T0neLRFtBprmOGvwFeR6bFDDS3QFgnwO7jC1B7UmpVdQGEsDZnUClW IcXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=04DjFBf8; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TMXzdi0w; 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 j16si2321212ilc.124.2020.09.09.08.36.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:21 -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=04DjFBf8; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TMXzdi0w; 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=Sa7tZOnl24BZ86ZDgr8RF9bMCBxLy3MvxLHGncl1rXA=; b=04DjFBf89QJcyaf3IROIW5oq9 XoKMqyL2iRtngMK0NtZ+7cUcgmSryaprokhl2M7IQdct5bS52QlLn5EbZqnbqQ2ah30Y9HHhrXFcK mLGEgfw4u6i6tQkh2WQZh1rc149Gw8D9u9MXWpdLbXOx+w10rKWME3VZQZkIeUxxMD72ACYLWVY7J fIlBRCv+05+vlJR9CD1XBY2IiUwzp9kxcLGv7FsZHcOPorFsTppZn9d3wvsw4RDEKkefN8J0eo4V3 ksbGXgOO5lsvSyzyvgl8+AZu4XEUvhg7jwsQti9J0RNcUfyJz/8r0MY8IamReDSYob6+40b4avDPE wvXKLxN3w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28v-0006bu-GZ; Wed, 09 Sep 2020 15:36:17 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28s-0006aE-46 for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:14 +0000 Received: by mail-wm1-x341.google.com with SMTP id x23so2720811wmi.3 for ; Wed, 09 Sep 2020 08:36:14 -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=Bt8Tpyo9+uK9+uEwdNPTeV0vFTeTDzA61bzY9RGScBk=; b=TMXzdi0wCRf4hKgmK5t/ZwcD6+/6c7iCEsFgriLi00G89djhGOJw5Dk663lc9aQhq+ 8/SKK+39/9bDDqEZnSgyzhsr4L8mTjOtcEQJhXYDHkuHTPhPQugNVWYGl38KkM7QLcsQ 6IH0mWXRYqo9Hc5zQFAEV+i9Q7IhJAhaAUSJPgBvowDkSncOyLBpCCkVutZ5lSzPSLkz aY5pVKRMgwW7t3S5oAIcK0Tbj5W8QxftN/WQvs5rQvfcgwul1lCHRYEDxdcSj/g9Lp56 NGI4XVl8ZPwAs6PvyxWo5V3JmVEP6+JL0EgEXY7D+vhKParrqVr5L4YDVeh17vPaEM+5 s5zg== 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=Bt8Tpyo9+uK9+uEwdNPTeV0vFTeTDzA61bzY9RGScBk=; b=mSe5+3G4CyPkGPZx3oaOSnLUrVsFF1IVMeovfE1gDV2frS1qk4IIWXBApAHJwqdFZ2 qO5vOX43Ir9FksBgc4qsmlGMyZyOFlwXVN0PQOMkZmWpeS6p+RN01xW4Uo9Uj/mc4mO5 WUyVHFNokZTc/Z0g/+chB6n3ozw7xFU0lcFn1KfZx5OebojvU3C9V/QlbFKaoyxlQCO+ n6pd1rgJkZtdlnsxSe0UAj6fJegXf4rLmXUAD2NuOvQoDH/flwCs4lW7jvvia0mUe85j cF0dIDryEcGrAIDXtEyt4XuubqsazMzQ5UXnih5YyuqanyDxGvCGriv3qnvGlUX2WK5E Wi3g== X-Gm-Message-State: AOAM531IJhn9w24Cn6wSDEIbuJ5Pc8GmoXhMBmQDgxun4iiDs+xNsdiF MZbsx6y0LNGoSi0P1yUFaXpseQ== X-Received: by 2002:a1c:f704:: with SMTP id v4mr4145142wmh.4.1599665773319; Wed, 09 Sep 2020 08:36:13 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v204sm4619807wmg.20.2020.09.09.08.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:12 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 2/5] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Date: Wed, 9 Sep 2020 16:36:57 +0100 Message-Id: <20200909153700.2904977-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153700.2904977-1-bryan.odonoghue@linaro.org> References: <20200909153700.2904977-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-20200909_113614_199213_93C91BA2 X-CRM114-Status: GOOD ( 12.14 ) 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:341 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_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 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 ce6536a3185c..a28bf52a60c5 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -760,8 +760,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 Wed Sep 9 15:36:58 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: 249492 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524461ilg; Wed, 9 Sep 2020 08:36:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8sAsWt/rVw4qrF5BKbbhAX4Jye2I/YdnlmbKo9crllkGCR2SJF7IcceWpwRUUuxfU62Bl X-Received: by 2002:a05:6602:2a43:: with SMTP id k3mr3736680iov.83.1599665782976; Wed, 09 Sep 2020 08:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665782; cv=none; d=google.com; s=arc-20160816; b=bhUMzXRmpIOtYgRgv2VwgAZnboCvG70XMPteR6i3XK2Xo6ByRwY5eNoBzFbGvSpUGF 1LLHnew2JMjiZwT89zV6s0RyLi9sshuLoUN52VDFc82uKykHA/PRpB2zQHJQZ/NcKzXY AnzfI5fJMM7Et2i7RSTddvj3iSCFYbTnpcWN2+icuI/0Wd9O8lGkiGH9i/xJhV+LR430 wv/qrcQM1/4/zWxGqFW2W/+B0pwhFglA6wrH0NyPrbRaZCLzyfUnz95BpXyGDeRj8Y+4 du0ClTyRjDaPoM3AEZOdl2qHYI0WZP9yzZYQWDjN78UfBbuv8GPdOB8pLX5Eeg0J6/Pt ut8A== 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=MYhQfNDU5fuqhXxXHYAUai8yy8BbzVdbU7SCsVGIn9T9dntH4IV9H2foGeXU0QT5lu FsheSjChL2bPlbh71XX9nbLuHayPDwiMs/8Z79irLrb6HL83451j9hea24gGVC2fkTb3 1FeCxb3MzhFZKsDh+ViyR1VZEsaNfhF1+Wg8sWu6RTf/Jhtd454D4FNX1Yg5FPYpx0O1 V8QX/hCvaoyHj8TpMb3Hq80PO+R4V/oI4d9r11gChNT3Iq4YnHrQ1rBDrDSscvBGbWGH 4nJCsxHj4j0mEIGLfV4Cd19AjW/n+TpKPJtbHHsuL3+yrb0WtKcGF8gJNb8REVE5j0yT 8Gsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=VQtjOv90; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="oh+Ig/0o"; 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 o7si2432260ilg.64.2020.09.09.08.36.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:22 -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=VQtjOv90; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="oh+Ig/0o"; 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=VQtjOv909BkraxvFEF2OnwWcP 1C+jaoHodhp3AGrb3Ui7C3cw2OtPExWBwyIkiqF19qNnN3xDykS2JWDPWdleunls1OhAtxQCO2irH xRT7OYeoyRvAxrIdVOyp573oFZ9/n4tSUNOCA5ypcrk+ZDCors+BU9y4PtaBJIHnHVJt27uH4ZNGx nMvhNOcGVUo8i9jjmgJ1ie72utGXCpEmnQQFIAHbWZyAWXO4c6GvhtH3j1/KfAFHxxf59uPoO3w32 128oWi1Nek2O8XIuAFagq4dA3a4qNCJHtTMm/muzeyr/KZWcX+4TC7d6rR2+KdGVjU55NJNsxp3uJ eI7Jcov/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28y-0006dE-05; Wed, 09 Sep 2020 15:36:20 +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 1kG28v-0006am-It for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:18 +0000 Received: by mail-wr1-x430.google.com with SMTP id e16so3484735wrm.2 for ; Wed, 09 Sep 2020 08:36:15 -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=oh+Ig/0oFiVrEM89eAzw62FS/G8US3yu3On4UDMdTE3hqwEU6ecAmGjix+AJh3sP8X t/IgnZsBUsraKwC5ZKK074Ze43E62JZwAEXILk261HOdaDwpQC6Tj9yntg00lSnlx4fd hG/hsMuYK6POV5/dI6L59eDB/N04UlOJpH0lUeXd+clc57fxZWjshtvQ5sxoyxhAc7x/ 9cHA99QvaM6E0cYVj7JJBFRSOO65tnG+RMUB/lkngEVSpu34qXsem6h8gc07Zi3U41O7 zKMZiPH05F8gScmkmWP0mrvXC7WKyRAH2LTuLnwJeaDxqExHNWAS3crlmOfWQVqNgtgn NoZQ== 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=XkyetLdx8LIKMxuiJ3OZGAGD18ZppTN0DCvLvgL8C1I00NAzCeW878gzHDsNuyuoeS OgWoKkTLn3oJg2ST719cEqWnuSyD/pkxu/V3icGlmEbhOyJCFijCXxZk9hdAAQywARMK VJ284BfbVQf39mgjKktj9zGdCvAX5Scnbn0qaJcgF71c5jJb5ehkYfaU4qQawBC8DJtn UO50yGr9VQ0jkqNZQwvsIcpxg82fs4pIvPzzLfm1+uU2vbN6noHCHETSo+HaOS+xY1Qm 87bG014P8eoU5+SfdhkaTRxv2/m3m6q5AH7QsKu3OTYkWwicgvPFyviFDsGD1GhXQ9G/ Zpyg== X-Gm-Message-State: AOAM530tTRxlkVJlWpnaguepO3ELI49rYgkhpt2BolM50U5oHJA2WqDq Y5NkKbzpup+191Vll5fPbJNCUQ== X-Received: by 2002:a5d:610d:: with SMTP id v13mr4284377wrt.23.1599665774397; Wed, 09 Sep 2020 08:36:14 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v204sm4619807wmg.20.2020.09.09.08.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:13 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 3/5] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Date: Wed, 9 Sep 2020 16:36:58 +0100 Message-Id: <20200909153700.2904977-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153700.2904977-1-bryan.odonoghue@linaro.org> References: <20200909153700.2904977-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-20200909_113617_655450_18BD7C6C X-CRM114-Status: GOOD ( 10.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: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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_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 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 Wed Sep 9 15:36:59 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: 249491 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524457ilg; Wed, 9 Sep 2020 08:36:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6J3UmgimkMGM6Y8V8Ta9z0tIePgraVnML9eBAIySgmsHnfALhvFPCX1J1gI9EV2+fjVyV X-Received: by 2002:a5e:8d04:: with SMTP id m4mr3672865ioj.107.1599665782713; Wed, 09 Sep 2020 08:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665782; cv=none; d=google.com; s=arc-20160816; b=P2E7pbg6z0I9x5EGKDpMZzCIbprVYDRwVmxlS71otf+GHL84KHcmK/CzyTOkAMnSs6 EaB+ZscSMeu1yfyOphCJxcj39N9n//1IYx8q07RDiSHwPN+4Hn1htsMLQpv0wyIALI9u r7xd/0yFejmwJjXqUs/MM2mBNfbyhhbDkmEqKD6jPC/FbDQBUcZq4hx5CckUQ0hq/JjB +5SYX9a4AyUP2WmtR/xFfPhgnI29HxCd8NppaMXnceK1osZYMAGNjgmu8i25OnTFDHNi 0PpLGJ+FHzrBQ+xglInMAJYNbfsohC65TcTYJai4FAOmwDm81Av5YukWc8EWn1xTrp6b clpA== 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=mZ+9Z5IM62SRNNDsj/7kgbbI+wzN+HdVOimUOJSajSQ=; b=xWtZ6qwi4P/S4Nn5jI5xk99NLeGaZSbf2u0ywoZ/meNMt62wX886nA/tJv9lt8STe+ JgVyTi0My507Ab5te00Kjy/q7HW6zRySbMwn+yjtiUNh+rtpBTIoDZe7EFk3z1e326ka LSH+tFOj2jaWLi9CgbxwORf9VMcmBHKd3dONVbCmgk9DS7Zp2UjXPiTIZbNTkTM0opw3 ZLiLF+iIeZEZQxXrYpwSLXATeDUCGGLBH8TD14ir1pry5jetxVZ3J0SzRhezuTO4Ybyb iMEUyRbyrWmP21/8BpHOWMNAl8eODbENbnDPWc/ej3d89Lu8/tJov+rk1lonZC/gBuF+ Vu4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=PQnzyz3e; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Y2/PyBWd"; 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 o1si2648076ilc.17.2020.09.09.08.36.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:22 -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=PQnzyz3e; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Y2/PyBWd"; 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=mZ+9Z5IM62SRNNDsj/7kgbbI+wzN+HdVOimUOJSajSQ=; b=PQnzyz3eKOSAb3Me8TTyigjoF 2MCtfQ9TJ3btNKUDz45jl/ve+IN+PseuwDGC1IK/rWlORtsBJbvS38Xk12KLZHEa+qkKHORoe2kMM ZhiACK/2royUz3AXfuMzn4NuwS5DKqvVA5EbZDQKnuIJlYTkZwY/YhTxyz83yMxcj1COUvSYMz66H Dxek7TwgtZG2YiPYBkUCbkuEHro0xPl9ubByvrdKNNQmIOzUv1PHgVMrw4SOaMeOKyX/eW+rTGuEU 9WbPpxVF5PGquzUc82WFto1rj8T/kxuFYoL9zNgfs0MGlFZMSSW0i9tUDPYOo8kIM2iUibz4xZxRG 7ew7iQ+Dw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28x-0006ci-29; Wed, 09 Sep 2020 15:36:19 +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 1kG28u-0006bH-5y for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:17 +0000 Received: by mail-wr1-x442.google.com with SMTP id o5so3411738wrn.13 for ; Wed, 09 Sep 2020 08:36:16 -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=mNr+Pfqwu/0aRFo1Po43D8D7g7/h15rV4ULpD0JgPO4=; b=Y2/PyBWdxg1P1jEbkeXKlpmoigQdCKRo87k2Le3pRYeEoxfnA4NvrUfQnpkcmkSMJ9 SgRep61lw1lGaYH/GbF+9b41ELuBMcS8XeftkoU8zvRnWIKmIKA4Pb0j3RSQdUx1SZKn 5uSzSIdhrKdwIU6aWO4extuXuHSkLpCBdYNmjVvP8OCqYYTOJL0d4Hsj6eu4fDYts4dU TeTLwLskJ6tz+iN72GL2kpUoZicGvsO1kZtP+ffojLjVCZqos1JHGAYgBMPijYbJle8C zi1BOM6+rJXuBPEU21VFEp3v+/q7OzomQwjBzUh0DxCUxnSgbWZmlWvj9v7FJdbpyAiw 5h6Q== 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=mNr+Pfqwu/0aRFo1Po43D8D7g7/h15rV4ULpD0JgPO4=; b=ZU8jv4CkNlrFVtNmIs2wDo8/MroDdasxCk+dQ33xkj6aMPfG0nDKtDZnMi1nkGraEZ h4A6tJg0RQV+Ayjze8i69CkdU0sUoa8PS+vX6i9HW5nVYVRBtOskFfU8Hr3AXvVuWeFZ 5p+doTTEc4/bNTvPi7gu9bJJGQ+yvznbxAaN8oj+rF1ffVS26nY61V7BYpOEhGlFW4Ps FOdQNgaikouW+SUC1VaGVFPIfLPrJySi9MwutoeWC5GX+y/mPF5AjrvATGpeg+CJecQe iunaEYTazs2shrtKWXc7KDB4o5nT3li/dJJVEB8YaPLPxh5/chzWRP9vZEzLkSLuEm/8 97Zw== X-Gm-Message-State: AOAM530EiUKSuI2Bwx3sjfKk9n28KvxAvgM1oP9P596NOMJKmvZ7manC sMAYuuXa9rdS4KNcJ/W5vD6otw== X-Received: by 2002:adf:e4c5:: with SMTP id v5mr4282315wrm.320.1599665775342; Wed, 09 Sep 2020 08:36:15 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v204sm4619807wmg.20.2020.09.09.08.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:14 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Wed, 9 Sep 2020 16:36:59 +0100 Message-Id: <20200909153700.2904977-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153700.2904977-1-bryan.odonoghue@linaro.org> References: <20200909153700.2904977-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-20200909_113616_616518_93F341CF X-CRM114-Status: GOOD ( 12.71 ) 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_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 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 ab6685dc956b..36cfa7043bc3 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 Wed Sep 9 15:37:00 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: 249490 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524456ilg; Wed, 9 Sep 2020 08:36:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/CrPTWO7jCAiZNj87sn3SAxBIZMlhz9vy81UDPn1ZntUn6qog0BuE9pE6IY1vpUUYgncu X-Received: by 2002:a6b:908:: with SMTP id t8mr3785894ioi.124.1599665782610; Wed, 09 Sep 2020 08:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665782; cv=none; d=google.com; s=arc-20160816; b=Wm12lliE+MopVWBSU4S4XiB++vKn7GhoMeoRVcFGaUPl1oZbWViSKdvFBK5vDCVwmj //B/5bvUWEsHXjcBXEwdatalw28si/WLiJflvtMTs3ab9KVhB856UcD/QY4RCxOaLg3f NkHLVXip5BKefW10Cm0I0OfVrwMJZsjWi2iS42jTe/Ioj2IXa5FYb0zE5AxvTo3R0q1B DdaIg6rnjeCphA4wzrtdS2sPAx9bctJOlF+w4woZm24F0wuFjB3nRq5o49qWqMR5Sk0F b5wuAnziuqwGNRSIFuHvaB3k8gFRTC298VM3J3gt14HcWyQs4j9j8SMtRZzhZG1IhKgN aUsA== 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=KLg5vdFA/zqMhsaE6oOZd6vqfssMY1f70bYuz42oNI8=; b=Q27zhwLbYp7AT3i9azwfjTeDL+lKNxZ5Apq9y0ihtZQgSSUbiXbn/EHV68D5jjkJqs q5yasO/56Qctva0G5qE7TqnGE0DkgqlvnAyEqgl+Let2uc9hQ3QCumx5tkoSviqJcoug 1aR7t8W0Ij7vB35G9/L3hKrvsKaOqZbh2gxR4gIMkKdtsWtDvL8q2ZCBWSvn3L8Sd6i2 oWvU2BqE5dkOZXGJAYu7UVLW/eA5ECJ20RbjpXt29O0EFur/qGhMXtBNEIvCQ5G8TVf1 ocdj7AUWaJvtaDKw4gF89VpXwTmKh3AaIiqnroxHBwSV5tsSl6HTppc0rt3RGTZkDxVp JZFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Q2qk2Eba; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=b71P0uq3; 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 c15si1591340ilh.5.2020.09.09.08.36.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:22 -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=Q2qk2Eba; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=b71P0uq3; 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=KLg5vdFA/zqMhsaE6oOZd6vqfssMY1f70bYuz42oNI8=; b=Q2qk2Eba18EbJ15pslbF8Ze/V kCqDRNtnwbqi9Wt1i3qip0nn4hnK+0y2KRzb1/OafZ9iq5X0JQsHG1NIXyREb0KAZOM2bGyyzAijG vEYe1ah6WFPGNPb5rI9xLA5nmRtdXn16+erkbmvvYFPlFTleVnloSJc0erAvkoew1/SoOfS+/TPxf IjnywI3e4ZgyJ4wir+84B6qj1WQS28rF6Nc7zTid/O3YSRTOCfR+fM+11xyJh7TD9Gd1KPa64PpGb slvU72TlFlO64TJ73mSm4NVyNjM1VhLU9s8STrTox5HPl+ieBz1DLNaS5/kDUsTrN8ZJsTH07mU4o a3y25bU+Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28x-0006cu-IQ; Wed, 09 Sep 2020 15:36:19 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28v-0006bV-7q for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:18 +0000 Received: by mail-wm1-x342.google.com with SMTP id a9so2837297wmm.2 for ; Wed, 09 Sep 2020 08:36:17 -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=ALkvRKCUevbeFhjBwQhyolUataIAPGgfoMc2+wbgZyY=; b=b71P0uq3o1CkXwB1hBnlO+YSTdS7UzGiatB+Dy9bTJR90GXL+4ZqjeMkw9jeDU1rrq rJ4oqyIM2kI8PINP2FPnIyP9eyt8XPIBrfBj96GCGNmx5oWbxQNG38s8cziTUPSQyKwy cNmOCzFpk4R+iN3msgGsE3eT6Lxpm/+lycNdDnBstcQpYj70dpF9bg0y0uU9rE53HDr7 zO/x+4wEYYKqaTkURKCSlA4AntuS1jDnXLqjZii3VOwYbNAI3bQnczwiGdadl96OqT2P xpZf81ZDApuK5285oqFokvShTZjOzMfiRQbCyQU/4q9Js/ULB+nAKjF4coRnkW2w2Vgn YxIw== 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=ALkvRKCUevbeFhjBwQhyolUataIAPGgfoMc2+wbgZyY=; b=mJR7+3kBd51wXh+9UuseaM8WUKo6p1W1oXvuZFaGZGL0GN/7axemn4xHor1g2YE2ag 1ZjQAEwLsIRvBBzd9Hj/+peQDWERn3ahOjNf0IWrHbDBly/PV9EKl6j4u/xy9BFVq2Gq 5CQrI5yx4KxLLqDd8p0wjVUDDpnsBs5s0Er31deeC/BeRR6oorwIPVMlAIFtNkkeTZ9H EwPYCq8n7wB3zLkEh3K45SWUFm545tWUexK/IPucCil4LFFYuO38QCRBGB0WGR+JmIvI +6XbfVVx5otJGtI8h6hKYoKSvJ7FnQh3tKjAYSOq39F53+Z9Y70Ue3NCvnv5pbe6Buz8 pgEA== X-Gm-Message-State: AOAM533hil4qMS5Lm+sGFjMHIYgnxSODOzDyRjbtrSZ4OZIbhgwuiUvA RzUWBZluRa0AUv5caf1y1Iq6lA== X-Received: by 2002:a1c:2ed0:: with SMTP id u199mr3998553wmu.125.1599665776313; Wed, 09 Sep 2020 08:36:16 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v204sm4619807wmg.20.2020.09.09.08.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:15 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width Date: Wed, 9 Sep 2020 16:37:00 +0100 Message-Id: <20200909153700.2904977-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153700.2904977-1-bryan.odonoghue@linaro.org> References: <20200909153700.2904977-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-20200909_113617_294368_0EA5C0F9 X-CRM114-Status: GOOD ( 14.01 ) 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:342 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_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 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 a28bf52a60c5..55d2609bd9a1 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1487,6 +1487,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); @@ -1526,7 +1527,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;