Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp13999pxj; Thu, 10 Jun 2021 13:20:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9ey9dbPFAXLl5uywh/DGaEnl2yEvysFjekEilgTqe5cJEA/AwDhQwDRm0EmWr5RuuVmNP X-Received: by 2002:a05:6402:42cb:: with SMTP id i11mr257505edc.242.1623356427850; Thu, 10 Jun 2021 13:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623356427; cv=none; d=google.com; s=arc-20160816; b=LVg3HCNt99xnhHIxLumeat1dq0RBeRaxTeE4Atk0j3U7SQiLJ067JIf9r/95lRnlhK fitHj3/fLqKNdmS/YAHglJ+JugXNKrGwa4GR4fQobNFV7yZ5RmLfyGxCcZp7LkmB6pWQ V+B/mkm0xlagDtBuJvbfYb0MUX0LNO9Hm0VKVtRu8CP6xMMMepmig8v5pmf2nVpYSrZp eR/A6UEWatBcQhJ8VUjts5Xc+QLNVLF6QRSuhgYSWRFVjGVV2zTEtmdbCR0Vt776UNCm qYvTYkqEvD0t0Fgpu6LEXFXIsLiDf9mEHM2KwlbOYVm9pUZA5ryvmQZckvlvn7iRkx4a 1JqA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=FCelf4US11Q05P3AlExPJcV4nXPgbIOE72vZj0asrow=; b=fEsXW0VEMZ2DdiXsDnklAM0xYj1ifFFzg+pCaU11jgOEaMdEyVNzlPAoCpb/lZZ+89 sRmzH3+jh9BVutFA3saad8H386S/3ssMauafWi0QyoOBKIRk+xkEth9Sv9WI88BAQZdE 3SpGQ2lytY4M8kvkMNMx/U1W0aMiI+OvKJyGZPfd43ghEoZcu+A4clWhpKMaznEs8T87 0XxKSXhDRhHk4HEvPqjsLZ0M66gdH9wljMEqNRv6Q3zImv4T6+EJvKAe1HH5viTI61ui x82DjDLFTYNBZdLaHNdxr/Pwm6SAZnQqcyHJ79CCZX4WbfalpPcPAOg+Tyy8q1mBeuJp WtRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb8si3549164edb.249.2021.06.10.13.20.04; Thu, 10 Jun 2021 13:20:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230255AbhFJUUr (ORCPT + 99 others); Thu, 10 Jun 2021 16:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbhFJUUq (ORCPT ); Thu, 10 Jun 2021 16:20:46 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E38B5C061574; Thu, 10 Jun 2021 13:18:49 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1lrR8V-0050Za-8D; Thu, 10 Jun 2021 22:18:43 +0200 Message-ID: <5bb08a2db092c590119ff706ac3654de14c984fc.camel@sipsolutions.net> Subject: Re: [PATCH v2 1/2] rtl8xxxu: unset the hw capability HAS_RATE_CONTROL From: Johannes Berg To: chris.chiu@canonical.com, Jes.Sorensen@gmail.com, kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 10 Jun 2021 22:18:42 +0200 In-Reply-To: <20210603120609.58932-2-chris.chiu@canonical.com> (sfid-20210603_140802_983573_B146892B) References: <20210603120609.58932-1-chris.chiu@canonical.com> <20210603120609.58932-2-chris.chiu@canonical.com> (sfid-20210603_140802_983573_B146892B) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Chris, > Since AMPDU_AGGREGATION is set so packets will be handed to the > driver with a flag indicating A-MPDU aggregation and device should > be responsible for setting up and starting the TX aggregation with > the AMPDU_TX_START action. The TX aggregation is usually started by > the rate control algorithm so the HAS_RATE_CONTROL has to be unset > for the mac80211 to start BA session by ieee80211_start_tx_ba_session. > > The realtek chips tx rate will still be handled by the rate adaptive > mechanism in the underlying firmware which is controlled by the > rate mask H2C command in the driver. Unset HAS_RATE_CONTROL cause > no change for the tx rate control and the TX BA session can be started > by the mac80211 default rate control mechanism. This seems ... strange, to say the least? You want to run the full minstrel algorithm just to have it start aggregation sessions at the beginning? I really don't think this makes sense, and it's super confusing. It may also result in things like reporting a TX rate to userspace/other components that *minstrel* thinks is the best rate, rather than your driver's implementation, etc. I suggest you instead just call ieee80211_start_tx_ba_session() at some appropriate time, maybe copying parts of the logic of minstrel_aggr_check(). johannes