Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp188649pxb; Wed, 24 Feb 2021 23:04:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxu+AywpGAFyZUuUoVOp2bRnb8g4yglf6XMS262EjK40k9vPCo0OL1iBQ66c9EpJFV2zL+E X-Received: by 2002:aa7:d296:: with SMTP id w22mr1502076edq.264.1614236688646; Wed, 24 Feb 2021 23:04:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614236688; cv=none; d=google.com; s=arc-20160816; b=wzbhRQg8aEcoERm/z/FeAPo1CG4N05KXCsQBEzYwsujuTOjNoJO+BK6JsDYoySNTtj gLmxJs2Lo2e0vuzojEnteE9oA3tNA8dKnBVAvkzLRQdfJY5qPsQjDp3vEP01IsLwRz35 DyUcmQxvX9NGKy0r8BKwVdbMtWCzTNIc/T440twwj1AmKNglmK4sUefnZV437c6SBDYv uaHYYXOlERCwv+PncTyRSt5G1HQixa8k21yUE5H1Fysb9pWe+bq6AXkvknkfNCm6wXBn Ge7mweGvLCD+XwfztqxveDEqGXkjlpTgzPtawF9xM0NlIdnhKPFmT6Z3IvaZz0SrKXLI 8aqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=RUkiblEX6k7SkOtyRna6i4RncJvcI5S0kDjCuDFa9Uc=; b=PlVu+tKjbJX3qCe/P+oik7CykpQ+Dnk1fzX9/ZkkBSzAXdic/KnZPJ3vLnfy2Q9sPe p5QEWCWpYyEC7mlZuHft0x3ReM08nuLHvoeVsfUbfE+oSEx5SgvwLJ7i/ombsKyLrsKT 7wOAxBv3sUPPAWGOTNO3yZsts0ZFCzUYPR/Ifpj4WmvlLu5REq72cEx9Y5nC3BmPope7 ZJn92BkEUKp6LTMRFZrGquF426yyeZ/PNtHmnUn5bHanIvYo8Q8tO0jg9nLvEhEXyXIs +4r2wN9Rhj0KfZt3PAKXlQMMyXAaoIHhU2Z7DyZY5wztkiouJ4FkZsAO9vVF76Q3iFVP 3dFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si2601664edv.165.2021.02.24.23.04.25; Wed, 24 Feb 2021 23:04:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233136AbhBYG4j (ORCPT + 99 others); Thu, 25 Feb 2021 01:56:39 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:58283 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230315AbhBYG4i (ORCPT ); Thu, 25 Feb 2021 01:56:38 -0500 X-UUID: db4df52e27a54bb4b279e7f862c87c03-20210225 X-UUID: db4df52e27a54bb4b279e7f862c87c03-20210225 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1392478194; Thu, 25 Feb 2021 14:55:51 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 25 Feb 2021 14:55:49 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 25 Feb 2021 14:55:49 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH 1/2] mt76: mt7915: add missing capabilities for DBDC Date: Thu, 25 Feb 2021 14:55:47 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: CF6DFAB3971B36041B291C99A6850B751C4D956D940F94A63540AE663B25A4902000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This improves dbdc performance. Signed-off-by: Ryder Lee --- .../net/wireless/mediatek/mt76/mt7915/init.c | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index c599b44a728c..3f3312d4c38d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -113,6 +113,20 @@ mt7915_init_wiphy(struct ieee80211_hw *hw) ieee80211_hw_set(hw, WANT_MONITOR_VIF); hw->max_tx_fragments = 4; + + if (phy->mt76->cap.has_2ghz) + phy->mt76->sband_2g.sband.ht_cap.cap |= + IEEE80211_HT_CAP_LDPC_CODING | + IEEE80211_HT_CAP_MAX_AMSDU; + + if (phy->mt76->cap.has_5ghz) { + phy->mt76->sband_5g.sband.ht_cap.cap |= + IEEE80211_HT_CAP_LDPC_CODING | + IEEE80211_HT_CAP_MAX_AMSDU; + phy->mt76->sband_5g.sband.vht_cap.cap |= + IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 | + IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; + } } static void @@ -253,9 +267,6 @@ static int mt7915_register_ext_phy(struct mt7915_dev *dev) ETH_ALEN); mt76_eeprom_override(mphy); - /* The second interface does not get any packets unless it has a vif */ - ieee80211_hw_set(mphy->hw, WANT_MONITOR_VIF); - ret = mt7915_init_tx_queues(phy, MT7915_TXQ_BAND1, MT7915_TX_RING_SIZE); if (ret) @@ -637,19 +648,12 @@ int mt7915_register_device(struct mt7915_dev *dev) return ret; mt7915_init_wiphy(hw); - dev->mphy.sband_2g.sband.ht_cap.cap |= - IEEE80211_HT_CAP_LDPC_CODING | - IEEE80211_HT_CAP_MAX_AMSDU; - dev->mphy.sband_5g.sband.ht_cap.cap |= - IEEE80211_HT_CAP_LDPC_CODING | - IEEE80211_HT_CAP_MAX_AMSDU; - dev->mphy.sband_5g.sband.vht_cap.cap |= - IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 | - IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; + if (!dev->dbdc_support) dev->mphy.sband_5g.sband.vht_cap.cap |= IEEE80211_VHT_CAP_SHORT_GI_160 | IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; + dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; -- 2.18.0