diff mbox

[1/4] iw: survey: Mark frequency in use

Message ID 20110107060025.21507.11061.stgit@localhost6.localdomain6 (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bruno Randolf Jan. 7, 2011, 6 a.m. UTC
None
diff mbox

Patch

diff --git a/survey.c b/survey.c
index f9f2508..83c54b3 100644
--- a/survey.c
+++ b/survey.c
@@ -44,8 +44,9 @@  static int print_survey_handler(struct nl_msg *msg, void *arg)
 	}
 
 	if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
-		printf("\tfrequency:\t%u MHz\n",
-			nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]));
+		printf("\tfrequency:\t%u MHz%s\n",
+			nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]),
+			sinfo[NL80211_SURVEY_INFO_IN_USE] ? " [in use]" : "");
 	if (sinfo[NL80211_SURVEY_INFO_NOISE])
 		printf("\tnoise:\t\t%d dBm\n",
 			(int8_t)nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]));