summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/if_wi.c5
-rw-r--r--sys/dev/pcmcia/if_malo.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index ca8c40c185b..7355ce948d6 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.146 2009/10/27 23:59:34 deraadt Exp $ */
+/* $OpenBSD: if_wi.c,v 1.147 2010/05/20 14:03:05 nicm Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2423,7 +2423,8 @@ nextpkt:
/* Do host encryption. */
tx_frame.wi_frame_ctl |= htole16(WI_FCTL_WEP);
- bcopy(&tx_frame.wi_dat[0], &sc->wi_txbuf[4], 8);
+ bcopy(&tx_frame.wi_dat[0], &sc->wi_txbuf[4], 6);
+ bcopy(&tx_frame.wi_type, &sc->wi_txbuf[10], 2);
m_copydata(m0, sizeof(struct ether_header),
m0->m_pkthdr.len - sizeof(struct ether_header),
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c
index fdafe7aa6f2..79a8b6d1f01 100644
--- a/sys/dev/pcmcia/if_malo.c
+++ b/sys/dev/pcmcia/if_malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_malo.c,v 1.67 2009/10/13 19:33:16 pirofti Exp $ */
+/* $OpenBSD: if_malo.c,v 1.68 2010/05/20 14:03:05 nicm Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -998,7 +998,9 @@ cmalo_tx(struct malo_softc *sc, struct mbuf *m)
/* prepare TX descriptor */
txdesc->pkgoffset = htole32(sizeof(*txdesc));
txdesc->pkglen = htole16(m->m_pkthdr.len);
- bcopy(data, txdesc->dstaddrhigh, ETHER_ADDR_LEN);
+ bcopy(data, txdesc->dstaddrhigh, sizeof(txdesc->dstaddrhigh));
+ bcopy(data + sizeof(txdesc->dstaddrhigh), txdesc->dstaddrlow,
+ sizeof(txdesc->dstaddrlow));
/* copy mbuf data to the buffer */
m_copydata(m, 0, m->m_pkthdr.len, sc->sc_data + sizeof(*txdesc));