Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp440926ybn; Wed, 2 Oct 2019 00:11:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0x+2v4ITo56JmdDQBjoD3C0NPHEW84gCfVFGcTykr3zWcjQq/nAKPmsA47SUcHkNwqXDY X-Received: by 2002:a17:906:c721:: with SMTP id fj1mr1707993ejb.177.1570000305995; Wed, 02 Oct 2019 00:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570000305; cv=none; d=google.com; s=arc-20160816; b=gJhHIU53treBrOBb1VNR5NSh7fFbU5wjObnjvSo0ue6hOFGf/TkFusQPLmKTuHMRF2 kUFvpj9YfyzqdzACf3xo/owAolIcZ8qpdaWlmQiGO6o1y28kfHmM5f/uumce23z56vKw LBl6a6VrLW7HnnTkUXG/wcsYbXFq08u5FTf/5jf/GOYnukRGBo1rR4aBRdTYFw/L7LkR S2tUZfgXnozp4TlIaxXXQoqVP/CKbWraB3hZqC0eOKWrq8rM1CaOG4VtXyvs+NtOZWSg R0nNv/lnfqSK1CIAam9MKgjdoRjJ8rFQLPKHuJKisnIIvZmkpebz6JmNqe9vjFjVp7vl zRNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:authenticated-by; bh=cSW8yGKWr12TUVV/g1x3pdi7t1WrIyASJkv6AyaELG4=; b=qxT51kSyTcJsf+m/EZ12lnXmiflkBb3Tx0oAS5JfqElIfD/y/dTAAGw2q3/fCP3Ga7 9LAloJH2RHOMHS+/rw5JNDtz0N6I52TJPI38jJzfyzHHVsorXOSoOz4oDwtPo6FbFAxU zaX8y85m7hzUvhs3oCPJV2breESQMoMGHPdzNfwC2F5e0Pk96WqdixFIbja29yA6kHMa caEj5MtmkId2JhaLNPq+w4f6kcVFMf/QRzn4Cp2NLE3xfDL3rTaXJp32vO1t7Y1bdwUe Ya+6xP7mqFGs4Jx34L73YvcmauBsTyOnGMJ3Sf/2eAhIDReXYZr2XMRpUeqSLvSm1meq jzbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l16si9807237ejx.141.2019.10.02.00.11.21; Wed, 02 Oct 2019 00:11:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727430AbfJBGfx (ORCPT + 99 others); Wed, 2 Oct 2019 02:35:53 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:57728 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbfJBGfu (ORCPT ); Wed, 2 Oct 2019 02:35:50 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x926ZiWX013110, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x926ZiWX013110 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 2 Oct 2019 14:35:44 +0800 Received: from localhost.localdomain (172.21.68.126) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.468.0; Wed, 2 Oct 2019 14:35:43 +0800 From: To: CC: , Subject: [PATCH 13/14] rtw88: fix NSS of hw_cap Date: Wed, 2 Oct 2019 14:35:30 +0800 Message-ID: <20191002063531.18135-14-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191002063531.18135-1-yhchuang@realtek.com> References: <20191002063531.18135-1-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.126] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ping-Ke Shih 8822C is a 2x2 11ac chip, and then NSS must be less or equal to 2. However, current nss of hw cap is 3, likes hw cap: hci=0x0f, bw=0x07, ptcl=0x03, ant_num=7, nss=3 This commit adds constraint to make sure NSS <= rf_path_num, and result looks like hw cap: hci=0x0f, bw=0x07, ptcl=0x03, ant_num=7, nss=2 Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index f7044e8bcb5b..bd2d3f9bc049 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1077,7 +1077,8 @@ static int rtw_dump_hw_feature(struct rtw_dev *rtwdev) rtw_hw_config_rf_ant_num(rtwdev, efuse->hw_cap.ant_num); - if (efuse->hw_cap.nss == EFUSE_HW_CAP_IGNORE) + if (efuse->hw_cap.nss == EFUSE_HW_CAP_IGNORE || + efuse->hw_cap.nss > rtwdev->hal.rf_path_num) efuse->hw_cap.nss = rtwdev->hal.rf_path_num; rtw_dbg(rtwdev, RTW_DBG_EFUSE, -- 2.17.1