wifi: mac80211: fix check for unusable RX result
authorJohannes Berg <johannes.berg@intel.com>
Mon, 25 Sep 2023 15:24:39 +0000 (17:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:58:57 +0000 (11:58 +0100)
commit2fa71edb85bfedac0632b0d352bd855416572a1b
tree6e5b51d8c6998890cd04f04ede4650267e479d6f
parentd412d0ef300f28d698648cc7c19147ab413251fe
wifi: mac80211: fix check for unusable RX result

[ Upstream commit 583058542f46e3e2b0c536316fbd641f62d91dc6 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/drop.h
net/mac80211/rx.c