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;