Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2113971ybh; Sun, 15 Mar 2020 19:30:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvgKAMl4wXlKYINCmY62k5Jd3MgZtmbQV4rpSz480WSA+soKDAPfst765S8RgEcqsE3GpnV X-Received: by 2002:aca:fd09:: with SMTP id b9mr11663005oii.88.1584325825084; Sun, 15 Mar 2020 19:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584325825; cv=none; d=google.com; s=arc-20160816; b=YHKyektq9hBEaqtZk8pYSUJzQUILO7jLATeUayVu/2zSzTH0graA5F6zc9VDlC5RPq +FV3CVDxEKgGJUbw/F59zCbX1BJUDhLJS1D31ZgoLcvRulBwURExBMAH578sbghQqe1O A0g/YR+Z+GrwIS0nLS33vi07iHxcl8UvyINTOI88wwJpiC0WvpYpS5nD2rCs9Ccdsfz7 emCD4RRdTkG1q3TbakPovM73ImYxlxiDKgxwwsi6kbNCdVdKzvDgXLbJ1cgWpmstTDYp rB461RRV9RtG5WzoqN/yi4J3LGBCHrjnLPswCCdcEqqiSmnow5WH+qQSQFWBz/7BN3ll C91w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=L/68VygDDWVwqIa35Dq2wXu0MFbIEIL9+kx56BLZR2Q=; b=UOFHN9NcqJf1jTLSUlr3HUTMfEuGyJRQG1kE3V+ccOwM/F8UpwdRTMtN3XZr+m2HdA rtmbHJURFDriNmafeTc1oAS3Wloplez5J9yW54F0YNQIOqLHC5wbOzrIAbf/YHoSWAKh Nrd5iacw8AKkOeZ6ijwgqHHoAauRhHPkLey8JrGJG4LR5vIMhlWGtDNBr9Js7DInp0Bl jOcoJ7Bqm32+yydlyog0A+7pGqrllxnuxkxUHeY6idzau1s93t0Z9rlytXXfg1Ijq9sJ NHA/hIBB/JALL0lYjiDTBmfokxgbidGgPEUzt5GdZYsgl5WpdnDsmTCl2k5OiNSJrqlo bLJg== 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 c18si6548708otp.16.2020.03.15.19.30.07; Sun, 15 Mar 2020 19:30:25 -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 S1729417AbgCPC2O convert rfc822-to-8bit (ORCPT + 99 others); Sun, 15 Mar 2020 22:28:14 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:34971 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729329AbgCPC2O (ORCPT ); Sun, 15 Mar 2020 22:28:14 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID 02G2S5nT028967, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTEXMB06.realtek.com.tw[172.21.6.99]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id 02G2S5nT028967 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Mar 2020 10:28:06 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) by RTEXMB06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Mon, 16 Mar 2020 10:28:05 +0800 Received: from RTEXMB04.realtek.com.tw (172.21.6.97) by RTEXDAG01.realtek.com.tw (172.21.6.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Mon, 16 Mar 2020 10:28:05 +0800 Received: from RTEXMB04.realtek.com.tw ([fe80::d9c5:a079:495e:b999]) by RTEXMB04.realtek.com.tw ([fe80::d9c5:a079:495e:b999%6]) with mapi id 15.01.1779.005; Mon, 16 Mar 2020 10:28:05 +0800 From: Tony Chuang To: Kalle Valo CC: "linux-wireless@vger.kernel.org" , "briannorris@chromium.org" Subject: RE: [PATCH] rtw88: add debugfs to fix tx rate Thread-Topic: [PATCH] rtw88: add debugfs to fix tx rate Thread-Index: AQHV+QPS9h9ZLy9E5U2M/GVMmM07xahGU7JUgAQrRBA= Date: Mon, 16 Mar 2020 02:28:05 +0000 Message-ID: <2e492e530d744713871f885e324106ef@realtek.com> References: <20200313065114.23433-1-yhchuang@realtek.com> <87eetwo87q.fsf@kamboji.qca.qualcomm.com> In-Reply-To: <87eetwo87q.fsf@kamboji.qca.qualcomm.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.68.175] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Kalle Valo writes: > writes: > > > From: Yan-Hsuan Chuang > > > > It is useful to fix the bit rate of TX packets. For example, if > > someone is measuring the TX power, or debugging with the issues > > of the TX throughput on the field. > > > > To set the value of fixed rate, one should input corresponding > > desc rate index (ex, 0x0b for DESC_RATE54M to fix at 54 Mbps). > > Set a value larger than DESC_RATE_MAX will disable fix rate, so > > the rate adaptive mechanism can resume to work. > > > > Example, > > To fix rate at MCS 1: > > echo 0x0d > /sys/kernel/debug/ieee80211/phy0/rtw88/fix_rate > > > > To not to fix rate: > > echo 0xff > /sys/kernel/debug/ieee80211/phy0/rtw88/fix_rate > > > > To know which rate was fixed at: > > cat /sys/kernel/debug/ieee80211/phy0/rtw88/fix_rate > > > > Signed-off-by: Yan-Hsuan Chuang > > No way, debugfs is not a method for working around nl80211 and doing > whatever idea you come up with. The goal is that we have a generic > nl80211 command for all generic actions, like this one. And I think we > already have an nl80211 command for fixing the tx rate, right? > No, as I can see, there's no suitable nl80211 command that can achieve what I want. If you are saying about NL80211_CMD_SET_TX_BITRATE_MASK, it's used to allow some rates. But actually the firmware has its own rate adaptive mechanism, so mask out the other rates does not mean the rate left will be chosen. Moreover, the hardware will choose a lower bit rate when retry, then the TX rate is not fixed at all. So the debugfs can disable the firmware's RA mechanism, also disable the TX rate fall back when retry. Both of them cannot be done by setting TX bitrate mask. I am sorry I need to add another debugfs for it, but to actually fix the TX bitrate, we really need another debugfs or module parameter. Because according to the design of the device there is not a good enough general command I can use to fix the TX rate. If there is a command that can fix the TX bitrate for me, please let me know, I can switch to it. Thanks, Yen-Hsuan