summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2017-10-21 20:19:38 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2017-10-21 20:19:38 +0000
commit54ddd0980279b235f4195862f825215ac1837bcf (patch)
tree39129f8dd3f148775f895aece336ff748c2a19bf /sys/dev/usb
parentf900b2e0c33518134ea9495ebc6372fbecd88ceb (diff)
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@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_bwfm_usb.c4
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]);