diff options
Diffstat (limited to 'net/core/dev_ioctl.c')
-rw-r--r-- | net/core/dev_ioctl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 709a4e6fb447..f9c7a88cd981 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c | |||
@@ -303,7 +303,18 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) | |||
303 | case SIOCSIFTXQLEN: | 303 | case SIOCSIFTXQLEN: |
304 | if (ifr->ifr_qlen < 0) | 304 | if (ifr->ifr_qlen < 0) |
305 | return -EINVAL; | 305 | return -EINVAL; |
306 | dev->tx_queue_len = ifr->ifr_qlen; | 306 | if (dev->tx_queue_len ^ ifr->ifr_qlen) { |
307 | unsigned int orig_len = dev->tx_queue_len; | ||
308 | |||
309 | dev->tx_queue_len = ifr->ifr_qlen; | ||
310 | err = call_netdevice_notifiers( | ||
311 | NETDEV_CHANGE_TX_QUEUE_LEN, dev); | ||
312 | err = notifier_to_errno(err); | ||
313 | if (err) { | ||
314 | dev->tx_queue_len = orig_len; | ||
315 | return err; | ||
316 | } | ||
317 | } | ||
307 | return 0; | 318 | return 0; |
308 | 319 | ||
309 | case SIOCSIFNAME: | 320 | case SIOCSIFNAME: |