patch-1.3.16 linux/drivers/net/de4x5.c

Next file: linux/drivers/net/hp100.c
Previous file: linux/drivers/net/atp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.15/linux/drivers/net/de4x5.c linux/drivers/net/de4x5.c
@@ -1380,8 +1380,8 @@
 }
 /*
 ** Set or clear the multicast filter for this adaptor.
-** num_addrs == -1	Promiscuous mode, receive all packets - not supported.
-**                      Use the ioctls.
+** num_addrs == -1	Promiscuous mode, receive all packets - now supported.
+**                      Can also use the ioctls.
 ** num_addrs == 0	Normal mode, clear multicast list
 ** num_addrs > 0	Multicast mode, receive normal and MC packets, and do
 ** 			best-effort filtering.
@@ -1409,6 +1409,11 @@
       lp->tx_new = (++lp->tx_new) % lp->txRingSize;
       outl(POLL_DEMAND, DE4X5_TPD);                /* Start the TX */
       dev->trans_start = jiffies;
+    } else { /* set promiscuous mode */
+      u32 omr;
+      omr = inl(DE4X5_OMR);
+      omr |= OMR_PR;
+      outl(omr, DE4X5_OMR);
     }
   }
 
@@ -1472,6 +1477,9 @@
       }
     }
   }
+
+  if (num_addrs == 0)
+    omr &= ~OMR_PR;
   outl(omr, DE4X5_OMR);
 
   return;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this