summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/acx100.c4
-rw-r--r--sys/dev/ic/atw.c4
-rw-r--r--sys/dev/ic/rtw.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ic/acx100.c b/sys/dev/ic/acx100.c
index 640b5872f9a..50a0344f478 100644
--- a/sys/dev/ic/acx100.c
+++ b/sys/dev/ic/acx100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx100.c,v 1.26 2015/11/24 13:45:06 mpi Exp $ */
+/* $OpenBSD: acx100.c,v 1.27 2017/09/22 13:44:00 kevlo Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -720,7 +720,7 @@ acx100_proc_wep_rxbuf(struct acx_softc *sc, struct mbuf *m, int *len)
*/
f = mtod(m, struct ieee80211_frame *);
- if ((f->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
+ if (ieee80211_has_addr4(f))
mac_hdrlen = sizeof(struct ieee80211_frame_addr4);
else
mac_hdrlen = sizeof(struct ieee80211_frame);
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index 24521747aef..cbf21da7400 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.95 2017/01/22 10:17:37 dlg Exp $ */
+/* $OpenBSD: atw.c,v 1.96 2017/09/22 13:44:00 kevlo Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -3468,7 +3468,7 @@ atw_compute_duration(struct ieee80211_frame *wh, int len, uint32_t flags,
int ack, rc;
int firstlen, hdrlen, lastlen, lastlen0, npkt, overlen, paylen;
- if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
+ if (ieee80211_has_addr4(wh))
hdrlen = sizeof(struct ieee80211_frame_addr4);
else
hdrlen = sizeof(struct ieee80211_frame);
diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c
index 51aaaedb706..ce7686c40fa 100644
--- a/sys/dev/ic/rtw.c
+++ b/sys/dev/ic/rtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtw.c,v 1.99 2017/09/08 05:36:52 deraadt Exp $ */
+/* $OpenBSD: rtw.c,v 1.100 2017/09/22 13:44:00 kevlo Exp $ */
/* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */
/*-
@@ -2986,7 +2986,7 @@ rtw_compute_duration(struct ieee80211_frame *wh, int len, uint32_t flags,
int ack, rc;
int firstlen, hdrlen, lastlen, lastlen0, npkt, overlen, paylen;
- if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
+ if (ieee80211_has_addr4(wh))
hdrlen = sizeof(struct ieee80211_frame_addr4);
else
hdrlen = sizeof(struct ieee80211_frame);