summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/iicbus/if_ic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c
index d0068bb..fba21d1 100644
--- a/sys/dev/iicbus/if_ic.c
+++ b/sys/dev/iicbus/if_ic.c
@@ -374,7 +374,13 @@ icoutput(struct ifnet *ifp, struct mbuf *m,
int s, len, sent;
struct mbuf *mm;
u_char *cp;
- u_int32_t hdr = dst->sa_family;
+ u_int32_t hdr;
+
+ /* BPF writes need to be handled specially. */
+ if (dst->sa_family == AF_UNSPEC)
+ bcopy(dst->sa_data, &hdr, sizeof(hdr));
+ else
+ hdr = dst->sa_family;
ifp->if_flags |= IFF_RUNNING;
OpenPOWER on IntegriCloud