From patchwork Thu Sep 10 15:08:22 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: 249660 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp827736ilk; Thu, 10 Sep 2020 08:07:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4aKhby8nF2XpkkNArFOxY0lcdPc6S8bNBA5IyXHcsKrBsWw/T+4dZR+phxscd9SNP7X8F X-Received: by 2002:a05:6e02:111:: with SMTP id t17mr6174113ilm.96.1599750465165; Thu, 10 Sep 2020 08:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750465; cv=none; d=google.com; s=arc-20160816; b=ErQ6TtVbFKtVeWuZYHQzvl9oes+bmAt4uk6UE1bwYfdDlo/0sl5TQzQtK00M1G6nQA r6CkUxLvbdOCLMynY5rjf56X30YOr1H/rfwvf+0+8q8v60X/n31Uvvgm6oqjsKp5Bi3W qLstE14pCSmeOUCdBMxyvnLTGNbS+gxmcPJxaxpF1xD80neNR4TPhOgvGpUIdoLryvGJ 3B/XanQQQc2isi0Jb1sxq4pVGtDkSbZM0dwTQuWUJPqD4+++roeFoEJtBg26a8dvr25X 9p5a10opqsTs6LN4/kpxg6RBEe18pTUeKz3i+l/MjmgJx5gM9XFhNrLvpo/GzVUMT9nu jL+Q== 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=J1Cm8f3NM9ljGAVKUphDF1N5ATZn0c8RXFDJlm1OSc0=; b=ne1/XN+yMdxoeIWGiwo/uvhVm3LSA3ITIcKzZr/LYkat5Qyeb/CFErnj/Whepj2aaE k0xpsfS52HQMzclME0O4F1f4/P3WRn1USPSXiGHXdxoxKsLIbAZL2BGq2DgOynKHdBd+ YxaEbR9DXPPqhJTqzHM7FZaEQ6wFKaDL54frWmTCIEWUyEDOvhcHmlygkUjPwJZ+QJbp QoC+eqV9t4mwxj3UYnn7ljtPlplMu6CT73Nnq1hhEWRJLdbhYbbcki5PUI4GX8QJdNni ItOencbg0Ew4DKHMBz/4BvbhpdKHhMP0AJCbyhcOW0ZVqpjwdTYu2yQcXlfJRQ7rJYVV n72g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=prEMkZiu; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=j+lXJDHc; 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 l20si4542371jad.122.2020.09.10.08.07.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:45 -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=prEMkZiu; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=j+lXJDHc; 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=J1Cm8f3NM9ljGAVKUphDF1N5ATZn0c8RXFDJlm1OSc0=; b=prEMkZiusGKf4i9rdNbXFHNg9 BdT3yVLzz3RdFdClXPhSfkWhBW70F7eZKbB39/Dq18GDNcGF45VFlGyQZHULhASzUyr0TADfRW8PF s+Ek7ZB1EuVjBXCf/qlwT9jjV+uhj104IqobGVxHzkZwiqAzEi5a92kL1dPG0oZH/6QG3kD6JPEq9 0oi3r3F411LxqwnDF3V8GGgLmepph79JU9evnk88Rx3fJzbKj/Dnvy38mWncfyPNk/4OPIKr2Tq7P Ual0r9oA7kIA0MwlBXKcy/240TIGxNUtTmqk9H8QXkaBajw+9VcKQCLybMOaTaHqJW563alv0HD0U DNCy0kGEw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAn-0008CA-9T; Thu, 10 Sep 2020 15:07:41 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAl-0008Aa-1J for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:07:40 +0000 Received: by mail-wm1-x343.google.com with SMTP id w2so393899wmi.1 for ; Thu, 10 Sep 2020 08:07:38 -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=Rwo9ulFXffmBiUSboQ3Oj3Dcuj3Fgxbrid758yS0THY=; b=j+lXJDHcwYuWzsQJt55oO7RJWUviQm/csrE/GGlCgz0iVjB2Pc9M5AegwHyVEtzbrS YOg8tnqBK5NvjYPhESZ44xSxniIan0taVSJEDNuzxs+f4G8pcxBD3KlcnXWMLdn7H2/i Emj26zznQrDrmvaVLRndoiWxTZzFGfSIqIhgIbYLkEsVxl2ETuIaDfyImRv/Mal2lkbG 2kEsym85WL+MNI3TXCmw2jB4KmS6i1GZZomoDBmiaHUPe2dRmchWVdRY7/k0EW/gU4lh P8EwRwSDALqyPwDbz0qwdGzDpsLC9ggD66t2nsJI+9gcTm8t4pkb8WFHYWOt2zaJVUVi /g2Q== 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=Rwo9ulFXffmBiUSboQ3Oj3Dcuj3Fgxbrid758yS0THY=; b=cf0WgIDxjKnFcO27WFL5SlGmzIGl/e1DPzhSTLIKcr7k54xZovM6wPT6GTTjDOFfy/ MTAbeJAt66U4S5J1KfKss+I0ly+3Tag3czwF3M5JE6jXJt0cfdvFwEud3JFR2owEppOl u1HgoKrn5pPtCjkMr/MwY1+A3fwRJqiI7I3W+HOhrwPCj0602BGuG3BZUJ68kLEGbugb WIAquu7c5pxGur7OY0B2yFSdSFCYlGuFjAawDQTsUchCRY4iR6hnPIr7Fug8Dig8GGmi LX13enOi3bkzsljjzZ7zMz62d0vzs7zXjvJ1TOjP2MyIWukHxJ7kSYUD5L7Zqs2oEnqT zzVQ== X-Gm-Message-State: AOAM533k9m0trIVLpMdobbMpVuTNd/FUegsvtTQpbcBsN7iJuwGerLMC aNZVAD5Cy/zbnnG+Vj/jF58otyGvZ2XEXQ== X-Received: by 2002:a1c:2ed0:: with SMTP id u199mr405417wmu.125.1599750458078; Thu, 10 Sep 2020 08:07:38 -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 o128sm3895678wmo.39.2020.09.10.08.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:37 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 4/4] wcn36xx: Advertise ieee802.11 VHT flags Date: Thu, 10 Sep 2020 16:08:22 +0100 Message-Id: <20200910150822.2179261-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150822.2179261-1-bryan.odonoghue@linaro.org> References: <20200910150822.2179261-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-20200910_110739_101224_6BAF2355 X-CRM114-Status: GOOD ( 14.10 ) 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:343 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 This patch adds ieee802.11 VHT flags for the wcn3680b. - RX_STBC1 - SU Beamformee - MU Beamformee - VHT80 SGI - Single spatial stream RX LDPC is declared as supported in the datasheet but not enabled at this time. After this patch is applied an AP should see the wcn3680 as an 802.11ac capable device. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) -- 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/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 720d3fa8ddcb..43596b919ed7 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1200,6 +1200,35 @@ static const struct ieee80211_ops wcn36xx_ops = { CFG80211_TESTMODE_CMD(wcn36xx_tm_cmd) }; +static void +wcn36xx_set_ieee80211_vht_caps(struct ieee80211_sta_vht_cap *vht_cap) +{ + vht_cap->vht_supported = true; + + vht_cap->cap = (IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 | + IEEE80211_VHT_CAP_SHORT_GI_80 | + IEEE80211_VHT_CAP_RXSTBC_1 | + IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | + IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | + 3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT | + 7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT); + + vht_cap->vht_mcs.rx_mcs_map = + cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_9 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 2 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 14); + + vht_cap->vht_mcs.rx_highest = cpu_to_le16(433); + vht_cap->vht_mcs.tx_highest = vht_cap->vht_mcs.rx_highest; + + vht_cap->vht_mcs.tx_mcs_map = vht_cap->vht_mcs.rx_mcs_map; +} + static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) { static const u32 cipher_suites[] = { @@ -1226,6 +1255,9 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) if (wcn->rf_id != RF_IRIS_WCN3620) wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz; + if (wcn->rf_id == RF_IRIS_WCN3680) + wcn36xx_set_ieee80211_vht_caps(&wcn_band_5ghz.vht_cap); + wcn->hw->wiphy->max_scan_ssids = WCN36XX_MAX_SCAN_SSIDS; wcn->hw->wiphy->max_scan_ie_len = WCN36XX_MAX_SCAN_IE_LEN;