summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/mac.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-23 17:04:28 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2014-10-24 16:35:18 +0300
commitfa1d4df84131afffc0e7aa02cea29ae76eb789a2 (patch)
tree22c594f3a05b0ea772b324c9991091dbdfea6601 /drivers/net/wireless/ath/ath10k/mac.c
parenta5d85f609de71c0d92c358cf96a91f00b3d8d657 (diff)
downloadop-kernel-dev-fa1d4df84131afffc0e7aa02cea29ae76eb789a2.zip
op-kernel-dev-fa1d4df84131afffc0e7aa02cea29ae76eb789a2.tar.gz
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. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/mac.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index caaa369..1927adb 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4040,6 +4040,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;
OpenPOWER on IntegriCloud