linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: preserve DFS flags in calcrxfilter
@ 2011-11-02 12:10 Zefir Kurtisi
  2011-11-02 13:19 ` Felix Fietkau
  0 siblings, 1 reply; 3+ messages in thread
From: Zefir Kurtisi @ 2011-11-02 12:10 UTC (permalink / raw)
  To: linux-wireless, ath9k-devel; +Cc: rodrigue, nbd, linville, Zefir Kurtisi

RX filter flags previously set for DFS radar detection were not
preserved after "ath9k: disable unnecessary PHY error reporting".

This patch ensures that the flags required for DFS support are
kept set.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---
 drivers/net/wireless/ath/ath9k/recv.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 592ae5b..02c8dc3 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -417,6 +417,7 @@ void ath_rx_cleanup(struct ath_softc *sc)
  * Calculate the receive filter according to the
  * operating mode and state:
  *
+ * o preserve DFS (phyerror, phyradar)
  * o always accept unicast, broadcast, and multicast traffic
  * o maintain current state of phy error reception (the hal
  *   may enable phy error frames for noise immunity work)
@@ -434,10 +435,15 @@ void ath_rx_cleanup(struct ath_softc *sc)
 
 u32 ath_calcrxfilter(struct ath_softc *sc)
 {
+	const u32 rx_filter_preserve =
+		(ATH9K_RX_FILTER_PHYERR | ATH9K_RX_FILTER_PHYRADAR);
+	const u32 rx_filter_accept =
+		(ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
+				| ATH9K_RX_FILTER_MCAST);
 	u32 rfilt;
 
-	rfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
-		| ATH9K_RX_FILTER_MCAST;
+	rfilt = (ath9k_hw_getrxfilter(sc->sc_ah) & rx_filter_preserve);
+	rfilt |= rx_filter_accept;
 
 	if (sc->rx.rxfilter & FIF_PROBE_REQ)
 		rfilt |= ATH9K_RX_FILTER_PROBEREQ;
@@ -475,8 +481,6 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
 	}
 
 	return rfilt;
-
-#undef RX_FILTER_PRESERVE
 }
 
 int ath_startrecv(struct ath_softc *sc)
-- 
1.7.4.1


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

end of thread, other threads:[~2011-11-02 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-02 12:10 [PATCH] ath9k: preserve DFS flags in calcrxfilter Zefir Kurtisi
2011-11-02 13:19 ` Felix Fietkau
2011-11-02 16:23   ` Zefir Kurtisi

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).