|
@@ -346,29 +346,6 @@ static ssize_t flags_store(struct device *dev, struct device_attribute *attr,
|
|
}
|
|
}
|
|
NETDEVICE_SHOW_RW(flags, fmt_hex);
|
|
NETDEVICE_SHOW_RW(flags, fmt_hex);
|
|
|
|
|
|
-static int change_tx_queue_len(struct net_device *dev, unsigned long new_len)
|
|
|
|
-{
|
|
|
|
- unsigned int orig_len = dev->tx_queue_len;
|
|
|
|
- int res;
|
|
|
|
-
|
|
|
|
- if (new_len != (unsigned int)new_len)
|
|
|
|
- return -ERANGE;
|
|
|
|
-
|
|
|
|
- if (new_len != orig_len) {
|
|
|
|
- dev->tx_queue_len = new_len;
|
|
|
|
- res = call_netdevice_notifiers(NETDEV_CHANGE_TX_QUEUE_LEN, dev);
|
|
|
|
- res = notifier_to_errno(res);
|
|
|
|
- if (res) {
|
|
|
|
- netdev_err(dev,
|
|
|
|
- "refused to change device tx_queue_len\n");
|
|
|
|
- dev->tx_queue_len = orig_len;
|
|
|
|
- return -EFAULT;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static ssize_t tx_queue_len_store(struct device *dev,
|
|
static ssize_t tx_queue_len_store(struct device *dev,
|
|
struct device_attribute *attr,
|
|
struct device_attribute *attr,
|
|
const char *buf, size_t len)
|
|
const char *buf, size_t len)
|
|
@@ -376,7 +353,7 @@ static ssize_t tx_queue_len_store(struct device *dev,
|
|
if (!capable(CAP_NET_ADMIN))
|
|
if (!capable(CAP_NET_ADMIN))
|
|
return -EPERM;
|
|
return -EPERM;
|
|
|
|
|
|
- return netdev_store(dev, attr, buf, len, change_tx_queue_len);
|
|
|
|
|
|
+ return netdev_store(dev, attr, buf, len, dev_change_tx_queue_len);
|
|
}
|
|
}
|
|
NETDEVICE_SHOW_RW(tx_queue_len, fmt_dec);
|
|
NETDEVICE_SHOW_RW(tx_queue_len, fmt_dec);
|
|
|
|
|