summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2014-01-21 09:57:33 +0000
committerbrad <brad@openbsd.org>2014-01-21 09:57:33 +0000
commitbfaca7a8cd32e665fb6cf1273b485167e56cc6d7 (patch)
treef294a0b51c68f67c82a4930924e438bbdd2532c1
parentDisable lapic when halting CPUs. Allegedly this is necessary to make (diff)
downloadwireguard-openbsd-bfaca7a8cd32e665fb6cf1273b485167e56cc6d7.tar.xz
wireguard-openbsd-bfaca7a8cd32e665fb6cf1273b485167e56cc6d7.zip
Always fill in the broadcast address so as to handle broadcast packets if
the interface is put into all multicast mode. ok stsp@
-rw-r--r--sys/dev/usb/if_mos.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c
index cc1dc3a0e09..afc31b84948 100644
--- a/sys/dev/usb/if_mos.c
+++ b/sys/dev/usb/if_mos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mos.c,v 1.23 2014/01/18 15:18:01 stsp Exp $ */
+/* $OpenBSD: if_mos.c,v 1.24 2014/01/21 09:57:33 brad Exp $ */
/*
* Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net>
@@ -558,15 +558,16 @@ mos_iff(struct mos_softc *sc)
ETHER_NEXT_MULTI(step, enm);
}
- /*
- * The datasheet claims broadcast frames were always accepted
- * regardless of filter settings. But the hardware seems to
- * filter broadcast frames, so pass them explicitly.
- */
- h = ether_crc32_be(etherbroadcastaddr, ETHER_ADDR_LEN) >> 26;
- hashtbl[h / 8] |= 1 << (h % 8);
}
+ /*
+ * The datasheet claims broadcast frames were always accepted
+ * regardless of filter settings. But the hardware seems to
+ * filter broadcast frames, so pass them explicitly.
+ */
+ h = ether_crc32_be(etherbroadcastaddr, ETHER_ADDR_LEN) >> 26;
+ hashtbl[h / 8] |= 1 << (h % 8);
+
mos_write_mcast(sc, (void *)&hashtbl);
mos_reg_write_1(sc, MOS_CTL, rxmode);
}