patch-2.2.17 linux/net/core/dev.c

Next file: linux/net/core/sock.c
Previous file: linux/net/bridge/br.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.16/net/core/dev.c linux/net/core/dev.c
@@ -98,6 +98,7 @@
 extern void n2_init(void);
 extern void c101_init(void);
 extern int wanxl_init(void);
+extern int cpc_init(void);
 extern void sync_ppp_init(void);
 
 NET_PROFILE_DEFINE(dev_queue_xmit)
@@ -459,6 +460,10 @@
 	if (!(dev->flags&IFF_UP))
 		return 0;
 
+	/* If the device is a slave we should not touch it*/
+	if(dev->flags&IFF_SLAVE)
+		return -EBUSY;
+                                
 	dev_deactivate(dev);
 
 	dev_lock_wait();
@@ -773,6 +778,10 @@
 	if (backlog.qlen <= netdev_max_backlog) {
 		if (backlog.qlen) {
 			if (netdev_dropping == 0) {
+				if (skb->dev->flags & IFF_SLAVE  && 
+				    skb->dev->slave) {
+					skb->dev = skb->dev->slave;
+				}
 				skb_queue_tail(&backlog,skb);
 				mark_bh(NET_BH);
 				return;
@@ -2039,6 +2048,9 @@
 #endif
 #ifdef CONFIG_WANXL
 	wanxl_init();
+#endif
+#ifdef CONFIG_PC300
+	cpc_init();
 #endif
 #ifdef CONFIG_HDLC
 	sync_ppp_init();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)