diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-09-25 18:24:39 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-26 10:16:11 +0300 |
commit | 583058542f46e3e2b0c536316fbd641f62d91dc6 (patch) | |
tree | 0e6b7c86be3fa9a327e70597b988e77882f908bb /net/mac80211/drop.h | |
parent | e406f291501050e63a805d6b87a0d9bf198fedf9 (diff) | |
download | linux-583058542f46e3e2b0c536316fbd641f62d91dc6.tar.xz |
wifi: mac80211: fix check for unusable RX result
If we just check "result & RX_DROP_UNUSABLE", this really only works
by accident, because SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE got to
have the value 1, and SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR is 2.
Fix this to really check the entire subsys mask for the value, so it
doesn't matter what the subsystem value is.
Fixes: 7f4e09700bdc ("wifi: mac80211: report all unusable beacon frames")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/drop.h')
-rw-r--r-- | net/mac80211/drop.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/drop.h b/net/mac80211/drop.h index 49dc809cab29..1570fac8411f 100644 --- a/net/mac80211/drop.h +++ b/net/mac80211/drop.h @@ -53,4 +53,7 @@ enum mac80211_drop_reason { #undef DEF }; +#define RX_RES_IS_UNUSABLE(result) \ + (((__force u32)(result) & SKB_DROP_REASON_SUBSYS_MASK) == ___RX_DROP_UNUSABLE) + #endif /* MAC80211_DROP_H */ |