From patchwork Wed Sep 9 15:37:36 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: 249502 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524942ilg; Wed, 9 Sep 2020 08:36:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8qHuGRXGr/pCRFPYXMZb7+RVm7rMyGCp0K7Tir3S+7LExXWtLLyjAutemJvJW/qVCKQTr X-Received: by 2002:a5d:9b91:: with SMTP id r17mr1458345iom.183.1599665819719; Wed, 09 Sep 2020 08:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665819; cv=none; d=google.com; s=arc-20160816; b=ffjeCdIC7+003bgdGqRTXDgf8H3yZ9pntQ9NFbRUUzz49BrpjnILF279oV8Znu2wO+ Woe4FBfr/XgJnFCXg+Rsc4TxlbyKLclNhJ8hA1B5pUynX7gk6XB2iIgjk63gzhhchsJt eA1NnmETynIokApy0R7LMvTbYllCFJHlhvBWvsoAIh3FpK2x2Z7z8+8DfUMIe9BbnoAS 0QdDDVf2BnWcEAjtE/eRtZNeDqWzLXCGJit9lr3eMUaK8uaGCEckdlz3lm0Qd+8r7eFA vkvpagxdkifQSG+kHoRPn+5A2j5guqycNoxxkjORu0rk8iHwjkG/ORDuWKp0WXvX3SIW H+0w== 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=soALuC8HZTPewrYbbvkjnsCF5uqvt6drk4Q2qrvKUjZQT3vTqn1dkgc1E82v5QbueN LkEBTHfZy8KB1xGwqr+kc10/6d1Gejgv/qC+gBuXLB6QCNBzTiMQQJd5054ZZedLmTAF ptjBHrh3iK9tuIObc0G7oOdkvDDDdh59ZoX9yabZrU7G4ANuB73CnnEKjTORA9OSBV0W UVRtBQ8d+Tc2QSU41g6Lk3UvvgHmxfntJYn1RLdIAQWV0W0of1VFbC2oxoJl/e23Fup0 tebXp55mQY3X0bs0DiW/+cMJnlX5s7DjV7O08K8pVQhH9zkJCbt/yE7FXSUp9pRZdj+l B7Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=rfTlOFLs; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hIBDIvRY; 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 o2si2222832ilg.70.2020.09.09.08.36.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:59 -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=rfTlOFLs; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hIBDIvRY; 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=rfTlOFLsoaAeVecWpgk4r1tIT yjV9FUSDQ6yS0Q7zzLvWZMkdrLZTWFukRN0Nw/xhDUzrCa8duTUHcNPhAQHYYxNFTcQSQV1XWlbwl bi7dDmYBiGuyS3U0VUXmcTjZYisTgKqm4EmDUg9L0SSm29oP066P1h5vrvAwD1xs+kARAiGuCTpzr Yg5d/eicxhipWVAgtb+a8Rtm3Pw/4EEk7epgp0tuGG9n7RCTZHNVCCrJtZmzSwgJxDSV6yYczBea6 LDhjAU6o24xEuo5pcoxHazT8jYkyrqyg1AWUBccSp7StKVrV6StTbhNQ5LxXcdBFVJk6wnhIgefp8 RbfxP/kOg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29Y-0006mV-8V; Wed, 09 Sep 2020 15:36:56 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29V-0006lD-5S for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:54 +0000 Received: by mail-wr1-x444.google.com with SMTP id x14so3424118wrl.12 for ; Wed, 09 Sep 2020 08:36:53 -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=hIBDIvRY+yy78TmSS6OMPk57iLQDR/lyZQKzboua/CkqLlWySC7531fPNftguLjeso qNwfZdYXymY1BYADXVYkAs+7MUCIlVyirrr0RjO9mgIzlP1/gdafUJAB9f4bE++Ntd/F +WfTkLfSvV3CfqJGs4YNw9cld/ys6wTSSpHOK125k4Ekcxu5e51uh/NXmEhxsQHG1tsg KxCvkZ5ASpPdFcGi9yollNSqbMGmDNGwZXLocIZgV74rZIRWehE8DBAFfvF8qobYEDv3 jnHbYau9bGO0P1RzXuCp/fX0axid+Ddp3V2wleboTPHgv0qEhBFpvCIGqUAASGdxmALK DxQQ== 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=CZtlMi6/dhYD1vxPmx30CAH1k9EnmTZ5faKEt84ykA2NQlh7c3TspjPlAguka/Q5ZT Vr8jgFrzy5QKysjq6LYT+XQCGmr1bXHNgLzWml7A/qqtMWHVqhZv1mSC/LLdsmJmOAKv vIqYrE4AC2ShjKGh9v/u1AICdH7sNqSB18S5LBrRLfho7puqXk7h2lYDxIBqePzej2va 2LPOB4448+3W8y43EdDJATlxVnDQqmeoO+LOQmzvs4V+9Sd49MOIK+3yNOQCh3zNB0Ko Bn9q+owdf+LYWjn63ErHS2bL65QiQD8yMqnswQ1vc9evfg/kKKlhFJ+GwxNiFWsjKfAG xXYA== X-Gm-Message-State: AOAM531CjTwicJBReSxtUhGdrU8bg8syzOvY5067AjpWrTITVMDgwzWB XOMUo73fM2VNsqnjVtRzkaF4NA== X-Received: by 2002:a5d:4486:: with SMTP id j6mr4410725wrq.278.1599665812216; Wed, 09 Sep 2020 08:36:52 -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 128sm4470602wmz.43.2020.09.09.08.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:51 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 4/4] wcn36xx: Advertise ieee802.11 VHT flags Date: Wed, 9 Sep 2020 16:37:36 +0100 Message-Id: <20200909153736.2905114-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153736.2905114-1-bryan.odonoghue@linaro.org> References: <20200909153736.2905114-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_113653_228041_4648A8CF X-CRM114-Status: GOOD ( 13.74 ) 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:444 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;