Re: [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel

2012-04-23 Thread Felix Fietkau
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 Kurtisizefir.kurt...@neratec.com


 Signed-off-by: Zefir Kurtisizefir.kurt...@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 @@
   #includelinux/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
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel

2012-04-23 Thread Chadd, Adrian
There may be a need later on (eg mesh, p2p mode, etc.)

2c,


Adrian

-Original Message-
From: Felix Fietkau [mailto:n...@openwrt.org] 
Sent: Monday, April 23, 2012 10:24 AM
To: Zefir Kurtisi
Cc: Zefir Kurtisi; linvi...@tuxdriver.com; ath9k-devel@lists.ath9k.org; 
linux-wirel...@vger.kernel.org; Rodriguez, Luis; Chadd, Adrian; 
chunk...@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 Kurtisizefir.kurt...@neratec.com


 Signed-off-by: Zefir Kurtisizefir.kurt...@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 @@
   #includelinux/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
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel

2012-04-23 Thread Christian Lamparter
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 Kurtisizefir.kurt...@neratec.com
 
 
  Signed-off-by: Zefir Kurtisizefir.kurt...@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 @@
#includelinux/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 
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel

2012-04-23 Thread Luis R. Rodriguez
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 Kurtisizefir.kurt...@neratec.com
 
 
  Signed-off-by: Zefir Kurtisizefir.kurt...@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 @@
#includelinux/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
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel

2012-04-22 Thread Felix Fietkau
On 2012-04-22 9:50 PM, Zefir Kurtisi wrote:
 From: Zefir Kurtisi zefir.kurt...@neratec.com
 
 
 Signed-off-by: Zefir Kurtisi zefir.kurt...@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

___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel