diff options
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 7a0b616557ab..6e4f34721080 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); | |||
322 | 322 | ||
323 | static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) | 323 | static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) |
324 | { | 324 | { |
325 | dev->tx_queue_len = new_len; | 325 | int res, orig_len = dev->tx_queue_len; |
326 | |||
327 | if (new_len != orig_len) { | ||
328 | dev->tx_queue_len = new_len; | ||
329 | res = call_netdevice_notifiers(NETDEV_CHANGE_TX_QUEUE_LEN, dev); | ||
330 | res = notifier_to_errno(res); | ||
331 | if (res) { | ||
332 | netdev_err(dev, | ||
333 | "refused to change device tx_queue_len\n"); | ||
334 | dev->tx_queue_len = orig_len; | ||
335 | return -EFAULT; | ||
336 | } | ||
337 | } | ||
338 | |||
326 | return 0; | 339 | return 0; |
327 | } | 340 | } |
328 | 341 | ||