Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5629641rwi; Sun, 23 Oct 2022 09:08:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4EQyLnqPLUwET/yzJvc+VKmK11KGtyvtvC/CTTnAYoWEkngLmvbiPUQFbuDeOdCO2xcJLT X-Received: by 2002:a17:907:2cf7:b0:78d:c7fc:29ff with SMTP id hz23-20020a1709072cf700b0078dc7fc29ffmr24526226ejc.748.1666541332681; Sun, 23 Oct 2022 09:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666541332; cv=none; d=google.com; s=arc-20160816; b=iihKDSr3thejX6jkpF/ZpMN2wzyndZH9r9ycAce3OeuZa3U44rNlaNLAzU+SpmP5t5 oLnedd+wEC7NoHW66CE7OyHVokpKRIdJEY9yBRqCiDpRfoBA8EgM69jh4DjYMIP3Q8uW gS/NbwAL9HCfuvvqyauNTA+89E/MFvYe1J/hIrbdccqZOIT6jGj2d2EgUdOrwYVUkKLN mXbKeKYzZVTKO7hkflVa09t+BlrjM3o3TlxOvWUoa5T5Y1Nc7yfSJWun7VGFPArIzU0v +1JewvC1jCZY8cnKcUo4pjKYJXFimu7P+qoFzo7BvY47MiYyMcSEURk6fMGJh2KPu4sK Tgww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:mime-version:date :content-transfer-encoding:references:in-reply-to:to:from:subject :message-id:dkim-signature; bh=k4hAD0/JhpOQQ2YRrCC3BNRToFQvLvPNcbphVCwF1u8=; b=WXhu6gsYOtgntB0SjhDKPM28wEXVf5LKZL4o3IGBywYPgmn+/nAUil3lFKBNd49wov 7ChSWkcv6j89sOe+WgeebasQUjtMm/v3xUfFZ4XBcvlkUynTlzgF+EiU2BSedvqgi+fo Q11phUVSKEwtM20awYnRCAxTrJX6IPlTG2kwMRcRw2skJtHwMpWPKsC8ZIncK/V6ivCL KhcXJusL3syuBVtLv3V9J3gLssRZlgNpsyZ3DLoA9ELThhtwj9h0MqFhIP7Jd9gHIr3K lsrrdvZhVuyrguvp1NFvQ7vcertGZFekLV0OjfWwVmZaakU+JniYgko5PLdyHptyidJY +1HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=c72lcdGo; 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=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a50d78a000000b004539b045326si25866220edi.417.2022.10.23.09.08.32; Sun, 23 Oct 2022 09:08:52 -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=@sipsolutions.net header.s=mail header.b=c72lcdGo; 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=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbiJWP5D (ORCPT + 65 others); Sun, 23 Oct 2022 11:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbiJWP5C (ORCPT ); Sun, 23 Oct 2022 11:57:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B73D11EACF for ; Sun, 23 Oct 2022 08:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Date:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=k4hAD0/JhpOQQ2YRrCC3BNRToFQvLvPNcbphVCwF1u8=; t=1666540620; x=1667750220; b=c72lcdGoYysUW+WMEvvWct1MYyuZn+ilt9g+strgnUR/1Ie 8NBjPS25ArBHaB2ECxvcs49lQX0eKk3IkZz6M7lhKa1dPUs0X8CjlHPYv/tDV2sKUPfXdnMS4YNRp ZxChJlihsAATVx9I5BNFogNMt98ByLw/7pagWDJ6CcXKNLu2anAeku33685BbbbBXIRK/z7Hzc7ga rABi+3266L1Hak9BTPAeEQZavfV5afbtZHblBpcCvDoEEP8I1QyfY4DMvfYVc6UOgePAIlVLxBfnh dLstYOsy0Kv9vvG5oinrW1y/vhgkL0nOaPnh/A41MTQHb3zO4NnhvIORdPIdfXaQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1omdLI-00EbZ6-1w; Sun, 23 Oct 2022 17:56:58 +0200 Message-ID: <472d5d4687ddbecfbf97419d223b4d1b472777e1.camel@sipsolutions.net> Subject: Re: How to use the rate control in mac80211? From: Johannes Berg To: Bitterblue Smith , "linux-wireless@vger.kernel.org" In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Sun, 23 Oct 2022 17:53:00 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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, > I thought it's like this: > 1) don't set HAS_RATE_CONTROL yes > 2) tell the chip to use the rate from tx_info->control.rates[0] I'd prefer you didn't, that's also very limited :-) > 3) report if the frame was acked or not Kind of. It'd be better if new drivers used sta_rate_tbl_update method, so it'd be something like 1) don't set HAS_RATE_CONTROL 2) implement sta_rate_tbl_update(), using the table of rates given there to instruct the device to transmit frames at those rates 3) on TX success/failure, fill in a struct ieee80211_rate_status array=C2= =A0 that indicates which rates were used and how many times until the eventual success or failure; this is in struct ieee80211_tx_status 3) alternatively, fill in the tx_info rates array the same way and report it that way, but that's less flexible johannes