Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp274154pxj; Fri, 28 May 2021 03:47:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfl4CFlXFdw07fLKVk2tZZNKdm8sHcWOd+4vVoKr3nqwcNpBodIzm0089OTzsYu9d5m89Y X-Received: by 2002:a17:906:1b57:: with SMTP id p23mr8517564ejg.176.1622198851558; Fri, 28 May 2021 03:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622198851; cv=none; d=google.com; s=arc-20160816; b=dPnMvMm4EO3X4dqDzKXgrBKxgQdBz3LopXjGHCGbSMuL92lfYtMmXZsFEp6CxnFFjh DgWfch7RVAQgAfQrOzgVbJn8CMoHrRDYRlfudmSpTWdi3wC8k9WC+SllSL9BLbwpQTZB Rwc9FuIn4ok4urEwq5qgwpLWnvSqABVYi4KtY3Q/PQLr0Hj1NTG/C2+uHwD2KQ1d7iCd /H/fTQj6qKeYPnDESN7ylcbJA6TqQexyjVGxHf/FwnzhNybzePV20ReakFe+EZtwdoXv YtYpXwT2nQwtJrznpP16Qx3SIaAbK0+zcTdGHBlKrvsZLLdLD/Qh1z7u+zcGnWOLHRuM HtoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=p1NK99aPFSB8QTV/sKownsRI6Ob8XM4fTlge9bL40ag=; b=J92lhkvAGrRYv3lKPtTIP7TWnbfI/FStFYuvVcgeu86J5jhMO3mvcKrJVXfqbzR/f+ 7c0giK5rKo2strnzrMM2m7am7vJWzrT8AKRBARkdpTzLMc6Dvjoui7n0ko385a602SDw FWWhH+r/f/68RcLTygoJFCk7RAxXbMh5JY9nNmt+fbqKvno9Nvn+pN+NTwK4XfhZwk5l bGvXidroWz1w1PoicXI0STVuurub1TI1EKblpqEhDVrP7xjTXvRtAlVxxxlMhJAzaYOB lK1x2ZNRzEO6SJJVP5LJOngtMg0eCSxBN5pWGAYlBtubo79T4qCiP6dofF8BN+JyBeyr AS1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=lVi7YGb6; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si124531edy.600.2021.05.28.03.47.04; Fri, 28 May 2021 03:47:31 -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; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=lVi7YGb6; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236423AbhE1KsS (ORCPT + 99 others); Fri, 28 May 2021 06:48:18 -0400 Received: from lpdvacalvio01.broadcom.com ([192.19.229.182]:38570 "EHLO relay.smtp-ext.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236170AbhE1KsR (ORCPT ); Fri, 28 May 2021 06:48:17 -0400 Received: from bld-lvn-bcawlan-34.lvn.broadcom.net (bld-lvn-bcawlan-34.lvn.broadcom.net [10.75.138.137]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id D67D889C8; Fri, 28 May 2021 03:46:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com D67D889C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1622198802; bh=Zw0jEQhCQ7WPd1T8DnlcrjRRkKDIDNlohFb+UWsqnn8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=lVi7YGb6rX6KEWlOB8oNJi7N0+56AgflHACPxOwN5P2KQPCIPIJufb2zMn/5BpUEg WeBaQ1VK+Hx9cuQzR7WrL7F4BDae9KcTyssY0IiDFU2b6zaNZXLDrKPkeh1YAKCprV CsGsfM+vhNO0+dUVsJNxvgq3LOnosgc02V7rP05k= Received: from [10.230.41.88] (unknown [10.230.41.88]) by bld-lvn-bcawlan-34.lvn.broadcom.net (Postfix) with ESMTPSA id E27451874BE; Fri, 28 May 2021 03:46:40 -0700 (PDT) Subject: Re: [PATCH v2 3/4] mac80211: add rate control support for encap offload To: Ryder Lee , Felix Fietkau , Johannes Berg Cc: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Bo Jiao , Sujuan Chen , linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org References: <2176023d8f13d82d093452e1c105609396c30622.1622164961.git.ryder.lee@mediatek.com> From: Arend van Spriel Message-ID: <489e6d51-c3f0-452d-ab63-ba83bba7ec02@broadcom.com> Date: Fri, 28 May 2021 12:46:38 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 5/28/2021 8:05 AM, Ryder Lee wrote: > The software rate control cannot deal with encap offload, so fix it. > > Signed-off-by: Ryder Lee > --- > change since v2 - none > --- > net/mac80211/ieee80211_i.h | 9 +++++++++ > net/mac80211/rate.c | 9 ++------- > net/mac80211/tx.c | 18 ++++++++++++++---- > 3 files changed, 25 insertions(+), 11 deletions(-) [...] > diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c > index d3016c3a3069..0a4bc9e08637 100644 > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c [...] > @@ -729,7 +730,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) > "%s: Dropped data frame as no usable bitrate found while " > "scanning and associated. Target station: " > "%pM on %d GHz band\n", > - tx->sdata->name, hdr->addr1, > + tx->sdata->name, > + encap ? ((struct ethhdr *)hdr)->h_dest : hdr->addr1, > info->band ? 5 : 2)) Not related to this change, but I guess the band can also be 6 these days. Regards, Arend