]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ionic: Use VLAN_ETH_HLEN when possible
authorBrett Creeley <brett.creeley@amd.com>
Tue, 10 Dec 2024 18:30:42 +0000 (10:30 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 12 Dec 2024 11:06:33 +0000 (12:06 +0100)
Replace when ETH_HLEN and VLAN_HLEN are used together with
VLAN_ETH_HLEN since it's the same value and uses 1 define
instead of 2.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/pensando/ionic/ionic_lif.c

index 40496587b2b31819f3e30b2edf13e3b66eaa31bc..052c767a2c757872e0e1da86fe37ccdc11eaabea 100644 (file)
@@ -3265,7 +3265,7 @@ int ionic_lif_alloc(struct ionic *ionic)
        lif->netdev->min_mtu = max_t(unsigned int, ETH_MIN_MTU,
                                     le32_to_cpu(lif->identity->eth.min_frame_size));
        lif->netdev->max_mtu =
-               le32_to_cpu(lif->identity->eth.max_frame_size) - ETH_HLEN - VLAN_HLEN;
+               le32_to_cpu(lif->identity->eth.max_frame_size) - VLAN_ETH_HLEN;
 
        lif->neqs = ionic->neqs_per_lif;
        lif->nxqs = ionic->ntxqs_per_lif;