diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2022-08-12 20:56:00 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2022-08-14 16:48:06 +0000 |
commit | 2889cbe29e30cc03412e4727b4ad753950094c32 (patch) | |
tree | 17dbd6d83a47fa331aeec9ae2efbab86cfb04cf4 /sys/net80211/ieee80211_sta.c | |
parent | 016aeb7ca0a54109b63b6379386c4cbb828c7da3 (diff) | |
download | src-2889cbe29e30cc03412e4727b4ad753950094c32.tar.gz src-2889cbe29e30cc03412e4727b4ad753950094c32.zip |
net80211: add an IEEE80211_IS_PROTECTED() macro
Summary: This returns whether the given 802.11 frame has the protected bit set.
Test Plan:
* tested in AP/STA mode
* STA mode - local athp/ath10k driver
* AP mode - in tree ath driver
Subscribers: imp, melifaro, glebius
Reviewed by: bz
Approved by: bz
Differential Revision: https://reviews.freebsd.org/D36183
Diffstat (limited to 'sys/net80211/ieee80211_sta.c')
-rw-r--r-- | sys/net80211/ieee80211_sta.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 9e103f6877c4..3bc6a2bdb3bb 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -767,7 +767,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, * crypto cipher modules used to do delayed update * of replay sequence numbers. */ - if (is_hw_decrypted || wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { + if (is_hw_decrypted || IEEE80211_IS_PROTECTED(wh)) { if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) { /* * Discard encrypted frames when privacy is off. @@ -939,7 +939,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, * Again, having encrypted flag set check would be good, but * then we have to also handle crypto_decap() like above. */ - if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { + if (IEEE80211_IS_PROTECTED(wh)) { if (subtype != IEEE80211_FC0_SUBTYPE_AUTH) { /* * Only shared key auth frames with a challenge |