Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp117950rwb; Wed, 21 Sep 2022 18:38:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52jcnEyTLbm7xcXuW5J6QWEK5m6sH1L+hs53F/dnr9UqeSviyLbNO72CKYwp/MdBnnhWF5 X-Received: by 2002:a05:6402:d05:b0:425:b7ab:776e with SMTP id eb5-20020a0564020d0500b00425b7ab776emr910340edb.142.1663810697294; Wed, 21 Sep 2022 18:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663810697; cv=none; d=google.com; s=arc-20160816; b=Fixc8tGMZTsDKve3ihkswUjX4maxNU2gug9WolUtpj79/Y5dqChza1v1Os/X514Zth KxI9m+6/50r6x4H/XLeMXuwpqJ7XJmYrtko4t3Ipou0ZFg2JNw6X481zt+bJHlnjSVNc UDp+byj0wMMQyYjra8r93QeKfQtjkI7mf4iQcP113gA2MwQfshCRz/hLoj/ghI5XDn0k P2hCmufEy7a4Kfz9GuhmYVONjsesQsxQUILhnteGNI7nnDrSI9fqZOAnYv9xw+LweLrP zzZ7HiLKfEs3Q9VCRrBkVPKelvNHZABViYcSDaqs+RH0i0nJBqNN9jr2TR0OB8d0iJ+g 3YPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:authenticated-by; bh=Uj7BLrjGyRojhy4RPbgFtmwziaoI/Ms7pWrR3q0wO0o=; b=W0aFMco46D4PrrUGMFzfIVIc9XD8MqJTtAOsOHOZKemsnVbnuJxQs5tKczK47fpdGz gIDQbEDPj1V42sZ27257rF28A6CmggBU+udq+0P7NlXczw6mKNhGUYY+2gCGMcGDV2Su rJR3aEL/IWE+fErsssaJ0Ns5jDLRngIuGRIriikmuZ634dCxtn3RfTy+P62pV1AniX3M ++wEAAH0Dd/iCI0wWa03MOapfzInE17qSIhcTqgnhyXkn8L7raQ0P9qCv9YHdWot+X/k SlT8J2NXP6TolNsju0XbxPmqbYMh0pogzUdQ8jK3y353/d6NB6quRUFYAGUcdibOViXa BkgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a1709062f8900b0073d8ccd37c2si3256094eji.107.2022.09.21.18.38.00; Wed, 21 Sep 2022 18:38:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbiIVB2W (ORCPT + 63 others); Wed, 21 Sep 2022 21:28:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbiIVB2U (ORCPT ); Wed, 21 Sep 2022 21:28:20 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1A511A4B00 for ; Wed, 21 Sep 2022 18:28:18 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 28M1RmdB6008531, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 28M1RmdB6008531 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 22 Sep 2022 09:27:48 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 09:28:11 +0800 Received: from localhost (172.21.69.188) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 22 Sep 2022 09:28:11 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH] wifi: rtw89: support for enable/disable MSDU aggregation Date: Thu, 22 Sep 2022 09:27:37 +0800 Message-ID: <20220922012737.15091-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.69.188] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: trusted connection X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 09/22/2022 01:08:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: =?big5?B?Q2xlYW4sIGJhc2VzOiAyMDIyLzkvMjEgpFWkyCAxMDo1MjowMA==?= X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Kuan-Chung Chen To enable/disable amsdu in set_tid_config, and currently only support to configure all tids (==0xff) for AMSDU, not individual tid. The command example is: iw wlan0 set tidconf tids 0xff amsdu off iw wlan0 set tidconf peer xx:xx:xx:xx:xx:xx tids 0xff amsdu on Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 8d2cce450241f..2de9cc9f06201 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -2583,6 +2583,13 @@ static void _rtw89_core_set_tid_config(struct rtw89_dev *rtwdev, spin_unlock_bh(&rtwdev->ba_lock); } } + + if (mask & BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL) && tids == 0xff) { + if (tid_conf->amsdu == NL80211_TID_CONFIG_ENABLE) + sta->max_amsdu_subframes = 0; + else + sta->max_amsdu_subframes = 1; + } } } @@ -3237,6 +3244,8 @@ static int rtw89_core_register_hw(struct rtw89_dev *rtwdev) hw->wiphy->tid_config_support.vif |= BIT(NL80211_TID_CONFIG_ATTR_AMPDU_CTRL); hw->wiphy->tid_config_support.peer |= BIT(NL80211_TID_CONFIG_ATTR_AMPDU_CTRL); + hw->wiphy->tid_config_support.vif |= BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL); + hw->wiphy->tid_config_support.peer |= BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL); wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0); -- 2.25.1