linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: ignore radar PHY errors when DFS is not enabled
@ 2015-01-09 16:54 Simon Wunderlich
  2015-01-09 18:57 ` Arend van Spriel
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Wunderlich @ 2015-01-09 16:54 UTC (permalink / raw)
  To: linux-wireless
  Cc: ath9k-devel, kvalo, mathias.kretschmer, stable, Simon Wunderlich

Performing spectral scans on 5 GHz channels may result in PHY errors
sent by the hardware, even if DFS support is not enabled in the driver
(e.g. channel scanning or passive monitoring). In that case channels may
falsely get marked as 'unusable'. To fix that, only process radar PHY
errors when radar is explicitly enabled in the driver.

Cc: Stable <stable@vger.kernel.org> [v3.10+]
Reported-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 drivers/net/wireless/ath/ath9k/dfs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c
index 726271c..3d04905 100644
--- a/drivers/net/wireless/ath/ath9k/dfs.c
+++ b/drivers/net/wireless/ath/ath9k/dfs.c
@@ -152,6 +152,12 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
 		return;
 	}
 
+	if (!sc->hw->conf.radar_enabled) {
+		ath_dbg(common, DFS,
+			"Error: received radar phyerr while radar was disabled\n");
+		return;
+	}
+
 	datalen = rs->rs_datalen;
 	if (datalen == 0) {
 		DFS_STAT_INC(sc, datalen_discards);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-15 15:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09 16:54 [PATCH] ath9k: ignore radar PHY errors when DFS is not enabled Simon Wunderlich
2015-01-09 18:57 ` Arend van Spriel
2015-01-10 16:26   ` Simon Wunderlich
2015-01-13 10:16     ` Zefir Kurtisi
2015-01-13 11:04       ` Simon Wunderlich
2015-01-13 12:08         ` Zefir Kurtisi
2015-01-15 14:30         ` Kalle Valo
2015-01-15 15:58           ` Simon Wunderlich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).