Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Pass WME access classification to bcdc header



details:   https://anonhg.NetBSD.org/src/rev/f91f5921409e
branches:  trunk
changeset: 827243:f91f5921409e
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Oct 21 20:36:12 2017 +0000

description:
Pass WME access classification to bcdc header

diffstat:

 sys/dev/usb/if_bwfm_usb.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 9694fe16d90b -r f91f5921409e sys/dev/usb/if_bwfm_usb.c
--- a/sys/dev/usb/if_bwfm_usb.c Sat Oct 21 19:43:53 2017 +0000
+++ b/sys/dev/usb/if_bwfm_usb.c Sat Oct 21 20:36:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bwfm_usb.c,v 1.2 2017/10/21 18:18:44 jmcneill Exp $ */
+/* $NetBSD: if_bwfm_usb.c,v 1.3 2017/10/21 20:36:12 jmcneill Exp $ */
 /* $OpenBSD: if_bwfm_usb.c,v 1.2 2017/10/15 14:55:13 patrick Exp $ */
 /*
  * Copyright (c) 2010-2016 Broadcom Corporation
@@ -740,8 +740,9 @@
        struct bwfm_usb_softc *sc = (void *)bwfm;
        struct bwfm_proto_bcdc_hdr *hdr;
        struct bwfm_usb_tx_data *data;
+       struct ether_header *eh;
        uint32_t len = 0;
-       int error;
+       int error, ac;
 
        DPRINTFN(2, ("%s: %s\n", DEVNAME(sc), __func__));
 
@@ -752,6 +753,11 @@
                return ENOBUFS;
        }
 
+       /* No QoS for EAPOL frames. */
+       eh = mtod(m, struct ether_header *);
+       ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
+           M_WME_GETAC(m) : WME_AC_BE;
+
        /* Grab a Tx buffer from our free list. */
        data = TAILQ_FIRST(&sc->sc_tx_free_list);
        TAILQ_REMOVE(&sc->sc_tx_free_list, data, next);
@@ -760,7 +766,7 @@
 
        hdr = (void *)&data->buf[len];
        hdr->data_offset = 0;
-       hdr->priority = 0;
+       hdr->priority = ac;
        hdr->flags = BWFM_BCDC_FLAG_VER(BWFM_BCDC_FLAG_PROTO_VER);
        hdr->flags2 = 0;
        len += sizeof(*hdr);



Home | Main Index | Thread Index | Old Index