From patchwork Tue Apr 11 13:00:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corinna Vinschen X-Patchwork-Id: 13207568 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8565CC77B6F for ; Tue, 11 Apr 2023 13:05:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230433AbjDKNFu (ORCPT ); Tue, 11 Apr 2023 09:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230325AbjDKNFM (ORCPT ); Tue, 11 Apr 2023 09:05:12 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9229D558A for ; Tue, 11 Apr 2023 06:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681218241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PLHoOhImSgZgv5pnKGV2gG+UHyIYprSCALR+OOXUiGk=; b=YeBCL6LpOFWpbRXeR3O39Rt9pzt1bHxzmqL6MO5nAdNim1LKlDo4f6QqQIBuJXbIVbJpe7 uZm9zI3U/8YHebStTNxII27+0M96PraJK1eHxSHZlmPWI2SOOLrd4ffuiyC7xUWuqw92XL /YwDaIq9fn9ojrhvyE+pn45tjJ3XnyE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-488-oymR3Zx9N2S8Xl27GDZghw-1; Tue, 11 Apr 2023 09:00:31 -0400 X-MC-Unique: oymR3Zx9N2S8Xl27GDZghw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 52B2E3C10EC9; Tue, 11 Apr 2023 13:00:30 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.192.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C17EF1121320; Tue, 11 Apr 2023 13:00:29 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 4216DA80B9B; Tue, 11 Apr 2023 15:00:28 +0200 (CEST) From: Corinna Vinschen To: netdev@vger.kernel.org, Giuseppe Cavallaro , alexandre.torgue@foss.st.com, Jose Abreu Subject: [PATCH net-next] net: stmmac: propagate feature flags to vlan Date: Tue, 11 Apr 2023 15:00:28 +0200 Message-Id: <20230411130028.136250-1-vinschen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org stmmac_dev_probe doesn't propagate feature flags to VLANs. So features like TX offloading don't correspond with the general features and it's not possible to manipulate features via ethtool -K to affect VLANs. Signed-off-by: Corinna Vinschen Reviewed-by: Simon Horman Reviewed-by: Jacob Keller --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e590b6fc4761..308d4ee12d41 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7216,6 +7216,8 @@ int stmmac_dvr_probe(struct device *device, if (priv->dma_cap.rssen && priv->plat->rss_en) ndev->features |= NETIF_F_RXHASH; + ndev->vlan_features |= ndev->features; + /* MTU range: 46 - hw-specific max */ ndev->min_mtu = ETH_ZLEN - ETH_HLEN; if (priv->plat->has_xgmac)