Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp748896ybb; Wed, 25 Mar 2020 08:52:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvCB72b67Qgcuhc5qmJXtxUoevREucVXxQN75GC0QW31fD5XYZfN8FJcuSaOw07QhFDi0Bc X-Received: by 2002:a9d:bf7:: with SMTP id 110mr3087148oth.259.1585151570591; Wed, 25 Mar 2020 08:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585151570; cv=none; d=google.com; s=arc-20160816; b=czYJF1p/8gm9r5KT/jrXYDc24tr04vfYIzwPVRnFJaOjV4zeJ+JKYZNgK08aSXTEyz oUP8uMHque1gupMBWLuQ57D56KwyBa7yR9kcJ/QOT0L5r4sKBLMX0do9YuybDRHk+HpK z0j5VwXyVglrhP2WCu5jrS0QX6agnCvVr/YKJ9NtUJteKbBOVP9kmY7BgpXwthFV9ulV nnsjlbGlhilyBUQh7fqjHaM2YqFDa3BhCx7sZgEgw2zRGhLQK28U1FWK+96br1DYzlaQ PtWnofkoDd6x0INzGVys12E3ol49b4tRLqXAC3i5PC6fBNSdoUrlpnlGArwTbcsMnNtD gijw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:dkim-filter; bh=gtERArAZLXFlbXRpv/NE5n/VPUEbhJMhz/LR3O4CKpI=; b=BDkBFajdokYsr+GIWmlsfzwMDYSQs7WFlsVrGSG5dz65tEb9VaoJ6V4upzY/xHd4v+ RDJ2p/W9iK7rPJam28IpdbFGI+Exy7fSBNCdZtT0tOd3Kj2Il2esT/r9v+T+zDD1JTHr 2RGTyQw8ARSSkcr1w0oNHV2gX7pDaAJ5rXPBwTbxo53ZbWuFzfeIk7Xsfge6b0X6tdrn rBo3fEFKXQTQZ3SQsIAO2Yi2l7CtJbDKPEfzYj+G5u8SM2ZNQPt66FkZ5ghwpJSDR6ex sfNTuF7UBlVIHQGuIKEd7vAJ/OpVwT1QPdPoiqfEvpEWhDbxWzRFc8SmIRwnuVZtzm+d V8MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=FduHvGBn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z23si10710902oih.275.2020.03.25.08.52.29; Wed, 25 Mar 2020 08:52:50 -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; dkim=pass header.i=@candelatech.com header.s=default header.b=FduHvGBn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727950AbgCYPwJ (ORCPT + 99 others); Wed, 25 Mar 2020 11:52:09 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:53376 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727848AbgCYPwJ (ORCPT ); Wed, 25 Mar 2020 11:52:09 -0400 Received: from [192.168.254.4] (unknown [50.34.189.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id 8D74713C342; Wed, 25 Mar 2020 08:52:07 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 8D74713C342 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1585151528; bh=0aedoWyQml+RdvPqBuZm22iy6O2WCBs22INQpZBreF8=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=FduHvGBnOOU52bRJP13sHgTrfwJTh5aus6UD8+kY3J4F25/hftrfvSbLjeFFBrOj0 aMruhbbcrtrzieVVqq977bdY2YBiLxE+4v0NmNx3AyWxSo/aI4PJ+YM4PzQ7v3AuJJ cwCw1l/IpaOXg7fHds4whXjRDgXv9ITxmJpxug4M= Subject: Re: [PATCH] rtw88: add debugfs to fix tx rate To: Brian Norris , Tony Chuang References: <20200313065114.23433-1-yhchuang@realtek.com> <87eetwo87q.fsf@kamboji.qca.qualcomm.com> <2e492e530d744713871f885e324106ef@realtek.com> <87eetrlanb.fsf@kamboji.qca.qualcomm.com> <875zf3kn05.fsf@kamboji.qca.qualcomm.com> <3894907ca6bf4566b8716731492a869b@realtek.com> Cc: Johannes Berg , Kalle Valo , "linux-wireless@vger.kernel.org" From: Ben Greear Message-ID: Date: Wed, 25 Mar 2020 08:52:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 03/24/2020 10:16 PM, Brian Norris wrote: > On Tue, Mar 24, 2020 at 7:55 PM Tony Chuang wrote: >> Brian Norris writes: >> We want to measure the TX power, and the equipment just cannot >> detect the signal on some rates, unless we "fix" the rate exactly. > > I think we all understand this now. > >> So NL80211_CMD_SET_TX_BITRATE_MASK is not so useful for us >> sometimes. > > I'm not sure if you have directly explained why this is the case. See > your comment earlier: > > "This command just mask out some of rates that are not allowed." > > Sure, but if you mask out all but 1 bitrate...voila! A fixed rate! So, see this thread from a while back. Has anyone even *tried* to use this API you are proposing? http://lists.infradead.org/pipermail/ath10k/2017-October/010291.html Here is the fix I have had in my tree for a few years to let ath10k actually set a single rate: [greearb@ben-dt4 linux-5.4.dev.y]$ git show cccf04cc3440ddee0760249da51026bf2532f926 commit cccf04cc3440ddee0760249da51026bf2532f926 Author: Ben Greear Date: Tue Oct 10 13:56:29 2017 -0700 mac80211: Revert some of e8e4f5, fixes setting single rate in ath10k. This lets us successfully set a single rate in ath10k again. Signed-off-by: Ben Greear diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 78cf453cda2c..3f248ad70805 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2886,8 +2886,10 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, u32 basic_rates = sdata->vif.bss_conf.basic_rates; enum nl80211_band band = sdata->vif.bss_conf.chandef.chan->band; - if (!(mask->control[band].legacy & basic_rates)) - return -EINVAL; + if (!(mask->control[band].legacy & basic_rates)) { + pr_err("%s: WARNING: no legacy rates for band[%d] in set-bitrate-mask.\n", + sdata->dev->name, band); + } } if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) { Thanks, Ben > > And this: > > "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." > > That's entirely your fault, not the fault of the API. If your firmware > doesn't listen to your driver, then that's either your firmware or > your driver's fault. If you set a mask that has exactly 1 bitrate in > it... well, that's exactly what you should tell your firmware to do. > Not, "use this 1 bitrate, but try something else if you feel like it." > > Now, there are other problems, like the others that Ben mentioned: the > rest of the mac80211 framework doesn't like it too much if you really > disable all but 1 rate (arguably a mac80211 bug -- but not a nl80211 > bug); or maybe you want to differentiate management frames and data > frames (and that's not what the current > NL80211_CMD_SET_TX_BITRATE_MASK allows for). > > I'm still not (personally) expecting that you *must* do this all via > the existing CMD_SET_TX_BITRATE_MASK, but to satisfy everyone involved > here, you at least need to be clear about why you aren't. > > Regards, > Brian > -- Ben Greear Candela Technologies Inc http://www.candelatech.com