All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ath9k: add DFS support for HT40
@ 2015-03-10 16:49 Zefir Kurtisi
  2015-03-10 16:49 ` [PATCH 1/3] ath9k: restart only triggering DFS detector line Zefir Kurtisi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zefir Kurtisi @ 2015-03-10 16:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel, Zefir Kurtisi

Atheros chipsets certified for DFS (currently AR_SREV_VERSION_9580)
also support HT40 DFS mode. This patch series provides handling of
radar pulses reported for primary and extension channels and
sets small knobs in the detector and interface-combinations to
enable operating on HT40 DFS channels.


Zefir Kurtisi (3):
  ath9k: restart only triggering DFS detector line
  ath9k: add DFS support for extension channel
  ath9k: allow 40MHz radar detection width

 drivers/net/wireless/ath/ath9k/dfs.c            | 44 ++++++++++++++++---------
 drivers/net/wireless/ath/ath9k/init.c           |  3 +-
 drivers/net/wireless/ath/dfs_pattern_detector.c |  2 +-
 3 files changed, 32 insertions(+), 17 deletions(-)

-- 
1.9.1


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

* [PATCH 1/3] ath9k: restart only triggering DFS detector line
  2015-03-10 16:49 [PATCH 0/3] ath9k: add DFS support for HT40 Zefir Kurtisi
@ 2015-03-10 16:49 ` Zefir Kurtisi
  2015-03-16 15:53   ` [1/3] " Kalle Valo
  2015-03-10 16:49 ` [PATCH 2/3] ath9k: add DFS support for extension channel Zefir Kurtisi
  2015-03-10 16:49 ` [PATCH 3/3] ath9k: allow 40MHz radar detection width Zefir Kurtisi
  2 siblings, 1 reply; 5+ messages in thread
From: Zefir Kurtisi @ 2015-03-10 16:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel, Zefir Kurtisi

To support HT40 DFS mode, a triggering detector must
reset only itself but not other detector lines.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---
 drivers/net/wireless/ath/dfs_pattern_detector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 3d57f87..c657ca2 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -289,7 +289,7 @@ dpd_add_pulse(struct dfs_pattern_detector *dpd, struct pulse_event *event)
 				"count=%d, count_false=%d\n",
 				event->freq, pd->rs->type_id,
 				ps->pri, ps->count, ps->count_falses);
-			channel_detector_reset(dpd, cd);
+			pd->reset(pd, dpd->last_pulse_ts);
 			return true;
 		}
 	}
-- 
1.9.1


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

* [PATCH 2/3] ath9k: add DFS support for extension channel
  2015-03-10 16:49 [PATCH 0/3] ath9k: add DFS support for HT40 Zefir Kurtisi
  2015-03-10 16:49 ` [PATCH 1/3] ath9k: restart only triggering DFS detector line Zefir Kurtisi
@ 2015-03-10 16:49 ` Zefir Kurtisi
  2015-03-10 16:49 ` [PATCH 3/3] ath9k: allow 40MHz radar detection width Zefir Kurtisi
  2 siblings, 0 replies; 5+ messages in thread
From: Zefir Kurtisi @ 2015-03-10 16:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel, Zefir Kurtisi

In HT40 modes, pulse events on primary and extension
channel are processed individually. If valid, a pulse
event will be fed into the detector
* for primary frequency, or
* for extension frequency (+/-20MHz based on HT40-mode)
* or both

With that, a 40MHz radar will result in two individual
radar events.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---
 drivers/net/wireless/ath/ath9k/dfs.c | 44 ++++++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c
index 726271c..e98a9ea 100644
--- a/drivers/net/wireless/ath/ath9k/dfs.c
+++ b/drivers/net/wireless/ath/ath9k/dfs.c
@@ -126,8 +126,19 @@ ath9k_postprocess_radar_event(struct ath_softc *sc,
 	DFS_STAT_INC(sc, pulses_detected);
 	return true;
 }
-#undef PRI_CH_RADAR_FOUND
-#undef EXT_CH_RADAR_FOUND
+
+static void
+ath9k_dfs_process_radar_pulse(struct ath_softc *sc, struct pulse_event *pe)
+{
+	struct dfs_pattern_detector *pd = sc->dfs_detector;
+	DFS_STAT_INC(sc, pulses_processed);
+	if (pd == NULL)
+		return;
+	if (!pd->add_pulse(pd, pe))
+		return;
+	DFS_STAT_INC(sc, radar_detected);
+	ieee80211_radar_detected(sc->hw);
+}
 
 /*
  * DFS: check PHY-error for radar pulse and feed the detector
@@ -176,18 +187,21 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
 	ard.pulse_length_pri = vdata_end[-3];
 	pe.freq = ah->curchan->channel;
 	pe.ts = mactime;
-	if (ath9k_postprocess_radar_event(sc, &ard, &pe)) {
-		struct dfs_pattern_detector *pd = sc->dfs_detector;
-		ath_dbg(common, DFS,
-			"ath9k_dfs_process_phyerr: channel=%d, ts=%llu, "
-			"width=%d, rssi=%d, delta_ts=%llu\n",
-			pe.freq, pe.ts, pe.width, pe.rssi,
-			pe.ts - sc->dfs_prev_pulse_ts);
-		sc->dfs_prev_pulse_ts = pe.ts;
-		DFS_STAT_INC(sc, pulses_processed);
-		if (pd != NULL && pd->add_pulse(pd, &pe)) {
-			DFS_STAT_INC(sc, radar_detected);
-			ieee80211_radar_detected(sc->hw);
-		}
+	if (!ath9k_postprocess_radar_event(sc, &ard, &pe))
+		return;
+
+	ath_dbg(common, DFS,
+		"ath9k_dfs_process_phyerr: type=%d, freq=%d, ts=%llu, "
+		"width=%d, rssi=%d, delta_ts=%llu\n",
+		ard.pulse_bw_info, pe.freq, pe.ts, pe.width, pe.rssi,
+		pe.ts - sc->dfs_prev_pulse_ts);
+	sc->dfs_prev_pulse_ts = pe.ts;
+	if (ard.pulse_bw_info & PRI_CH_RADAR_FOUND)
+		ath9k_dfs_process_radar_pulse(sc, &pe);
+	if (ard.pulse_bw_info & EXT_CH_RADAR_FOUND) {
+		pe.freq += IS_CHAN_HT40PLUS(ah->curchan) ? 20 : -20;
+		ath9k_dfs_process_radar_pulse(sc, &pe);
 	}
 }
+#undef PRI_CH_RADAR_FOUND
+#undef EXT_CH_RADAR_FOUND
-- 
1.9.1


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

* [PATCH 3/3] ath9k: allow 40MHz radar detection width
  2015-03-10 16:49 [PATCH 0/3] ath9k: add DFS support for HT40 Zefir Kurtisi
  2015-03-10 16:49 ` [PATCH 1/3] ath9k: restart only triggering DFS detector line Zefir Kurtisi
  2015-03-10 16:49 ` [PATCH 2/3] ath9k: add DFS support for extension channel Zefir Kurtisi
@ 2015-03-10 16:49 ` Zefir Kurtisi
  2 siblings, 0 replies; 5+ messages in thread
From: Zefir Kurtisi @ 2015-03-10 16:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel, Zefir Kurtisi

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---
 drivers/net/wireless/ath/ath9k/init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 6c6e884..bfa4ff6 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -763,7 +763,8 @@ static const struct ieee80211_iface_combination if_comb[] = {
 		.num_different_channels = 1,
 		.beacon_int_infra_match = true,
 		.radar_detect_widths =	BIT(NL80211_CHAN_WIDTH_20_NOHT) |
-					BIT(NL80211_CHAN_WIDTH_20),
+					BIT(NL80211_CHAN_WIDTH_20) |
+					BIT(NL80211_CHAN_WIDTH_40),
 	}
 #endif
 };
-- 
1.9.1


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

* Re: [1/3] ath9k: restart only triggering DFS detector line
  2015-03-10 16:49 ` [PATCH 1/3] ath9k: restart only triggering DFS detector line Zefir Kurtisi
@ 2015-03-16 15:53   ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2015-03-16 15:53 UTC (permalink / raw)
  To: Zefir Kurtisi; +Cc: linux-wireless, ath9k-devel, Zefir Kurtisi


> To support HT40 DFS mode, a triggering detector must
> reset only itself but not other detector lines.
> 
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>

Thanks, 3 patches applied to wireless-drivers-next.git:

8252a35ab4f6 ath9k: restart only triggering DFS detector line
58766977ad12 ath9k: add DFS support for extension channel
387f149a2ace ath9k: allow 40MHz radar detection width

Kalle Valo

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

end of thread, other threads:[~2015-03-16 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 16:49 [PATCH 0/3] ath9k: add DFS support for HT40 Zefir Kurtisi
2015-03-10 16:49 ` [PATCH 1/3] ath9k: restart only triggering DFS detector line Zefir Kurtisi
2015-03-16 15:53   ` [1/3] " Kalle Valo
2015-03-10 16:49 ` [PATCH 2/3] ath9k: add DFS support for extension channel Zefir Kurtisi
2015-03-10 16:49 ` [PATCH 3/3] ath9k: allow 40MHz radar detection width Zefir Kurtisi

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.