Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp874449rwn; Thu, 15 Sep 2022 07:37:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM78TvgQKByn5WTLYH/UH7FM+g2fFT6rP0M1uGjTHEPSO9ex6GtLq2nNWA3ECJVjrH3yuci0 X-Received: by 2002:a05:6a00:24d4:b0:541:11bd:dd24 with SMTP id d20-20020a056a0024d400b0054111bddd24mr327037pfv.66.1663252624342; Thu, 15 Sep 2022 07:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663252624; cv=none; d=google.com; s=arc-20160816; b=zXjspFEjstsQ+8GXTnvWwizmStCYlxY+AzzeJzCTWNlXCwy0cBEJhe1nNaekQr8NN/ 19lW2aSOilFuDl28577xCtEhX59oHTW/Nn6VSKNMIhYQM8/AmouyZtprPosANvGteDA/ sZogA5BafWULAhCK+GPlVe6W2SPymH6vJLjl21rF2s48J0EwK7Tn34Ok4nf0K/ncNoo4 pk8iWQAPIOq6BjWV9gtYR1ttLhcmXYOhitnmS21c13EtzN5rUJfhRWEZGcikJeCdQuv4 z5OUL+gYp9H5WDbNO6GncF0Pn/W/bXJqwaaDAZJaCyWBudNMcJ2PWk3juqE+BNuM+uEG 9T3g== 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=Z+5WD1TxU6px/KKmJWU5D2ILBEBGuaTkeYE2I5USLc4=; b=uhNmWfjQLPiBUhivXpiyrtz6uYYYcw93+iRqq5s2c9gwR8QvDNcdlJUtAJl5lse+Jv H+DuJUNmqrD6uwdToxY1aj9ui1OB89T+ziL2pq2JKOaZvpiXOLx6AEsSiHdot+C6vsVr JltzU9DDKXrGQoiW79sVbZISLJn4DaIcIJ6cqNyFycQCH2Tvz5gc+lCrgNg5iEUXVFmS OLyQnIy4gUQ3nnVEEhetYxNL7Ny3oOm2JepUndejGRBmE1Y6HCatUtVEXbaC3eEeZRiO yztjYPAqtQTHzcDTZtT+INgbb/eF8Fi2jE8FUcA19XJycrms+EkJ9IJIKnYxowW4Ug/R TxzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=afZE1L8p; 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 pg2-20020a17090b1e0200b001f2dad45347si20575173pjb.143.2022.09.15.07.36.34; Thu, 15 Sep 2022 07:37:04 -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=afZE1L8p; 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 S229977AbiIOOex (ORCPT + 64 others); Thu, 15 Sep 2022 10:34:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbiIOOen (ORCPT ); Thu, 15 Sep 2022 10:34:43 -0400 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5F49D66F for ; Thu, 15 Sep 2022 07:34:25 -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=Z+5WD1TxU6px/KKmJWU5D2ILBEBGuaTkeYE2I5USLc4=; b=afZE1L8pAeCV26tTihTyuFOrXl ITlXl0HhWRToiEN0Or+m8p3f5f2DHDoSY1/iSJouSlKpvG7zGeL/gmrWNVcghS7RH9aqKubAaQlsZ kOiq17wPtf7h4GhJAvihE+43M/d5XVym2ySbwgBznbr9dYgZSy2/dfUa8LF48rRiUiqY=; Received: from p200300daa7301d00b82a348903aff2a7.dip0.t-ipconnect.de ([2003:da:a730:1d00:b82a:3489:3af:f2a7] 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 1oYpwb-005AgF-MQ; Thu, 15 Sep 2022 16:34:21 +0200 Message-ID: Date: Thu, 15 Sep 2022 16:34:21 +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] 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: <20220915081917.3409-1-howard-yh.hsu@mediatek.com> From: Felix Fietkau In-Reply-To: <20220915081917.3409-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 15.09.22 10:19, Howard Hsu wrote: > The WDS interface whose iftype is NL80211_IFTYPE_AP_VLAN can not be > enabled rx decap offload because its offload_flags is not configured. > The offload_flags of wds interface shall be configured by checking > hardware information. > > Signed-off-by: Howard Hsu > --- > net/mac80211/iface.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c > index 41531478437c..ea35a7cabd1a 100644 > --- a/net/mac80211/iface.c > +++ b/net/mac80211/iface.c > @@ -865,6 +865,7 @@ static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype) > /* P2P GO and client are mapped to AP/STATION types */ > case NL80211_IFTYPE_AP: > case NL80211_IFTYPE_STATION: > + case NL80211_IFTYPE_AP_VLAN: > return true; > default: > return false; > @@ -2120,6 +2121,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, > > /* setup type-dependent data */ > ieee80211_setup_sdata(sdata, type); > + ieee80211_set_sdata_offload_flags(sdata); This approach does not look right to me. The flags are typically computed by calling ieee80211_set_sdata_offload_flags for a vif before a drv_add_interface or drv_update_vif_offload call, which allows the driver to set the offload flags to their final state. I think the right approach for fixing this is to change ieee80211_check_fast_rx to make it check the vif offload flag for the bss sdata instead of the AP_VLAN vif. - Felix