Skip to content

Commit

Permalink
net: ag71xx: remove unnecessary MTU reservation
Browse files Browse the repository at this point in the history
commit 04b385f upstream.

2 bytes of the MTU are reserved for Atheros DSA tag, but DSA core
has already handled that since commit dc0fe7d.
Remove the unnecessary reservation.

Fixes: d51b6ce ("net: ethernet: add ag71xx driver")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20210218034514.3421-1-dqfext@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
LGA1150 authored and gregkh committed Mar 7, 2021
1 parent 06ff5c8 commit 0a7f9a3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/atheros/ag71xx.c
Expand Up @@ -223,8 +223,6 @@
#define AG71XX_REG_RX_SM 0x01b0
#define AG71XX_REG_TX_SM 0x01b4

#define ETH_SWITCH_HEADER_LEN 2

#define AG71XX_DEFAULT_MSG_ENABLE \
(NETIF_MSG_DRV \
| NETIF_MSG_PROBE \
Expand Down Expand Up @@ -933,7 +931,7 @@ static void ag71xx_hw_setup(struct ag71xx *ag)

static unsigned int ag71xx_max_frame_len(unsigned int mtu)
{
return ETH_SWITCH_HEADER_LEN + ETH_HLEN + VLAN_HLEN + mtu + ETH_FCS_LEN;
return ETH_HLEN + VLAN_HLEN + mtu + ETH_FCS_LEN;
}

static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
Expand Down

0 comments on commit 0a7f9a3

Please sign in to comment.