summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-05-24 06:23:37 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-05-24 06:23:37 +0000
commitd1ad852c3acaf28e03ab378d5b4c5c8704337bd4 (patch)
tree1ea980247dd7e1d6359f081f09ce8a11dac87151 /sys/dev
parent5360851968704aa00f8d38eb6aefa5f17841dc0a (diff)
properly configure multicast table.
use RFC1042 encap for IPv6 packet, just like base station does. (testers wanted - the code works for me just fine on kame/netbsd)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pcmcia/if_wi.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/dev/pcmcia/if_wi.c b/sys/dev/pcmcia/if_wi.c
index 44f21d9cbe3..2f544a47ebd 100644
--- a/sys/dev/pcmcia/if_wi.c
+++ b/sys/dev/pcmcia/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.10 2000/04/24 19:43:36 niklas Exp $ */
+/* $OpenBSD: if_wi.c,v 1.11 2000/05/24 06:23:36 itojun Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -135,7 +135,7 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.10 2000/04/24 19:43:36 niklas Exp $";
+ "$OpenBSD: if_wi.c,v 1.11 2000/05/24 06:23:36 itojun Exp $";
#endif /* lint */
#ifdef foo
@@ -1088,8 +1088,18 @@ STATIC int wi_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- wi_setmulti(sc);
- error = 0;
+ /* Update our multicast list. */
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware filter
+ * accordingly.
+ */
+ wi_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGWAVELAN:
error = copyin(ifr->ifr_data, &wreq, sizeof(wreq));
@@ -1286,7 +1296,8 @@ STATIC void wi_start(ifp)
*/
if (ntohs(eh->ether_type) == ETHERTYPE_IP ||
ntohs(eh->ether_type) == ETHERTYPE_ARP ||
- ntohs(eh->ether_type) == ETHERTYPE_REVARP) {
+ ntohs(eh->ether_type) == ETHERTYPE_REVARP ||
+ ntohs(eh->ether_type) == ETHERTYPE_IPV6) {
bcopy((char *)&eh->ether_dhost,
(char *)&tx_frame.wi_addr1, ETHER_ADDR_LEN);
bcopy((char *)&eh->ether_shost,