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;