summaryrefslogtreecommitdiff
path: root/sys/src/9
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-01-13 07:16:17 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-01-13 07:16:17 +0100
commitad36593a991e526168f5bcc2d3d14e0c66c0f642 (patch)
treea5db0df17c9da0d7ec917e2355b67b2798aa5cba /sys/src/9
parentba87e58876d01cdd4c0634ef7ab40ba680092e09 (diff)
ether82557: don't turn off promisc mode when mcast table is not empty
the driver doesnt implement multicast filter, but just turns on promiscuous mode when a multicast address is added. but this breaks when one actually enables and then disables promiscuous mode with say, running snoopy. we have to keep promisc mode active as long as multicast table is not empty.
Diffstat (limited to 'sys/src/9')
-rw-r--r--sys/src/9/pc/ether82557.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/src/9/pc/ether82557.c b/sys/src/9/pc/ether82557.c
index 7194d39c8..267b036ea 100644
--- a/sys/src/9/pc/ether82557.c
+++ b/sys/src/9/pc/ether82557.c
@@ -588,20 +588,15 @@ configure(Ether* ether, int promiscuous)
static void
promiscuous(void* arg, int on)
{
- configure(arg, on);
+ Ether *ether = arg;
+ configure(ether, on || ether->nmaddr > 0);
}
static void
-multicast(void* ether, uchar *addr, int add)
+multicast(void* arg, uchar *, int)
{
- USED(addr);
- /*
- * TODO: if (add) add addr to list of mcast addrs in controller
- * else remove addr from list of mcast addrs in controller
- * enable multicast input (see CbMAS) instead of promiscuous mode.
- */
- if (add)
- configure(ether, 1);
+ Ether *ether = arg;
+ configure(ether, ether->prom || ether->nmaddr > 0);
}
static void