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/2119330f8a08
branches: trunk
changeset: 371161:2119330f8a08
user: Martin Husemann <martin%NetBSD.org@localhost>
date: Mon Aug 15 17:21:30 2022 +0200
description:
Fix access to QOS data
diffstat:
sys/dev/usb/usbwifi.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 6aad3210e8b5 -r 2119330f8a08 sys/dev/usb/usbwifi.c
--- a/sys/dev/usb/usbwifi.c Mon Aug 15 17:19:43 2022 +0200
+++ b/sys/dev/usb/usbwifi.c Mon Aug 15 17:21:30 2022 +0200
@@ -811,8 +811,12 @@
qid = WME_AC_BE;
if (IEEE80211_QOS_HAS_SEQ(wh)) {
/* data frames in 11n mode */
- struct ieee80211_qosframe *qwh = (void *)wh;
- uint8_t tid = qwh->i_qos[0] & IEEE80211_QOS_TID;
+ uint8_t *frm, tid;
+ uint16_t qos;
+
+ frm = ieee80211_getqos(wh);
+ qos = le16toh(*(const uint16_t *)frm);
+ tid = qos & IEEE80211_QOS_TID;
qid = TID_TO_WME_AC(tid);
} else if (type != IEEE80211_FC0_TYPE_DATA) {
qid = WME_AC_VO;
@@ -909,8 +913,12 @@
qid = WME_AC_BE;
if (IEEE80211_QOS_HAS_SEQ(wh)) {
/* data frames in 11n mode */
- struct ieee80211_qosframe *qwh = (void *)wh;
- uint8_t tid = qwh->i_qos[0] & IEEE80211_QOS_TID;
+ uint8_t *frm, tid;
+ uint16_t qos;
+
+ frm = ieee80211_getqos(wh);
+ qos = le16toh(*(const uint16_t *)frm);
+ tid = qos & IEEE80211_QOS_TID;
qid = TID_TO_WME_AC(tid);
} else if (type != IEEE80211_FC0_TYPE_DATA) {
qid = WME_AC_VO;
Home |
Main Index |
Thread Index |
Old Index