ath9k: correctly handle short radar pulses
authorZefir Kurtisi <zefir.kurtisi@neratec.com>
Tue, 11 Jun 2019 13:36:56 +0000 (15:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:45 +0000 (09:12 +0200)
commit9ef7f897f17e41bc8f0501b29a9b7cc541546d21
tree975754b3e018c806b6222f64d4ee6b2a25839da0
parent58093426f1c1fc7adf74e271b3b3272472344a7c
ath9k: correctly handle short radar pulses

[ Upstream commit df5c4150501ee7e86383be88f6490d970adcf157 ]

In commit 3c0efb745a17 ("ath9k: discard undersized packets")
the lower bound of RX packets was set to 10 (min ACK size) to
filter those that would otherwise be treated as invalid at
mac80211.

Alas, short radar pulses are reported as PHY_ERROR frames
with length set to 3. Therefore their detection stopped
working after that commit.

NOTE: ath9k drivers built thereafter will not pass DFS
certification.

This extends the criteria for short packets to explicitly
handle PHY_ERROR frames.

Fixes: 3c0efb745a17 ("ath9k: discard undersized packets")
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath9k/recv.c