All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ath9k: integrate DFS detection
@ 2012-04-22 19:50 ` Zefir Kurtisi
  0 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: linville
  Cc: ath9k-devel, linux-wireless, rodrigue, achadd, chunkeey, Zefir Kurtisi

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>

These are the remaining knobs required to turn to get DFS
detection working in ath9k.

---

Testing mini-HowTo

Building:
On top of the patches, building a DFS capable driver requires
* setting CONFIG_ATH9K_DFS_CERTIFIED=y
* change hw.c:ath9k_hw_dfs_tested() to return true for the
  chip-set you are testing
  (tested so far: AR9280, AR9390 and AR9580)

Setting CONFIG_ATH_DEBUG=y will allow you to log detailed pulse
event information by setting the DFS_DEBUG bit (0x20000) in
ath9k/debug, while radar detection events are logged generally.

Also, set CONFIG_ATH9K_DFS_DEBUGFS=y to enable pulse and
pattern detection statistics along with pool utilization stats
in phyX/ath9k/dfs_stats. Ensure to have recent
'[PATCH] ath9k: extend DFS detector stats in dfs_debugfs'
applied for the full set of DFS statistics.

Testing:
You need wireless tools built with
* crda: add support to send DFS master region
* wireless-regdb: Add master DFS region support
* wireless-regdb: set ETSI as DFS region for EU
(all upstream since 2012-01)

1) setup ath9k monitor
   sudo iw phy phy0 interface add moni0 type monitor
   sudo iw dev moni0 set freq 5500 HT20
   sudo ifconfig moni0 up
2) set ETSI countrycode, e.g.
   sudo iw reg set CH
3) fire some ETSI radars at device and check log and dfs_stats


Note: due to the lack of DFS master support, only monitor mode
      can be tested. Furthermore, at this stage the detector
      supports ETSI defined radar patterns only. With other
      DFS domains you still are able to test pulse detections,
      but any pulse event will be accounted as radar event
      in the stats/logs.

Zefir Kurtisi (4):
  ath9k: set detector DFS domain in reg notifyer
  ath9k: set PHYRADAR in RX filter when on DFS channel
  ath9k: forward pulse events to DFS pulse detector
  ath9k: set radar config if switching to DFS channel

 drivers/net/wireless/ath/ath9k/init.c |    4 ++++
 drivers/net/wireless/ath/ath9k/main.c |   10 ++++++++++
 drivers/net/wireless/ath/ath9k/recv.c |    9 +++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)

-- 
1.7.4.1


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

* [ath9k-devel] [PATCH 0/4] ath9k: integrate DFS detection
@ 2012-04-22 19:50 ` Zefir Kurtisi
  0 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: ath9k-devel

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>

These are the remaining knobs required to turn to get DFS
detection working in ath9k.

---

Testing mini-HowTo

Building:
On top of the patches, building a DFS capable driver requires
* setting CONFIG_ATH9K_DFS_CERTIFIED=y
* change hw.c:ath9k_hw_dfs_tested() to return true for the
  chip-set you are testing
  (tested so far: AR9280, AR9390 and AR9580)

Setting CONFIG_ATH_DEBUG=y will allow you to log detailed pulse
event information by setting the DFS_DEBUG bit (0x20000) in
ath9k/debug, while radar detection events are logged generally.

Also, set CONFIG_ATH9K_DFS_DEBUGFS=y to enable pulse and
pattern detection statistics along with pool utilization stats
in phyX/ath9k/dfs_stats. Ensure to have recent
'[PATCH] ath9k: extend DFS detector stats in dfs_debugfs'
applied for the full set of DFS statistics.

Testing:
You need wireless tools built with
* crda: add support to send DFS master region
* wireless-regdb: Add master DFS region support
* wireless-regdb: set ETSI as DFS region for EU
(all upstream since 2012-01)

1) setup ath9k monitor
   sudo iw phy phy0 interface add moni0 type monitor
   sudo iw dev moni0 set freq 5500 HT20
   sudo ifconfig moni0 up
2) set ETSI countrycode, e.g.
   sudo iw reg set CH
3) fire some ETSI radars at device and check log and dfs_stats


Note: due to the lack of DFS master support, only monitor mode
      can be tested. Furthermore, at this stage the detector
      supports ETSI defined radar patterns only. With other
      DFS domains you still are able to test pulse detections,
      but any pulse event will be accounted as radar event
      in the stats/logs.

Zefir Kurtisi (4):
  ath9k: set detector DFS domain in reg notifyer
  ath9k: set PHYRADAR in RX filter when on DFS channel
  ath9k: forward pulse events to DFS pulse detector
  ath9k: set radar config if switching to DFS channel

 drivers/net/wireless/ath/ath9k/init.c |    4 ++++
 drivers/net/wireless/ath/ath9k/main.c |   10 ++++++++++
 drivers/net/wireless/ath/ath9k/recv.c |    9 +++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)

-- 
1.7.4.1

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

* [PATCH 1/4] ath9k: set detector DFS domain in reg notifyer
  2012-04-22 19:50 ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-22 19:50   ` Zefir Kurtisi
  -1 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: linville
  Cc: ath9k-devel, linux-wireless, rodrigue, achadd, chunkeey, Zefir Kurtisi

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index f9130f7..6c4153c 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -298,6 +298,7 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
 	struct ath_softc *sc = hw->priv;
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
+	struct dfs_pattern_detector *dfs_detector = sc->dfs_detector;
 	int ret;
 
 	ret = ath_reg_notifier_apply(wiphy, request, reg);
@@ -311,6 +312,9 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
 		ath9k_ps_restore(sc);
 	}
 
+	if (dfs_detector != NULL)
+		dfs_detector->set_domain(dfs_detector, request->dfs_region);
+
 	return ret;
 }
 
-- 
1.7.4.1


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

* [ath9k-devel] [PATCH 1/4] ath9k: set detector DFS domain in reg notifyer
@ 2012-04-22 19:50   ` Zefir Kurtisi
  0 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: ath9k-devel

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index f9130f7..6c4153c 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -298,6 +298,7 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
 	struct ath_softc *sc = hw->priv;
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
+	struct dfs_pattern_detector *dfs_detector = sc->dfs_detector;
 	int ret;
 
 	ret = ath_reg_notifier_apply(wiphy, request, reg);
@@ -311,6 +312,9 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
 		ath9k_ps_restore(sc);
 	}
 
+	if (dfs_detector != NULL)
+		dfs_detector->set_domain(dfs_detector, request->dfs_region);
+
 	return ret;
 }
 
-- 
1.7.4.1

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

* [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
  2012-04-22 19:50 ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-22 19:50   ` Zefir Kurtisi
  -1 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: linville
  Cc: ath9k-devel, linux-wireless, rodrigue, achadd, chunkeey, Zefir Kurtisi

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index f4ae3ba..ef45c0c 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -17,6 +17,7 @@
 #include <linux/dma-mapping.h>
 #include "ath9k.h"
 #include "ar9003_mac.h"
+#include "dfs.h"
 
 #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
 
@@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
 		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
 	}
 
+	if (sc->sc_ah->curchan->chan->flags & IEEE80211_CHAN_RADAR)
+		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
+	else
+		rfilt &= ~ATH9K_RX_FILTER_PHYRADAR;
+
 	return rfilt;
 
 }
-- 
1.7.4.1


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

* [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
@ 2012-04-22 19:50   ` Zefir Kurtisi
  0 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: ath9k-devel

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index f4ae3ba..ef45c0c 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -17,6 +17,7 @@
 #include <linux/dma-mapping.h>
 #include "ath9k.h"
 #include "ar9003_mac.h"
+#include "dfs.h"
 
 #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
 
@@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
 		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
 	}
 
+	if (sc->sc_ah->curchan->chan->flags & IEEE80211_CHAN_RADAR)
+		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
+	else
+		rfilt &= ~ATH9K_RX_FILTER_PHYRADAR;
+
 	return rfilt;
 
 }
-- 
1.7.4.1

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

* [PATCH 3/4] ath9k: forward pulse events to DFS pulse detector
  2012-04-22 19:50 ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-22 19:50   ` Zefir Kurtisi
  -1 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: linville
  Cc: ath9k-devel, linux-wireless, rodrigue, achadd, chunkeey, Zefir Kurtisi

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index ef45c0c..f647d0b 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1856,6 +1856,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 		    unlikely(tsf_lower - rs.rs_tstamp > 0x10000000))
 			rxs->mactime += 0x100000000ULL;
 
+		if (rs.rs_phyerr == ATH9K_PHYERR_RADAR)
+			ath9k_dfs_process_phyerr(sc, hdr, &rs, rxs->mactime);
+
 		retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
 						 rxs, &decrypt_error);
 		if (retval)
-- 
1.7.4.1


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

* [ath9k-devel] [PATCH 3/4] ath9k: forward pulse events to DFS pulse detector
@ 2012-04-22 19:50   ` Zefir Kurtisi
  0 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: ath9k-devel

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index ef45c0c..f647d0b 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1856,6 +1856,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 		    unlikely(tsf_lower - rs.rs_tstamp > 0x10000000))
 			rxs->mactime += 0x100000000ULL;
 
+		if (rs.rs_phyerr == ATH9K_PHYERR_RADAR)
+			ath9k_dfs_process_phyerr(sc, hdr, &rs, rxs->mactime);
+
 		retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
 						 rxs, &decrypt_error);
 		if (retval)
-- 
1.7.4.1

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

* [PATCH 4/4] ath9k: set radar config if switching to DFS channel
  2012-04-22 19:50 ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-22 19:50   ` Zefir Kurtisi
  -1 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: linville
  Cc: ath9k-devel, linux-wireless, rodrigue, achadd, chunkeey, Zefir Kurtisi

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3879485..0aeba88 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -371,6 +371,16 @@ static int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
 
 	r = ath_reset_internal(sc, hchan, false);
 
+	if ((r == 0) && (hchan->chan->flags & IEEE80211_CHAN_RADAR)) {
+		/* set HW specific DFS configuration if on DFS channel */
+		struct ath_hw *ah = sc->sc_ah;
+		struct ath_common *common = ath9k_hw_common(ah);
+
+		ath9k_hw_set_radar_params(ah);
+		ath_dbg(common, DFS, "DFS enabled for channel %d\n",
+			hchan->chan->center_freq);
+	}
+
 	return r;
 }
 
-- 
1.7.4.1


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

* [ath9k-devel] [PATCH 4/4] ath9k: set radar config if switching to DFS channel
@ 2012-04-22 19:50   ` Zefir Kurtisi
  0 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-22 19:50 UTC (permalink / raw)
  To: ath9k-devel

From: Zefir Kurtisi <zefir.kurtisi@neratec.com>


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

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3879485..0aeba88 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -371,6 +371,16 @@ static int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
 
 	r = ath_reset_internal(sc, hchan, false);
 
+	if ((r == 0) && (hchan->chan->flags & IEEE80211_CHAN_RADAR)) {
+		/* set HW specific DFS configuration if on DFS channel */
+		struct ath_hw *ah = sc->sc_ah;
+		struct ath_common *common = ath9k_hw_common(ah);
+
+		ath9k_hw_set_radar_params(ah);
+		ath_dbg(common, DFS, "DFS enabled for channel %d\n",
+			hchan->chan->center_freq);
+	}
+
 	return r;
 }
 
-- 
1.7.4.1

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

* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
  2012-04-22 19:50   ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-22 20:00     ` Felix Fietkau
  -1 siblings, 0 replies; 25+ messages in thread
From: Felix Fietkau @ 2012-04-22 20:00 UTC (permalink / raw)
  To: Zefir Kurtisi
  Cc: linville, ath9k-devel, linux-wireless, rodrigue, achadd,
	chunkeey, Zefir Kurtisi

On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
> From: Zefir Kurtisi <zefir.kurtisi@neratec.com>
> 
> 
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
> ---
>  drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index f4ae3ba..ef45c0c 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -17,6 +17,7 @@
>  #include <linux/dma-mapping.h>
>  #include "ath9k.h"
>  #include "ar9003_mac.h"
> +#include "dfs.h"
>  
>  #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>  
> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>  		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>  	}
>  
> +	if (sc->sc_ah->curchan->chan->flags & IEEE80211_CHAN_RADAR)
> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
> +	else
> +		rfilt &= ~ATH9K_RX_FILTER_PHYRADAR;
This should only be done in AP mode, maybe mac80211 should have a
separate flag to tell the driver to enable this. Same comment also
applies to patch 4/4.

- Felix


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

* [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
@ 2012-04-22 20:00     ` Felix Fietkau
  0 siblings, 0 replies; 25+ messages in thread
From: Felix Fietkau @ 2012-04-22 20:00 UTC (permalink / raw)
  To: ath9k-devel

On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
> From: Zefir Kurtisi <zefir.kurtisi@neratec.com>
> 
> 
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
> ---
>  drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index f4ae3ba..ef45c0c 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -17,6 +17,7 @@
>  #include <linux/dma-mapping.h>
>  #include "ath9k.h"
>  #include "ar9003_mac.h"
> +#include "dfs.h"
>  
>  #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>  
> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>  		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>  	}
>  
> +	if (sc->sc_ah->curchan->chan->flags & IEEE80211_CHAN_RADAR)
> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
> +	else
> +		rfilt &= ~ATH9K_RX_FILTER_PHYRADAR;
This should only be done in AP mode, maybe mac80211 should have a
separate flag to tell the driver to enable this. Same comment also
applies to patch 4/4.

- Felix

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

* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
  2012-04-22 20:00     ` [ath9k-devel] " Felix Fietkau
@ 2012-04-23  9:12       ` Zefir Kurtisi
  -1 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-23  9:12 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Zefir Kurtisi, linville, ath9k-devel, linux-wireless, rodrigue,
	achadd, chunkeey

On 22.04.2012 22:00, Felix Fietkau wrote:
> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>
>>
>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>> ---
>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>>   1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>> index f4ae3ba..ef45c0c 100644
>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>> @@ -17,6 +17,7 @@
>>   #include<linux/dma-mapping.h>
>>   #include "ath9k.h"
>>   #include "ar9003_mac.h"
>> +#include "dfs.h"
>>
>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>>
>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>>   	}
>>
>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
>> +	else
>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
> This should only be done in AP mode, maybe mac80211 should have a
> separate flag to tell the driver to enable this. Same comment also
> applies to patch 4/4.
>
> - Felix
>
Are you aware of any issues enabling DFS in client modes? My thinking 
was that it won't hurt to detect radars in any mode and let the DFS 
management component decide what to do with that events.

I'll be out of office for some time and update the patches then.

John, please ignore this series for now.


Thanks,
Zefir

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

* [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
@ 2012-04-23  9:12       ` Zefir Kurtisi
  0 siblings, 0 replies; 25+ messages in thread
From: Zefir Kurtisi @ 2012-04-23  9:12 UTC (permalink / raw)
  To: ath9k-devel

On 22.04.2012 22:00, Felix Fietkau wrote:
> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>
>>
>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>> ---
>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>>   1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>> index f4ae3ba..ef45c0c 100644
>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>> @@ -17,6 +17,7 @@
>>   #include<linux/dma-mapping.h>
>>   #include "ath9k.h"
>>   #include "ar9003_mac.h"
>> +#include "dfs.h"
>>
>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>>
>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>>   	}
>>
>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
>> +	else
>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
> This should only be done in AP mode, maybe mac80211 should have a
> separate flag to tell the driver to enable this. Same comment also
> applies to patch 4/4.
>
> - Felix
>
Are you aware of any issues enabling DFS in client modes? My thinking 
was that it won't hurt to detect radars in any mode and let the DFS 
management component decide what to do with that events.

I'll be out of office for some time and update the patches then.

John, please ignore this series for now.


Thanks,
Zefir

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

* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
  2012-04-23  9:12       ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-23 17:23         ` Felix Fietkau
  -1 siblings, 0 replies; 25+ messages in thread
From: Felix Fietkau @ 2012-04-23 17:23 UTC (permalink / raw)
  To: Zefir Kurtisi
  Cc: Zefir Kurtisi, linville, ath9k-devel, linux-wireless, rodrigue,
	achadd, chunkeey

On 2012-04-23 11:12 AM, Zefir Kurtisi wrote:
> On 22.04.2012 22:00, Felix Fietkau wrote:
>> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
>>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>>
>>>
>>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>> ---
>>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>>>   1 files changed, 6 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>>> index f4ae3ba..ef45c0c 100644
>>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>>> @@ -17,6 +17,7 @@
>>>   #include<linux/dma-mapping.h>
>>>   #include "ath9k.h"
>>>   #include "ar9003_mac.h"
>>> +#include "dfs.h"
>>>
>>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>>>
>>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>>>   	}
>>>
>>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
>>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
>>> +	else
>>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
>> This should only be done in AP mode, maybe mac80211 should have a
>> separate flag to tell the driver to enable this. Same comment also
>> applies to patch 4/4.
>>
>> - Felix
>>
> Are you aware of any issues enabling DFS in client modes? My thinking 
> was that it won't hurt to detect radars in any mode and let the DFS 
> management component decide what to do with that events.
Power consumption (for laptops), performance issues (due to DMA
descriptor use and interrupts triggered by pulse detection).

If the DFS management component decides what to do with the events, why
not let it decide whether it actually wants events as well ;)

- Felix

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

* [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
@ 2012-04-23 17:23         ` Felix Fietkau
  0 siblings, 0 replies; 25+ messages in thread
From: Felix Fietkau @ 2012-04-23 17:23 UTC (permalink / raw)
  To: ath9k-devel

On 2012-04-23 11:12 AM, Zefir Kurtisi wrote:
> On 22.04.2012 22:00, Felix Fietkau wrote:
>> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
>>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>>
>>>
>>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>> ---
>>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>>>   1 files changed, 6 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>>> index f4ae3ba..ef45c0c 100644
>>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>>> @@ -17,6 +17,7 @@
>>>   #include<linux/dma-mapping.h>
>>>   #include "ath9k.h"
>>>   #include "ar9003_mac.h"
>>> +#include "dfs.h"
>>>
>>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>>>
>>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>>>   	}
>>>
>>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
>>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
>>> +	else
>>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
>> This should only be done in AP mode, maybe mac80211 should have a
>> separate flag to tell the driver to enable this. Same comment also
>> applies to patch 4/4.
>>
>> - Felix
>>
> Are you aware of any issues enabling DFS in client modes? My thinking 
> was that it won't hurt to detect radars in any mode and let the DFS 
> management component decide what to do with that events.
Power consumption (for laptops), performance issues (due to DMA
descriptor use and interrupts triggered by pulse detection).

If the DFS management component decides what to do with the events, why
not let it decide whether it actually wants events as well ;)

- Felix

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

* RE: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
  2012-04-23 17:23         ` [ath9k-devel] " Felix Fietkau
@ 2012-04-23 17:27           ` Chadd, Adrian
  -1 siblings, 0 replies; 25+ messages in thread
From: Chadd, Adrian @ 2012-04-23 17:27 UTC (permalink / raw)
  To: Felix Fietkau, Zefir Kurtisi
  Cc: Zefir Kurtisi, linville, ath9k-devel, linux-wireless, Rodriguez,
	Luis, chunkeey

There may be a need later on (eg mesh, p2p mode, etc.)

2c,


Adrian

-----Original Message-----
From: Felix Fietkau [mailto:nbd@openwrt.org] 
Sent: Monday, April 23, 2012 10:24 AM
To: Zefir Kurtisi
Cc: Zefir Kurtisi; linville@tuxdriver.com; ath9k-devel@lists.ath9k.org; linux-wireless@vger.kernel.org; Rodriguez, Luis; Chadd, Adrian; chunkeey@googlemail.com
Subject: Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel

On 2012-04-23 11:12 AM, Zefir Kurtisi wrote:
> On 22.04.2012 22:00, Felix Fietkau wrote:
>> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
>>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>>
>>>
>>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>> ---
>>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>>>   1 files changed, 6 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c 
>>> b/drivers/net/wireless/ath/ath9k/recv.c
>>> index f4ae3ba..ef45c0c 100644
>>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>>> @@ -17,6 +17,7 @@
>>>   #include<linux/dma-mapping.h>
>>>   #include "ath9k.h"
>>>   #include "ar9003_mac.h"
>>> +#include "dfs.h"
>>>
>>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>>>
>>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>>>   	}
>>>
>>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
>>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
>>> +	else
>>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
>> This should only be done in AP mode, maybe mac80211 should have a 
>> separate flag to tell the driver to enable this. Same comment also 
>> applies to patch 4/4.
>>
>> - Felix
>>
> Are you aware of any issues enabling DFS in client modes? My thinking 
> was that it won't hurt to detect radars in any mode and let the DFS 
> management component decide what to do with that events.
Power consumption (for laptops), performance issues (due to DMA descriptor use and interrupts triggered by pulse detection).

If the DFS management component decides what to do with the events, why not let it decide whether it actually wants events as well ;)

- Felix

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

* [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
@ 2012-04-23 17:27           ` Chadd, Adrian
  0 siblings, 0 replies; 25+ messages in thread
From: Chadd, Adrian @ 2012-04-23 17:27 UTC (permalink / raw)
  To: ath9k-devel

There may be a need later on (eg mesh, p2p mode, etc.)

2c,


Adrian

-----Original Message-----
From: Felix Fietkau [mailto:nbd at openwrt.org] 
Sent: Monday, April 23, 2012 10:24 AM
To: Zefir Kurtisi
Cc: Zefir Kurtisi; linville at tuxdriver.com; ath9k-devel at lists.ath9k.org; linux-wireless at vger.kernel.org; Rodriguez, Luis; Chadd, Adrian; chunkeey at googlemail.com
Subject: Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel

On 2012-04-23 11:12 AM, Zefir Kurtisi wrote:
> On 22.04.2012 22:00, Felix Fietkau wrote:
>> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
>>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>>
>>>
>>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>>> ---
>>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
>>>   1 files changed, 6 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c 
>>> b/drivers/net/wireless/ath/ath9k/recv.c
>>> index f4ae3ba..ef45c0c 100644
>>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>>> @@ -17,6 +17,7 @@
>>>   #include<linux/dma-mapping.h>
>>>   #include "ath9k.h"
>>>   #include "ar9003_mac.h"
>>> +#include "dfs.h"
>>>
>>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
>>>
>>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
>>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
>>>   	}
>>>
>>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
>>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
>>> +	else
>>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
>> This should only be done in AP mode, maybe mac80211 should have a 
>> separate flag to tell the driver to enable this. Same comment also 
>> applies to patch 4/4.
>>
>> - Felix
>>
> Are you aware of any issues enabling DFS in client modes? My thinking 
> was that it won't hurt to detect radars in any mode and let the DFS 
> management component decide what to do with that events.
Power consumption (for laptops), performance issues (due to DMA descriptor use and interrupts triggered by pulse detection).

If the DFS management component decides what to do with the events, why not let it decide whether it actually wants events as well ;)

- Felix

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

* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
  2012-04-23  9:12       ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-23 17:29         ` Christian Lamparter
  -1 siblings, 0 replies; 25+ messages in thread
From: Christian Lamparter @ 2012-04-23 17:29 UTC (permalink / raw)
  To: Zefir Kurtisi
  Cc: Felix Fietkau, Zefir Kurtisi, linville, ath9k-devel,
	linux-wireless, rodrigue, achadd

On Monday, April 23, 2012 11:12:33 AM Zefir Kurtisi wrote:
> On 22.04.2012 22:00, Felix Fietkau wrote:
> > On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
> >> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >>
> >>
> >> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >> ---
> >>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
> >>   1 files changed, 6 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> >> index f4ae3ba..ef45c0c 100644
> >> --- a/drivers/net/wireless/ath/ath9k/recv.c
> >> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> >> @@ -17,6 +17,7 @@
> >>   #include<linux/dma-mapping.h>
> >>   #include "ath9k.h"
> >>   #include "ar9003_mac.h"
> >> +#include "dfs.h"
> >>
> >>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
> >>
> >> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
> >>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
> >>   	}
> >>
> >> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
> >> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
> >> +	else
> >> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
> > This should only be done in AP mode, maybe mac80211 should have a
> > separate flag to tell the driver to enable this. Same comment also
> > applies to patch 4/4.
> >
> > - Felix
> >
> Are you aware of any issues enabling DFS in client modes? My thinking 
> was that it won't hurt to detect radars in any mode and let the DFS 
> management component decide what to do with that events.
> 
Hm, what about:

"2. Slave devices with a maximum EIRP of less than 23 dBm do not have
to implement radar detection."
<http://linuxwireless.org/en/developers/DFS/ETSI> - Table D.2

So, 5GHz ath9k devices with 23 dBm (or more) have to have
radar detection anyway?

Regards,
	Christian 

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

* [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
@ 2012-04-23 17:29         ` Christian Lamparter
  0 siblings, 0 replies; 25+ messages in thread
From: Christian Lamparter @ 2012-04-23 17:29 UTC (permalink / raw)
  To: ath9k-devel

On Monday, April 23, 2012 11:12:33 AM Zefir Kurtisi wrote:
> On 22.04.2012 22:00, Felix Fietkau wrote:
> > On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
> >> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >>
> >>
> >> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >> ---
> >>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
> >>   1 files changed, 6 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> >> index f4ae3ba..ef45c0c 100644
> >> --- a/drivers/net/wireless/ath/ath9k/recv.c
> >> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> >> @@ -17,6 +17,7 @@
> >>   #include<linux/dma-mapping.h>
> >>   #include "ath9k.h"
> >>   #include "ar9003_mac.h"
> >> +#include "dfs.h"
> >>
> >>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
> >>
> >> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
> >>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
> >>   	}
> >>
> >> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
> >> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
> >> +	else
> >> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
> > This should only be done in AP mode, maybe mac80211 should have a
> > separate flag to tell the driver to enable this. Same comment also
> > applies to patch 4/4.
> >
> > - Felix
> >
> Are you aware of any issues enabling DFS in client modes? My thinking 
> was that it won't hurt to detect radars in any mode and let the DFS 
> management component decide what to do with that events.
> 
Hm, what about:

"2. Slave devices with a maximum EIRP of less than 23 dBm do not have
to implement radar detection."
<http://linuxwireless.org/en/developers/DFS/ETSI> - Table D.2

So, 5GHz ath9k devices with 23 dBm (or more) have to have
radar detection anyway?

Regards,
	Christian 

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

* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
  2012-04-23 17:23         ` [ath9k-devel] " Felix Fietkau
@ 2012-04-23 18:28           ` Luis R. Rodriguez
  -1 siblings, 0 replies; 25+ messages in thread
From: Luis R. Rodriguez @ 2012-04-23 18:28 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Zefir Kurtisi, Zefir Kurtisi, linville, ath9k-devel,
	linux-wireless, achadd, chunkeey

On Mon, Apr 23, 2012 at 07:23:58PM +0200, Felix Fietkau wrote:
> On 2012-04-23 11:12 AM, Zefir Kurtisi wrote:
> > On 22.04.2012 22:00, Felix Fietkau wrote:
> >> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
> >>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >>>
> >>>
> >>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >>> ---
> >>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
> >>>   1 files changed, 6 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> >>> index f4ae3ba..ef45c0c 100644
> >>> --- a/drivers/net/wireless/ath/ath9k/recv.c
> >>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> >>> @@ -17,6 +17,7 @@
> >>>   #include<linux/dma-mapping.h>
> >>>   #include "ath9k.h"
> >>>   #include "ar9003_mac.h"
> >>> +#include "dfs.h"
> >>>
> >>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
> >>>
> >>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
> >>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
> >>>   	}
> >>>
> >>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
> >>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
> >>> +	else
> >>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
> >> This should only be done in AP mode, maybe mac80211 should have a
> >> separate flag to tell the driver to enable this. Same comment also
> >> applies to patch 4/4.
> >>
> >> - Felix
> >>
> > Are you aware of any issues enabling DFS in client modes? My thinking 
> > was that it won't hurt to detect radars in any mode and let the DFS 
> > management component decide what to do with that events.
> Power consumption (for laptops), performance issues (due to DMA
> descriptor use and interrupts triggered by pulse detection).
> 
> If the DFS management component decides what to do with the events, why
> not let it decide whether it actually wants events as well ;)

This could come from mac80211's filter flag call on to the driver, that is,
mac80211 can figure out when we need something like ATH9K_RX_FILTER_PHYRADAR
and tell us, instead of having the driver figure this out.

  Luis

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

* [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
@ 2012-04-23 18:28           ` Luis R. Rodriguez
  0 siblings, 0 replies; 25+ messages in thread
From: Luis R. Rodriguez @ 2012-04-23 18:28 UTC (permalink / raw)
  To: ath9k-devel

On Mon, Apr 23, 2012 at 07:23:58PM +0200, Felix Fietkau wrote:
> On 2012-04-23 11:12 AM, Zefir Kurtisi wrote:
> > On 22.04.2012 22:00, Felix Fietkau wrote:
> >> On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
> >>> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >>>
> >>>
> >>> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> >>> ---
> >>>   drivers/net/wireless/ath/ath9k/recv.c |    6 ++++++
> >>>   1 files changed, 6 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> >>> index f4ae3ba..ef45c0c 100644
> >>> --- a/drivers/net/wireless/ath/ath9k/recv.c
> >>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> >>> @@ -17,6 +17,7 @@
> >>>   #include<linux/dma-mapping.h>
> >>>   #include "ath9k.h"
> >>>   #include "ar9003_mac.h"
> >>> +#include "dfs.h"
> >>>
> >>>   #define SKB_CB_ATHBUF(__skb)	(*((struct ath_buf **)__skb->cb))
> >>>
> >>> @@ -467,6 +468,11 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
> >>>   		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
> >>>   	}
> >>>
> >>> +	if (sc->sc_ah->curchan->chan->flags&  IEEE80211_CHAN_RADAR)
> >>> +		rfilt |= ATH9K_RX_FILTER_PHYRADAR;
> >>> +	else
> >>> +		rfilt&= ~ATH9K_RX_FILTER_PHYRADAR;
> >> This should only be done in AP mode, maybe mac80211 should have a
> >> separate flag to tell the driver to enable this. Same comment also
> >> applies to patch 4/4.
> >>
> >> - Felix
> >>
> > Are you aware of any issues enabling DFS in client modes? My thinking 
> > was that it won't hurt to detect radars in any mode and let the DFS 
> > management component decide what to do with that events.
> Power consumption (for laptops), performance issues (due to DMA
> descriptor use and interrupts triggered by pulse detection).
> 
> If the DFS management component decides what to do with the events, why
> not let it decide whether it actually wants events as well ;)

This could come from mac80211's filter flag call on to the driver, that is,
mac80211 can figure out when we need something like ATH9K_RX_FILTER_PHYRADAR
and tell us, instead of having the driver figure this out.

  Luis

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

* Re: [PATCH 4/4] ath9k: set radar config if switching to DFS channel
  2012-04-22 19:50   ` [ath9k-devel] " Zefir Kurtisi
@ 2012-04-27 20:50     ` Adrian Chadd
  -1 siblings, 0 replies; 25+ messages in thread
From: Adrian Chadd @ 2012-04-27 20:50 UTC (permalink / raw)
  To: Zefir Kurtisi
  Cc: linville, ath9k-devel, linux-wireless, rodrigue, achadd,
	chunkeey, Zefir Kurtisi

Hi,

I'm fine with all of these patches.

Thanks for tackling it!



Adrian

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

* [ath9k-devel] [PATCH 4/4] ath9k: set radar config if switching to DFS channel
@ 2012-04-27 20:50     ` Adrian Chadd
  0 siblings, 0 replies; 25+ messages in thread
From: Adrian Chadd @ 2012-04-27 20:50 UTC (permalink / raw)
  To: ath9k-devel

Hi,

I'm fine with all of these patches.

Thanks for tackling it!



Adrian

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

* [ath9k-devel] [PATCH 3/4] ath9k: forward pulse events to DFS pulse detector
  2012-04-22 19:50   ` [ath9k-devel] " Zefir Kurtisi
  (?)
@ 2012-05-25 15:16   ` Benoit Papillault
  -1 siblings, 0 replies; 25+ messages in thread
From: Benoit Papillault @ 2012-05-25 15:16 UTC (permalink / raw)
  To: ath9k-devel

Le 22/04/2012 21:50, Zefir Kurtisi a ?crit :
> From: Zefir Kurtisi<zefir.kurtisi@neratec.com>
>
>
> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> ---
>   drivers/net/wireless/ath/ath9k/recv.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index ef45c0c..f647d0b 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -1856,6 +1856,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
>   		    unlikely(tsf_lower - rs.rs_tstamp>  0x10000000))
>   			rxs->mactime += 0x100000000ULL;
>
> +		if (rs.rs_phyerr == ATH9K_PHYERR_RADAR)
> +			ath9k_dfs_process_phyerr(sc, hdr,&rs, rxs->mactime);
> +
>   		retval = ath9k_rx_skb_preprocess(common, hw, hdr,&rs,
>   						 rxs,&decrypt_error);
>   		if (retval)

Sorry to jump into this old thread. IMHO, rs.rs_phyerr is only valid if 
rs.rs_status & ATH9K_RXERR_PHY is set. So we should check for the later 
first, isn't it?

Regards,
Benoit

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

end of thread, other threads:[~2012-05-25 15:16 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-22 19:50 [PATCH 0/4] ath9k: integrate DFS detection Zefir Kurtisi
2012-04-22 19:50 ` [ath9k-devel] " Zefir Kurtisi
2012-04-22 19:50 ` [PATCH 1/4] ath9k: set detector DFS domain in reg notifyer Zefir Kurtisi
2012-04-22 19:50   ` [ath9k-devel] " Zefir Kurtisi
2012-04-22 19:50 ` [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel Zefir Kurtisi
2012-04-22 19:50   ` [ath9k-devel] " Zefir Kurtisi
2012-04-22 20:00   ` Felix Fietkau
2012-04-22 20:00     ` [ath9k-devel] " Felix Fietkau
2012-04-23  9:12     ` Zefir Kurtisi
2012-04-23  9:12       ` [ath9k-devel] " Zefir Kurtisi
2012-04-23 17:23       ` Felix Fietkau
2012-04-23 17:23         ` [ath9k-devel] " Felix Fietkau
2012-04-23 17:27         ` Chadd, Adrian
2012-04-23 17:27           ` [ath9k-devel] " Chadd, Adrian
2012-04-23 18:28         ` Luis R. Rodriguez
2012-04-23 18:28           ` [ath9k-devel] " Luis R. Rodriguez
2012-04-23 17:29       ` Christian Lamparter
2012-04-23 17:29         ` [ath9k-devel] " Christian Lamparter
2012-04-22 19:50 ` [PATCH 3/4] ath9k: forward pulse events to DFS pulse detector Zefir Kurtisi
2012-04-22 19:50   ` [ath9k-devel] " Zefir Kurtisi
2012-05-25 15:16   ` Benoit Papillault
2012-04-22 19:50 ` [PATCH 4/4] ath9k: set radar config if switching to DFS channel Zefir Kurtisi
2012-04-22 19:50   ` [ath9k-devel] " Zefir Kurtisi
2012-04-27 20:50   ` Adrian Chadd
2012-04-27 20:50     ` [ath9k-devel] " Adrian Chadd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.