Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4683903rwi; Sat, 22 Oct 2022 14:39:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6us1jR49bD2nqoVuH4TvWLNbypbtZ1Os1Fhmh47+HETLXFRaxYg0Q+Q6k461Wx35iunC3x X-Received: by 2002:a63:6b09:0:b0:453:88a9:1d18 with SMTP id g9-20020a636b09000000b0045388a91d18mr21601457pgc.41.1666474757293; Sat, 22 Oct 2022 14:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666474757; cv=none; d=google.com; s=arc-20160816; b=iBT70fDP8ic72xwgx1EkxP0IjmnKeAeZSjIRd+desZozzh0eM+WmBtFDj9ym0rAwqC mpEZvBpoKfPLsptCk+eHoT/RNhBmUPkEjqN1Fz/iWvHSGmFWJP6JJy8jq0yJpC8nwktO yle9EEbRW9T8J1x5ywNb5/bPQ4EJWjA7cUmAvYvlsC4KkSqpb7zWWjTBTvTHNWM0dnMm HJTsDShHf5WwRA8/puIyAH7Nn1E9BR363YjJH2NiJU4imdzdjeFe6ig6HlIvBBevHeyd alVNyfraALuKlymKmMsTQvN1xd3y2xQEeldWdzjgWa2CUPXONPUuv8DyPPMK1IUzDZBL nZtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=EDWA+60UTCYGswOinUmtmnlUgicdh0TCqjY6V84YEMs=; b=eF3BLaZXUwu3ZVNOxEFHawLvB0qCAWn9qvZdBHlYyhjtK289o5b6WjhsPEFfxYK71M 0r1otbIT2X5I84I1PO+tr3Y8NQqfRBEtlXRe2JSFGAG3eM9l/Z04Yz+ggb9ij35M/l4J kMMTKJMc2RBcYRgYKNpQlsO9Qktrd8MFA0CLvstQA1vaPK/0pDPhYNXXNmc09hrhq6D4 3FP2i1rqTV5NNK3Yn2jRvbL9EPdDvRCPZni5WQ1Jp6d4P/Lej9upWFWCE3nf5J8n8+Dj 730EV56S9K1QnCIuluTMjVQXhuAcPbuhV2gtxJeTu14lZbQfxBdzbkquokWL3SPC3YNL zsIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ccKDdy5m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a63fb4c000000b0043541f027e0si28186062pgj.877.2022.10.22.14.39.01; Sat, 22 Oct 2022 14:39: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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ccKDdy5m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbiJVVYc (ORCPT + 65 others); Sat, 22 Oct 2022 17:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbiJVVY3 (ORCPT ); Sat, 22 Oct 2022 17:24:29 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83DE4B1F9 for ; Sat, 22 Oct 2022 14:24:26 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id m15so18127667edb.13 for ; Sat, 22 Oct 2022 14:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=EDWA+60UTCYGswOinUmtmnlUgicdh0TCqjY6V84YEMs=; b=ccKDdy5mdxppsWOs+ZJWlX2WD1HE00CxnqzU3v5enesmWnFA3mw1xCFbqUzUO3hPzn uqQ2wcnlxSBNzFsnupnS9MXGh4kqriqTxGWBCVd7yRQBsSY0XpCjABLknr0AsD2s+X0/ D4G+WCvNsnIWsHo2vap3bPt33ZIJ5pCd+LQ/ORHJZhb4moXdVSBAEl4AbLgXQVPD1x63 mWbzDK5+gLOc3sMVf1ttgcJ9aPYHPteu49Sf74kAiGQOOBpPdytj3VVQvM23uU1SiG+b Q72Pkmf2QwJVpNpBvXZEqC3Eb2vGNJrLbPUECs/gBfPS+LxWnftoUwkASTjvVrTfecqC et/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=EDWA+60UTCYGswOinUmtmnlUgicdh0TCqjY6V84YEMs=; b=DtApOr78DJMQKNoAoL2qBYSWbxM2/fgOOHfk4tFs9uJOzsTDymMt+DKKN0Vy9btGIW otF0DWEFDStCGWFzo3/nlqInXaDLMszwJC3KFUDwc6hJPMOZsTAdN3lo/KhK6BPvgdWl 5xpq5vRzCwp1JNbJDWq9UmLJZ1ahvLIYEjQqwFqLb77f3nyvsmMwamsHBd7Kfq0H8Irt 7yCYo7zGtLVGF2FpprckZhZXcOP5iWeIxP6k0LmpT8AU3bMsaM4I5Ig3/7JwqSdJ6ur1 Hz8ecLQqyj1lA8nPWx9ZCmn6JYmpg/A8CBpvf/SdztIKFYkH2CpsCdmgd5DxMtG8qquY 5DbA== X-Gm-Message-State: ACrzQf0V3tIaBdpttI7X2ulXWs/NPZWnXPaIWLwO/eK3/a6J/Y3gz74K kI2ZpR+9svjV/9kh/e8dBN/9kfX5NcE= X-Received: by 2002:a17:906:8453:b0:78d:b65a:abf1 with SMTP id e19-20020a170906845300b0078db65aabf1mr20715928ejy.696.1666473865104; Sat, 22 Oct 2022 14:24:25 -0700 (PDT) Received: from [192.168.1.50] ([81.196.40.23]) by smtp.gmail.com with ESMTPSA id r27-20020a056402035b00b00459012e5145sm15705205edw.70.2022.10.22.14.24.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Oct 2022 14:24:24 -0700 (PDT) Message-ID: Date: Sun, 23 Oct 2022 00:24:23 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Content-Language: en-US To: "linux-wireless@vger.kernel.org" From: Bitterblue Smith Subject: How to use the rate control in mac80211? Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Hi! What does a driver (rtl8xxxu) need to do to make the rate control work? I thought it's like this: 1) don't set HAS_RATE_CONTROL 2) tell the chip to use the rate from tx_info->control.rates[0] 3) report if the frame was acked or not But it's not that easy. I'm always getting MCS0. Currently rtl8xxxu doesn't ask the chip for TX reports and always sets IEEE80211_TX_STAT_ACK. I thought this would get me MCS7 for all data frames, but it doesn't. The rc_stats file from debugfs looks like this after using the connection for a while: best ____________rate__________ ____statistics___ _____last____ ______sum-of________ mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts] HT20 LGI 1 ABCDPS MCS0 0 1477 5.6 0.0 0.0 1 0 0 0 0 HT20 LGI 1 S MCS1 1 738 10.6 0.0 0.0 0 0 0 0 0 HT20 LGI 1 MCS2 2 492 14.9 0.0 0.0 0 0 0 0 0 HT20 LGI 1 MCS3 3 369 18.8 0.0 0.0 0 0 0 0 0 HT20 LGI 1 S MCS4 4 246 25.4 0.0 0.0 0 0 0 0 0 HT20 LGI 1 MCS5 5 185 30.7 0.0 0.0 0 0 0 0 0 HT20 LGI 1 MCS6 6 164 33.0 0.0 0.0 0 0 0 0 0 HT20 LGI 1 MCS7 7 148 35.1 0.0 0.0 0 0 0 0 0 HT20 SGI 1 S MCS0 64 1329 6.2 0.0 0.0 0 0 0 0 0 HT20 SGI 1 MCS1 65 665 11.6 0.0 0.0 0 0 0 0 0 HT20 SGI 1 MCS2 66 443 16.3 0.0 0.0 0 0 0 0 0 HT20 SGI 1 MCS3 67 332 20.4 0.0 0.0 0 0 0 0 0 HT20 SGI 1 S MCS4 68 222 27.2 0.0 0.0 0 0 0 0 0 HT20 SGI 1 MCS5 69 166 32.8 0.0 0.0 0 0 0 0 0 HT20 SGI 1 MCS6 70 148 35.1 0.0 0.0 0 0 0 0 0 HT20 SGI 1 MCS7 71 133 37.3 0.0 0.0 0 0 0 0 0 HT40 LGI 1 S MCS0 128 711 10.9 0.0 0.0 0 0 0 0 0 HT40 LGI 1 MCS1 129 356 19.4 0.0 0.0 0 0 0 0 0 HT40 LGI 1 MCS2 130 237 26.0 0.0 0.0 0 0 0 0 0 HT40 LGI 1 MCS3 131 178 31.4 0.0 0.0 0 0 0 0 0 HT40 LGI 1 S MCS4 132 119 39.6 0.0 0.0 0 0 0 0 0 HT40 LGI 1 MCS5 133 89 45.6 0.0 0.0 0 0 0 0 0 HT40 LGI 1 MCS6 134 79 48.0 0.0 0.0 0 0 0 0 0 HT40 LGI 1 MCS7 135 71 50.2 0.0 0.0 0 0 0 0 0 HT40 SGI 1 S MCS0 192 640 12.0 0.0 0.0 0 0 0 0 0 HT40 SGI 1 MCS1 193 320 21.0 0.0 0.0 0 0 0 0 0 HT40 SGI 1 MCS2 194 214 27.9 0.0 0.0 0 0 0 0 0 HT40 SGI 1 MCS3 195 160 33.5 0.0 0.0 0 0 0 0 0 HT40 SGI 1 MCS4 196 107 41.8 0.0 0.0 0 0 0 0 0 HT40 SGI 1 MCS5 197 80 47.8 0.0 0.0 0 0 0 0 0 HT40 SGI 1 MCS6 198 71 50.1 0.0 0.0 0 0 0 0 0 HT40 SGI 1 MCS7 199 64 52.2 0.0 0.0 0 0 0 0 0 Total packet count:: ideal 4 lookaround 1 Average # of aggregated frames per A-MPDU: 1.0 It looks like the rate control algorithm is not getting any information. (Also, why are no CCK rates listed? With mt7601u there are CCK rates too.) What to do?