Source-Changes-HG archive

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

[src-draft/trunk]: src/sys/dev/usb Fix access to QOS data



details:   https://anonhg.NetBSD.org/src-all/rev/a6df1235aafc
branches:  trunk
changeset: 378019:a6df1235aafc
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Mon Aug 15 17:19:43 2022 +0200

description:
Fix access to QOS data

diffstat:

 sys/dev/usb/if_urtwn.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r a2d7c2baa573 -r a6df1235aafc sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Mon Aug 15 17:17:12 2022 +0200
+++ b/sys/dev/usb/if_urtwn.c    Mon Aug 15 17:19:43 2022 +0200
@@ -2371,8 +2371,12 @@ urtwn_tx_prepare(struct usbwifi *uw, str
        tid = R92C_TXDW1_QSEL_BE;
        if ((hasqos = IEEE80211_QOS_HAS_SEQ(wh))) {
                /* data frames in 11n mode */
-               struct ieee80211_qosframe *qwh = (void *)wh;
-               tid = qwh->i_qos[0] & IEEE80211_QOS_TID;
+               uint8_t *frm;
+               uint16_t qos;
+
+               frm = ieee80211_getqos(wh);
+               qos = le16toh(*(const uint16_t *)frm);
+               tid = qos & IEEE80211_QOS_TID;
        } else if (type != IEEE80211_FC0_TYPE_DATA) {
                tid = R92C_TXDW1_QSEL_MGNT;
        }



Home | Main Index | Thread Index | Old Index