patch-2.1.77 linux/net/core/dev.c
Next file: linux/net/core/filter.c
Previous file: linux/mm/page_alloc.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Mon Dec 29 10:22:46 1997
- Orig file:
v2.1.76/linux/net/core/dev.c
- Orig date:
Tue Dec 23 16:31:00 1997
diff -u --recursive --new-file v2.1.76/linux/net/core/dev.c linux/net/core/dev.c
@@ -1305,6 +1305,16 @@
ifr->ifr_ifindex = dev->ifindex;
return 0;
+ case SIOCGIFTXQLEN:
+ ifr->ifr_qlen = dev->tx_queue_len;
+ return 0;
+
+ case SIOCSIFTXQLEN:
+ if(ifr->ifr_qlen<2 || ifr->ifr_qlen>1024)
+ return -EINVAL;
+ dev->tx_queue_len = ifr->ifr_qlen;
+ return 0;
+
/*
* Unknown or private ioctl
*/
@@ -1396,9 +1406,17 @@
case SIOCGIFSLAVE:
case SIOCGIFMAP:
case SIOCGIFINDEX:
+ case SIOCGIFTXQLEN:
ret = dev_ifsioc(&ifr, cmd);
- if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq)))
- return -EFAULT;
+ if (!ret)
+ {
+#ifdef CONFIG_NET_ALIAS
+ if (colon)
+ *colon = ':';
+#endif
+ if (copy_to_user(arg, &ifr, sizeof(struct ifreq)))
+ return -EFAULT;
+ }
return ret;
/*
@@ -1414,6 +1432,7 @@
case SIOCSIFMAP:
case SIOCSIFHWADDR:
case SIOCSIFSLAVE:
+ case SIOCSIFTXQLEN:
case SIOCADDMULTI:
case SIOCDELMULTI:
case SIOCSIFHWBROADCAST:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov