diff options
author | xiong <xiong@qca.qualcomm.com> | 2013-01-19 13:15:03 +0800 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-01-24 07:56:06 -0800 |
commit | 38210ab8eec33c414bf4bbbc1b4d579964538194 (patch) | |
tree | b7db571aa3be6f23c241266d070584beb33a2935 | |
parent | 23151039e7b31af4e55941795b70e786e500f1e2 (diff) | |
download | alx-38210ab8eec33c414bf4bbbc1b4d579964538194.tar.gz |
alx: remove the 'running' condition to change MTU
MTU ought to be set whether the interface is 'Up' or 'Down'.
Signed-off-by: xiong <xiong@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r-- | src/alx_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/alx_main.c b/src/alx_main.c index 322aea3..e91c145 100644 --- a/src/alx_main.c +++ b/src/alx_main.c @@ -1183,7 +1183,7 @@ static int alx_change_mtu(struct net_device *netdev, int new_mtu) return -EINVAL; } /* set MTU */ - if (old_mtu != new_mtu && netif_running(netdev)) { + if (old_mtu != new_mtu) { netif_info(adpt, drv, adpt->netdev, "changing MTU from %d to %d\n", netdev->mtu, new_mtu); @@ -1192,7 +1192,8 @@ static int alx_change_mtu(struct net_device *netdev, int new_mtu) adpt->rxbuf_size = new_mtu > ALX_DEF_RXBUF_SIZE ? ALIGN(max_frame, 8) : ALX_DEF_RXBUF_SIZE; netdev_update_features(netdev); - alx_reinit(adpt); + if (netif_running(netdev)) + alx_reinit(adpt); } return 0; |