* [PATCH 1/4] ath9k: set detector DFS domain in reg notifyer
2012-04-22 19:50 [PATCH 0/4] ath9k: integrate DFS detection Zefir Kurtisi
@ 2012-04-22 19:50 ` Zefir Kurtisi
2012-04-22 19:50 ` [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel Zefir Kurtisi
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ 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] 12+ messages in thread* [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
2012-04-22 19:50 [PATCH 0/4] ath9k: integrate DFS detection 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 ` Zefir Kurtisi
2012-04-22 20:00 ` Felix Fietkau
2012-04-22 19:50 ` [PATCH 3/4] ath9k: forward pulse events to DFS pulse detector Zefir Kurtisi
2012-04-22 19:50 ` [PATCH 4/4] ath9k: set radar config if switching to DFS channel Zefir Kurtisi
3 siblings, 1 reply; 12+ 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] 12+ messages in thread
* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
2012-04-22 19:50 ` [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel Zefir Kurtisi
@ 2012-04-22 20:00 ` Felix Fietkau
2012-04-23 9:12 ` Zefir Kurtisi
0 siblings, 1 reply; 12+ 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] 12+ messages in thread
* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
2012-04-22 20:00 ` Felix Fietkau
@ 2012-04-23 9:12 ` Zefir Kurtisi
2012-04-23 17:23 ` Felix Fietkau
2012-04-23 17:29 ` Christian Lamparter
0 siblings, 2 replies; 12+ 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] 12+ messages in thread
* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
2012-04-23 9:12 ` Zefir Kurtisi
@ 2012-04-23 17:23 ` Felix Fietkau
2012-04-23 17:27 ` Chadd, Adrian
2012-04-23 18:28 ` Luis R. Rodriguez
2012-04-23 17:29 ` Christian Lamparter
1 sibling, 2 replies; 12+ 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] 12+ messages in thread
* RE: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
2012-04-23 17:23 ` Felix Fietkau
@ 2012-04-23 17:27 ` Chadd, Adrian
2012-04-23 18:28 ` Luis R. Rodriguez
1 sibling, 0 replies; 12+ messages in thread
From: Chadd, Adrian @ 2012-04-23 17:27 UTC (permalink / raw)
To: Felix Fietkau, Zefir Kurtisi
Cc: Zefir Kurtisi, linville@tuxdriver.com,
ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org,
Rodriguez, Luis, chunkeey@googlemail.com
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] 12+ messages in thread
* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
2012-04-23 17:23 ` Felix Fietkau
2012-04-23 17:27 ` Chadd, Adrian
@ 2012-04-23 18:28 ` Luis R. Rodriguez
1 sibling, 0 replies; 12+ 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] 12+ messages in thread
* Re: [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel
2012-04-23 9:12 ` Zefir Kurtisi
2012-04-23 17:23 ` Felix Fietkau
@ 2012-04-23 17:29 ` Christian Lamparter
1 sibling, 0 replies; 12+ 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] 12+ messages in thread
* [PATCH 3/4] ath9k: forward pulse events to DFS pulse detector
2012-04-22 19:50 [PATCH 0/4] ath9k: integrate DFS detection 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 ` [PATCH 2/4] ath9k: set PHYRADAR in RX filter when on DFS channel Zefir Kurtisi
@ 2012-04-22 19:50 ` Zefir Kurtisi
2012-04-22 19:50 ` [PATCH 4/4] ath9k: set radar config if switching to DFS channel Zefir Kurtisi
3 siblings, 0 replies; 12+ 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] 12+ messages in thread
* [PATCH 4/4] ath9k: set radar config if switching to DFS channel
2012-04-22 19:50 [PATCH 0/4] ath9k: integrate DFS detection Zefir Kurtisi
` (2 preceding siblings ...)
2012-04-22 19:50 ` [PATCH 3/4] ath9k: forward pulse events to DFS pulse detector Zefir Kurtisi
@ 2012-04-22 19:50 ` Zefir Kurtisi
2012-04-27 20:50 ` Adrian Chadd
3 siblings, 1 reply; 12+ 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] 12+ messages in thread