Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2323657rwn; Fri, 16 Sep 2022 08:38:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6phUFYdnfZpz9k0XBocAzmvh9FRFP2llkJCPewWnOO5jblm3n7DFUuqnFm/C8/ffKwKvGa X-Received: by 2002:a17:902:f60f:b0:172:86f6:241b with SMTP id n15-20020a170902f60f00b0017286f6241bmr432313plg.162.1663342687889; Fri, 16 Sep 2022 08:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663342687; cv=none; d=google.com; s=arc-20160816; b=WFZ9LuldoC4m3zhmiBMIo9g+ToPszd8K8RSalhoYF97E/0zVkXQu03WESFZthCm8aX l9fMY7E86TRDAFpdgjQF9rdlEEJM6yxtblWo2urUSN5ymEVI/P/8cKk0arLr7NpRufhq rRx48/dh079mSHyeBxzbCPf15aVi6wv65e1F2D9Bw9YCYqXSnCY8JzWKwuqZDyfOZ9aw JVaTQ8c/NzKNdcNywSkDmQi7yR8Ne+aFkvhej5EkhypMYe0vrAs+xLbDmctBhYRdeXOv fhvYto98V1TIf9i+JLL9nwfyGoLWuPeQKywS2EGCHqmVGTw4L5mzyBxlBiHKmtVwSArZ 6n1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=INFQFudAs4nKStIvoqPpyrmfJKCcgzNpJS8nKrPHAXI=; b=uQAhfffU+6ZgqpO5yK17cpbEnwZ1TcdE0P7o4EM65x1sPlUM69hZQDYTE87LDf6zg1 jHWu0Ubq8zaroSnmr9Zmn1xh39uH50dfpKoQLhegZk+D8yFzmTdJ5pxervj1nGcLxKrh ghtqTTXYTjzLnIYB3pXUx33Hfb6mxWiStLb9cy3n2PW24Otz8IrY1TRAtgv2cjQqx8l4 0SjHjv2DChOZeWUEFzjTpj0X/dPvY3xFzKePjITvdjwDlVO9M9IBKVAX1IhtHHR1Y1Pz 04J1Yjob7Q3OfoD/+X6RAbNaphVzpSu8MiyEfzdILaGZHj48s1SXjSStV/H73bBVTlE6 jJFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=UZauaVTU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a056a00125100b0052b8da96658si20283399pfi.26.2022.09.16.08.37.24; Fri, 16 Sep 2022 08:38:07 -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=fail header.i=@nbd.name header.s=20160729 header.b=UZauaVTU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229786AbiIPP2q (ORCPT + 64 others); Fri, 16 Sep 2022 11:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbiIPP2o (ORCPT ); Fri, 16 Sep 2022 11:28:44 -0400 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA179AB40A for ; Fri, 16 Sep 2022 08:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=INFQFudAs4nKStIvoqPpyrmfJKCcgzNpJS8nKrPHAXI=; b=UZauaVTUjQf7I8eEFR9+GgT93J v6RGQVKGc8bpasEHdRbTIrQx1Tb9ECJQxEtYz7PPkMfzmkPdoXpa26ojvEQwqjLZSFHddf1IkBv8u VszX4gORiTsagIGyCxPqBTpI5nC0rLmoX4y6hiNZu/1iD7GVaujGKYo/VBVZvpfZHSV4=; Received: from p200300daa7301d00800d35b6f1da0728.dip0.t-ipconnect.de ([2003:da:a730:1d00:800d:35b6:f1da:728] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1oZDGh-005M3C-Jb; Fri, 16 Sep 2022 17:28:39 +0200 Message-ID: <3c9bf984-806e-d670-eefe-1a9d21d5974e@nbd.name> Date: Fri, 16 Sep 2022 17:28:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v2] wifi: mac80211: fix decapsulation offload flag for WDS interface Content-Language: en-US To: Howard Hsu , Johannes Berg Cc: linux-wireless , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Evelyn Tsai , linux-mediatek References: <20220916142707.28478-1-howard-yh.hsu@mediatek.com> From: Felix Fietkau In-Reply-To: <20220916142707.28478-1-howard-yh.hsu@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE 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 On 16.09.22 16:27, Howard Hsu wrote: > Rx decapsulation offload cannot be enabled on WDS interface since its > offload_flags is not configured. Its offload_flags shall be configured > by checking hardware information. > > Signed-off-by: Howard Hsu > --- > v2: > - Configure offload_flags in ieee80211_check_fast_rx > - Update commit message > --- > net/mac80211/rx.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c > index a57811372027..0d8cfe34b088 100644 > --- a/net/mac80211/rx.c > +++ b/net/mac80211/rx.c > @@ -4433,6 +4433,16 @@ void ieee80211_check_fast_rx(struct sta_info *sta) > if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED)) > goto clear; > > + if (ieee80211_hw_check(&local->hw, SUPPORTS_RX_DECAP_OFFLOAD)) { > + sdata->vif.offload_flags |= IEEE80211_OFFLOAD_DECAP_ENABLED; > + > + if (local->monitors && > + !ieee80211_hw_check(&local->hw, SUPPORTS_CONC_MON_RX_DECAP)) > + sdata->vif.offload_flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED; > + } else { > + sdata->vif.offload_flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED; > + } I don't think you should be messing with decap flags here. Further down there's a piece of code that does: offload = assign && (sdata->vif.offload_flags & IEEE80211_OFFLOAD_DECAP_ENABLED); Please change the code so that it gets the sdata from sdata->bss and check sdata_bss->vif.offload_flags. - Felix