Skip to content

Commit 7fe0d21

Browse files
benzeajmberg-intel
authored andcommitted
wifi: mac80211: skip rate verification for not captured PSDUs
If for example the sniffer did not follow any AIDs in an MU frame, then some of the information may not be filled in or is even expected to be invalid. As an example, in that case it is expected that Nss is zero. Fixes: 2ff5e52 ("radiotap: add 0-length PSDU "not captured" type") Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20251110142554.83a2858ee15b.I9f78ce7984872f474722f9278691ae16378f0a3e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 2027e3b commit 7fe0d21

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

net/mac80211/rx.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5360,10 +5360,14 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
53605360
if (WARN_ON(!local->started))
53615361
goto drop;
53625362

5363-
if (likely(!(status->flag & RX_FLAG_FAILED_PLCP_CRC))) {
5363+
if (likely(!(status->flag & RX_FLAG_FAILED_PLCP_CRC) &&
5364+
!(status->flag & RX_FLAG_NO_PSDU &&
5365+
status->zero_length_psdu_type ==
5366+
IEEE80211_RADIOTAP_ZERO_LEN_PSDU_NOT_CAPTURED))) {
53645367
/*
5365-
* Validate the rate, unless a PLCP error means that
5366-
* we probably can't have a valid rate here anyway.
5368+
* Validate the rate, unless there was a PLCP error which may
5369+
* have an invalid rate or the PSDU was not capture and may be
5370+
* missing rate information.
53675371
*/
53685372

53695373
switch (status->encoding) {

0 commit comments

Comments
 (0)