diff options
author | 2017-10-21 20:19:37 +0000 | |
---|---|---|
committer | 2017-10-21 20:19:37 +0000 | |
commit | 87e99414403239f60ae509c5ff912e7e56672b66 (patch) | |
tree | a5ad874f868c3e1f439212a4e654ace799aa7dcb | |
parent | Make ieee80211_classify() available in a header so we can make the (diff) | |
download | wireguard-openbsd-87e99414403239f60ae509c5ff912e7e56672b66.tar.xz wireguard-openbsd-87e99414403239f60ae509c5ff912e7e56672b66.zip |
Initialize all fields in the BCDC protocol, otherwise the controller
behaves erratically and drops packets on TX. Found the hard way by
Jared McNeill. While there, also set the priority field.
ok stsp@
-rw-r--r-- | sys/dev/usb/if_bwfm_usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/if_bwfm_usb.c b/sys/dev/usb/if_bwfm_usb.c index 268cc7b8650..6029a889274 100644 --- a/sys/dev/usb/if_bwfm_usb.c +++ b/sys/dev/usb/if_bwfm_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_usb.c,v 1.4 2017/10/19 21:23:47 patrick Exp $ */ +/* $OpenBSD: if_bwfm_usb.c,v 1.5 2017/10/21 20:19:37 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -730,7 +730,9 @@ bwfm_usb_txdata(struct bwfm_softc *bwfm, struct mbuf *m) hdr = (void *)&data->buf[len]; hdr->data_offset = 0; + hdr->priority = ieee80211_classify(&sc->sc_sc.sc_ic, m); hdr->flags = BWFM_BCDC_FLAG_VER(BWFM_BCDC_FLAG_PROTO_VER); + hdr->flags2 = 0; len += sizeof(*hdr); m_copydata(m, 0, m->m_pkthdr.len, (caddr_t)&data->buf[len]); |