diff mbox series

net: macb: remove change_mtu callback

Message ID 20240308155330.1610616-1-thomas.perrot@bootlin.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: macb: remove change_mtu callback | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 961 this patch: 961
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 956 this patch: 956
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 978 this patch: 978
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 23 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-03-10--00-00 (tests: 888)

Commit Message

Thomas Perrot March 8, 2024, 3:53 p.m. UTC
From: Thomas Perrot <thomas.perrot@bootlin.com>

Because it doesn't allow MTU changes when the interface is up, although
it is not necessary.

This callback has been added to add in a first implementation of the Jumbo
support [1],since it has been reworked and moved to the probe [2].

[1] commit a5898ea09aad ("net: macb: Add change_mtu callback with
    jumbo support")
[2] commit 44770e1180de ("ethernet: use core min/max MTU checking")

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Simon Horman March 9, 2024, 2:54 p.m. UTC | #1
On Fri, Mar 08, 2024 at 04:53:30PM +0100, thomas.perrot@bootlin.com wrote:
> From: Thomas Perrot <thomas.perrot@bootlin.com>
> 
> Because it doesn't allow MTU changes when the interface is up, although
> it is not necessary.
> 
> This callback has been added to add in a first implementation of the Jumbo
> support [1],since it has been reworked and moved to the probe [2].
> 
> [1] commit a5898ea09aad ("net: macb: Add change_mtu callback with
>     jumbo support")
> [2] commit 44770e1180de ("ethernet: use core min/max MTU checking")
> 
> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>

Hi Thomas,

Perhaps it is worth mentioning that after this patch the core will set the
MTU, regardless of if the interface is up or not.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 898debfd4db3..0532215e5236 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3017,16 +3017,6 @@  static int macb_close(struct net_device *dev)
 	return 0;
 }
 
-static int macb_change_mtu(struct net_device *dev, int new_mtu)
-{
-	if (netif_running(dev))
-		return -EBUSY;
-
-	dev->mtu = new_mtu;
-
-	return 0;
-}
-
 static int macb_set_mac_addr(struct net_device *dev, void *addr)
 {
 	int err;
@@ -3897,7 +3887,6 @@  static const struct net_device_ops macb_netdev_ops = {
 	.ndo_get_stats		= macb_get_stats,
 	.ndo_eth_ioctl		= macb_ioctl,
 	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_change_mtu		= macb_change_mtu,
 	.ndo_set_mac_address	= macb_set_mac_addr,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= macb_poll_controller,