From: jsg Date: Sun, 3 Aug 2014 14:23:59 +0000 (+0000) Subject: When stsp changed bwi_encap() for 30 bit addresses in rev 1.106 code X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a391041c7ff420c85b16b0f8e25b8a97bedda722;p=openbsd When stsp changed bwi_encap() for 30 bit addresses in rev 1.106 code that used to always initialise the error variable is no longer run. And at the end of bwi_encap() there is: if (error) m_freem(m); return (error); Fixing this prevents packet loss stsp was seeing. ok stsp@ miod@ deraadt@ --- diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index 80d1ef78266..ff33df7f4f1 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwi.c,v 1.107 2014/07/22 13:12:11 mpi Exp $ */ +/* $OpenBSD: bwi.c,v 1.108 2014/08/03 14:23:59 jsg Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -8946,7 +8946,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m, uint32_t mac_ctrl; uint16_t phy_ctrl; bus_addr_t paddr; - int pkt_len, error; + int pkt_len, error = 0; #if 0 const uint8_t *p; int i;