Skip to contentSkip to conversation

ath10k: add SURVEY_INFO_IN_USE for current channel on survey

PATCH Applied Felix Fietkau 2 participants 5 messages Oct 22, 2014 – Oct 24, 2014 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: add SURVEY_INFO_IN_USE for current channel on survey

---
 drivers/net/wireless/ath/ath10k/mac.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +3 -0
index 4670930..bc440dc 100644
@@ -3975,6 +3975,9 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
 
 	survey->channel = &sband->channels[idx];
 
+	if (ar->rx_channel == survey->channel)
+		survey->filled |= SURVEY_INFO_IN_USE;
+
 exit:
 	mutex_unlock(&ar->conf_mutex);
 	return ret;
Signature · 1 line
2.0.4
#1 lore raw
Quoted 10 lines · Felix Fietkau
---
 drivers/net/wireless/ath/ath10k/mac.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +0 -0
index 4670930..bc440dc 100644

drivers/net/wireless/ath/ath10k/mac.c static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, · line 3980

Quoted 6 lines
drivers/net/wireless/ath/ath10k/mac.c +3 -0
@@ -3975,6 +3975,9 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
 
 	survey->channel = &sband->channels[idx];
 
+	if (ar->rx_channel == survey->channel)
+		survey->filled |= SURVEY_INFO_IN_USE;
+

Why? Does this fix a visible bug? What changes from user space point of view? I'm asking because I want to add something to the commit log.

Signature · 1 line
Kalle Valo
#2 lore raw
Quoted 13 lines · Kalle Valo
Quoted 11 lines · Felix Fietkau
---
 drivers/net/wireless/ath/ath10k/mac.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +0 -0
index 4670930..bc440dc 100644
@@ -3975,6 +3975,9 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
 
Quoted 8 lines

drivers/net/wireless/ath/ath10k/mac.c static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, · line 3980

Quoted 5 lines
drivers/net/wireless/ath/ath10k/mac.c +3 -0
 	survey->channel = &sband->channels[idx];
 
+	if (ar->rx_channel == survey->channel)
+		survey->filled |= SURVEY_INFO_IN_USE;
+

Why? Does this fix a visible bug? What changes from user space point of view? I'm asking because I want to add something to the commit log.

When user space requests survey info, it is useful to know which of the survey data refers to the channel that is currently actively being used. One of the use cases is getting the current channel noise for status output. Without this flag you would have to look up the channel separately and then compare it against the frequency in the survey output in user space.

- Felix

#3 lore raw
Quoted 23 lines · Felix Fietkau
Quoted 13 lines · Kalle Valo
Quoted 11 lines · Felix Fietkau
---
 drivers/net/wireless/ath/ath10k/mac.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +0 -0
index 4670930..bc440dc 100644
@@ -3975,6 +3975,9 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
 
Quoted 8 lines

drivers/net/wireless/ath/ath10k/mac.c static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, · line 3980

Quoted 5 lines
drivers/net/wireless/ath/ath10k/mac.c +3 -0
 	survey->channel = &sband->channels[idx];
 
+	if (ar->rx_channel == survey->channel)
+		survey->filled |= SURVEY_INFO_IN_USE;
+

Why? Does this fix a visible bug? What changes from user space point of view? I'm asking because I want to add something to the commit log.

Quoted 5 lines

When user space requests survey info, it is useful to know which of the survey data refers to the channel that is currently actively being used. One of the use cases is getting the current channel noise for status output. Without this flag you would have to look up the channel separately and then compare it against the frequency in the survey output in user space.

Perfect, thanks. I added this to the commit log in ath-next-test:

commit f7528c6fca1b2ee1899069f1066012f47586a0c8

Author: Felix Fietkau <[email protected]>
Date:   Wed Oct 22 18:46:02 2014 +0200

ath10k: add SURVEY_INFO_IN_USE for current channel on survey

When user space requests survey info, it is useful to know which of the survey data refers to the channel that is currently actively being used. One of the use cases is getting the current channel noise for status output. Without this flag you would have to look up the channel separately and then compare it against the frequency in the survey output in user space.

Signature · 1 line
Kalle Valo