From: Felix Fietkau Date: Thu, 23 Oct 2014 14:04:28 +0000 (+0300) Subject: ath10k: add SURVEY_INFO_IN_USE for current channel on survey X-Git-Tag: v3.19-rc1~118^2~134^2~31^2~15 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fa1d4df84131afffc0e7aa02cea29ae76eb789a2;p=karo-tx-linux.git 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index caaa3690af69..1927adb0ef72 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;