From patchwork Sat Aug 29 03:39:47 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: 248705 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602870ilg; Fri, 28 Aug 2020 20:39:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT8XwlBcZ2VqEPIrzbjE4QaGbhWvEdqyk1men1oVMvsN7SLHhepsetpEEZwEAwH+xDzXgv X-Received: by 2002:a02:a592:: with SMTP id b18mr3873333jam.44.1598672351439; Fri, 28 Aug 2020 20:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672351; cv=none; d=google.com; s=arc-20160816; b=eSkTslQM+Vjf2ALRrHcYeRhrvLmm5A2DEAxYL/Wc6TvFEoOH/DOdv1jDlsC6VNz6Uy U17vBOAzY+CVZtse3NrTrcuRWl3Ona0Y0yjMJziWJXnMdL79pzFUf2UlbZPx6+W/OFjr L2kaWB+RZX1KWixf9f6T189yjpoCuKzUB5Yib5G5Vda5fLj6Re1Y9u0mcFPf4QeJOBgV l0dmg8rg0SxsInMn9NqmJmVh0Jsbvhh/ysSpjO665vaejUf3CADjhx0fGubv7fHh2i66 Y6P2m5ruf4ZCZLgXPCsPRzsAnQu7y5derhexw/75moA+J2ObAfA6pavvdsGkdPtMuI1e Ce6w== 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=/9lBmbu8t1CqSjvTTVosn7VkePvHDbj98u+3L5fGYWM=; b=bPMhPC7m8N994FTSi9ZqE+MdFUNKMy29mRCXKpsYR6sxR3PytWVCdIl7guERok8uGl toUm7htYiaXNTrhcupj0XyPqn5YsCxfoK8kMRoKuyTbHszhaLaTG/FyqdTcdpcDoQW6L u6zAmNq89BhoKtU+d8OvXxWxLqvy+qm/qCQ0dw/ANCJ+Q/xLDVBHWmi/d49au//Jsang 7YZUUj6kP2GKyhzIh07/9cb82PgYfT5D/8DUAuCu3n+O1sNNgPjDsvmUie+7EE1+6B4j daqXdTXL5hnCi3AmGg8pZd7wVkrCCcVz8dZnhiv63Zqz/19akKFC5ZOAncaNko2ljohG Pvyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=x3Bc48ks; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yhAvw0w3; 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 g10si1187319ilq.155.2020.08.28.20.39.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:11 -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=x3Bc48ks; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yhAvw0w3; 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=/9lBmbu8t1CqSjvTTVosn7VkePvHDbj98u+3L5fGYWM=; b=x3Bc48ksnyAM4Caho+xzW5SBC 5Id4bMJ4cEhhVJRPeB3tYxIXc+Fh19NB0jZAXUTYbTzgA8OVx7Of4h9iK0U11cFqUi6UvcRY6IOeh nxCrbe6HfrK+ZzDaroY2+tIaPDUkk8BJ7mgqsfVpgUjfhLzmjYFMMl63iE4RVEDFVl+ZiPhQQxbh0 Atbt5K69eJhOM9dC9D6tF1gArYQdDXPY3Mz5R+4OdCZDrVk5ImiDvs/ZYcEnr+NjC0shzs5d8aeev Pz6qn2RFx7SZ6PFhD/WduUADLyQrzFpvROEl6KJYTRJbdw32jR6oAH+X0I7QrIFIZ5ROD2tGLVqiG qwDgWKh7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhs-0002cr-JE; Sat, 29 Aug 2020 03:39:08 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhr-0002bQ-3u for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:07 +0000 Received: by mail-wr1-x443.google.com with SMTP id w5so868253wrp.8 for ; Fri, 28 Aug 2020 20:39:06 -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=+gz5nCyObldL5Gm9cjjoAI5bGBbxcrE8UnaMm3PvfTM=; b=yhAvw0w35tHzVG2StztQGtBFWWj+pdnd7KCWqy13B35Z2J1rwMFZKsHOWIXhQAmMzW 78Jh5t9kEE3gC8MBkhYHATVsIei4XWleRHuyPWUCcd5jsRTEVXUKmsTvhlVuXkoZLqBd 0lglK5kdX9ScMoht1EOKG2tXnPlYnPesL7Wjlafp8Pj6lq+rkWnr7dMqsOQelY/1cwh5 4fomDTtOC4MCAHNGYBkfEAMFUv/hxD5wzOs3VEu/n5Guphj1ITV5RmewzmE4jIFxcKiz wfNb+7BQJTHHC45eWZzJeVKtzWHnJ6Z8C3kqBEBhX9qj5Z0DbtOZn2IhsKX9E7dlFU3F 31aA== 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=+gz5nCyObldL5Gm9cjjoAI5bGBbxcrE8UnaMm3PvfTM=; b=PafoEBVL8g0DO/8DvKnaVrn9m/GnP0s3Gxrwo3rC+0xB+rTfU2EXNuiKkiucqXzYQ1 BZLD/P0q6brtsaOKxSMImVtUnSjuBxDjueKwocENj3aXjthqAonZf36LRK6J5VlHWZ8Q DWtVeKb0TKCIKqCqbh0XouQV27Y/n11EyA6Vk+8bX8MWGTm9waf9W4D/dpaiIhpi0969 vtn3lLP01VYvCSofKnUlErRBwhtdPvkrPU8wW90bi4x41gpT9KmhnxKqxtpn6hYg/0yF B3KXJtq7XVBB5GCSIdDxvqV3a1ppoUk6f2/v8lLAemNOGx4LV1ETx7405cRS1PtUA8/j 5e8w== X-Gm-Message-State: AOAM530XfHDkCw/gzLWgphEl+1hI/JRtDtIXgXDH9tSzGEy3cZRXiv8p yTFj8QwQ80RYdC3wLncy4SjqQA== X-Received: by 2002:adf:ab57:: with SMTP id r23mr1777893wrc.386.1598672345939; Fri, 28 Aug 2020 20:39:05 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id l9sm1732151wmh.1.2020.08.28.20.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:05 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width Date: Sat, 29 Aug 2020 04:39:47 +0100 Message-Id: <20200829033947.2167817-6-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_233907_199355_1C7065E6 X-CRM114-Status: GOOD ( 14.62 ) 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:443 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 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 729708d96586..4b967f8ba949 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1493,6 +1493,7 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, 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); @@ -1536,7 +1537,13 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, 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;