From patchwork Sat Aug 29 03:39:44 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: 248696 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602847ilg; Fri, 28 Aug 2020 20:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN01Ot66gg0aPy4RAj/UARcGuUNoZTN1XaPIFOS6oqcJCPKK9K28N25ldjj4Y/7YRSUmKM X-Received: by 2002:a02:a592:: with SMTP id b18mr3873265jam.44.1598672349156; Fri, 28 Aug 2020 20:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672349; cv=none; d=google.com; s=arc-20160816; b=BVYiWxi7o93SzBvTfnb6PuH+TFCynhkFA5NBgm/3OtChgUqoY4bPSaipYiHyQAimA0 dr6aCuYkLjk+InjJCDGTnpkEZ8BSvzHmFhwjeYLILZDbGlzXEfOF+xla0XHxGavsIktO etckKuXRBS833CJsdrNs9nr9IqKr9CbXgyG6R6ZkDTgkotKkYicHW+6Mh2NeoRpwIQXe nrVzRzqD7ueDWMoB7OiEupCvqZJnOEs4zM03+Hj4edzjqtpGRUWVtNs3uwHbeNhL0EQJ ZvmEh52N6kEq9J8EF/wsKOPmKMuV/LPyHE6vLYAwE6Q5086wRDE+/NY2DVCD+lIwjz9/ W0xA== 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=Y+NLUL05Z3j4w7pkr7OxzlemSWpSe8T3qgkIWkJB1jQ=; b=0Y8OZFD+458Bofm3HLk34w7+sopesggV6Lgo/n8cd4uxz0tSQm5UGZXKBcL4fviEq3 AD17eBEoYfWhxQr4LvB6QOk1Kr+4InzoBoLbQFt1dKa04smnLqwiY6bCn5HEIKDgA46H K42tcEigXK+GHy5DVp7YE6EXogWwF7UOBAhlR/s3wD3RspyA9w6zPGuQ8+MEzEwW1Gw6 OT6x8gZYeTAWSwu4JrtEcmFPCGHyfh42DJfraPzKA+DBl6Zs5O8T3LbrNUtsZz0O9S6p MGofgBfwarOco4A7qIVqp+OLruMpPc0uqunB6EfPRYxAanlaITPPidF3qXgHnwAMnMLW xeIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b="AABkg/g/"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Y790U8AJ; 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 k1si1158225ili.40.2020.08.28.20.39.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:09 -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="AABkg/g/"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Y790U8AJ; 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=Y+NLUL05Z3j4w7pkr7OxzlemSWpSe8T3qgkIWkJB1jQ=; b=AABkg/g/49Lq/dm9e6gTTS8Ys S2Z9+DbIqhZvlQ7V37qa8if7WOXDnzyGN/bMF7RpBpTHkDQprZh6bZusnXPjZskDfjsj7fJldnhZ/ Empwarr2DOBKm3MWMFctyt4Bd/AkMYnf2UM0xh7kE8wc7KRf6djBPrJvuLqnvgHNI903NpgQHjwjZ nmf+qo0CIaHKeXZmxhCr1dxekZT7EURH+pcfI+GsJPJ0F8gU3M3Q0JaeqauViJQQExdVyZgWFPJ8A dB6xy216wvniIwoTXNOfmD+XtAP2THHN3s3vkDHXIp/bjtJ9/MSn5QlxWhjExxcBvcfOkJKGbOCO9 RCSI3fyAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhq-0002bM-8W; Sat, 29 Aug 2020 03:39:06 +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 1kBrhn-0002Zf-TA for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:04 +0000 Received: by mail-wr1-x442.google.com with SMTP id x7so891219wro.3 for ; Fri, 28 Aug 2020 20:39:03 -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=HF7pNf4fbKb1C6oMKd3EGPiCGGRyRUf2Kb2rIRMMGWI=; b=Y790U8AJA1GGX4VlxN9KQIZb/aM7dCIaSPkklN6wdO4pQ1G3P826sz5DnkiFt9dVrp VVTdjpmXpv5x3Rp/w2K+NDQTPAdgF6TRJkYZb7J4m1a5+JgCuOMMdIA+z4R2qnKKJHF7 59GVSR0YNDBDopQ+Jfvi34azbTU2OpWnziRT8+bda1MqPBqnwSGUT8GLUuHgfTCvf+ql yM7+NRW1d8PcwE1DyGyOZX5RPf569A4uSbecGBve43TX5YtQ+Zz2XUsE3iXu76HxnNZN Pr/4lwakm3jKO173h1CAF2v83JsX+KWsbaJrXTUYVZiA7/tdDHX9EFUqs3vXGEcE0CxK 1lgQ== 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=HF7pNf4fbKb1C6oMKd3EGPiCGGRyRUf2Kb2rIRMMGWI=; b=gaE7NFGNxQvSdVtbh2JiiAb1jro9BjPOb/rF9Dd6rVlEkyckOX/FJQX9QRYyRE9J4D QyZ49u1QlMm/tcc5tcE0RX16VkcbquKYyoWp8WuoBo//oZX3Il9vM0laxDyu7W9prEZi 7GXVYpsXwzSfBVETimSw2q39hI6b8YvjvlDLjtRIXmzIH5ksgkoaOZXrPCwGDvxWx9W1 glUT7jl0JbT+9fgsVsEpkZ2UWONbWGrInK/HqLitIW8MARoswhDs3UqR7oufWc9237zC Aw5jwt76zSy0RbpUeSMRt/os6HxXDgj1EFYURfsQz93+Ms5PH62Zuk/NInmC2UEZIof6 xsQw== X-Gm-Message-State: AOAM532d8X6l/Z8+ohhczYO4w9WMm3caqS4yyL2qj/cBd8zeT4gSnkwH CGGtexH3g4YD87j6ek17nhiw3g== X-Received: by 2002:a5d:60c2:: with SMTP id x2mr1809740wrt.73.1598672343041; Fri, 28 Aug 2020 20:39:03 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id l9sm1732151wmh.1.2020.08.28.20.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:02 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 2/5] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Date: Sat, 29 Aug 2020 04:39:44 +0100 Message-Id: <20200829033947.2167817-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033947.2167817-1-bryan.odonoghue@linaro.org> References: <20200829033947.2167817-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-20200828_233903_946693_B901FCCB X-CRM114-Status: GOOD ( 12.89 ) 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_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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 2c58f7050836..729708d96586 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -764,8 +764,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;