Skip to contentSkip to conversation

ath10k: Block radar events when requested

PATCH In review Sujith Manoharan 2 participants 3 messages Nov 17, 2014 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Block radar events when requested

From: Sujith Manoharan <[email protected]>

This patch ensures that reporting of a radar in simulation is not done when detection is disabled explicitly by using the debugfs knob 'dfs_block_radar_events'.

---
 drivers/net/wireless/ath/ath10k/debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/debug.c +2 -1
index 9147dd3..fa1accd 100644
@@ -1437,7 +1437,8 @@ static ssize_t ath10k_write_simulate_radar(struct file *file,
 {
 	struct ath10k *ar = file->private_data;
 
-	ieee80211_radar_detected(ar->hw);
+	if (!ar->dfs_block_radar_events)
+		ieee80211_radar_detected(ar->hw);
 
 	return count;
 }
Signature · 1 line
2.1.3
#1 lore raw
Quoted 16 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

This patch ensures that reporting of a radar in simulation is not done when detection is disabled explicitly by using the debugfs knob 'dfs_block_radar_events'.

---
 drivers/net/wireless/ath/ath10k/debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/debug.c +0 -0
index 9147dd3..fa1accd 100644

drivers/net/wireless/ath/ath10k/debug.c static ssize_t ath10k_write_simulate_radar(struct file *file, · line 1441

Quoted 6 lines
drivers/net/wireless/ath/ath10k/debug.c +2 -1
@@ -1437,7 +1437,8 @@ static ssize_t ath10k_write_simulate_radar(struct file *file,
 {
        struct ath10k *ar = file->private_data;
 
-       ieee80211_radar_detected(ar->hw);
+       if (!ar->dfs_block_radar_events)
+               ieee80211_radar_detected(ar->hw);

The simulate_radar knob is meant to be used with dfs_block_radar_events being true in the first place so you can easily block real DFS events and inject fake ones for testing of DFS upper layers with ath10k.

Your patch breaks this. Why would you want to do that?

Michał

#2 lore raw
Quoted 6 lines · Michal Kazior

The simulate_radar knob is meant to be used with dfs_block_radar_events being true in the first place so you can easily block real DFS events and inject fake ones for testing of DFS upper layers with ath10k.

Your patch breaks this. Why would you want to do that?

Apparently, this knob is also being used to make sure that radar detection doesn't happen when NOL is disabled.

I'll check if this test case is needed at all before adding another knob to the existing pile...

Sujith