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;