From patchwork Fri Jan 7 06:00:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Randolf X-Patchwork-Id: 462671 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p075xUh0011087 for ; Fri, 7 Jan 2011 05:59:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753716Ab1AGF73 (ORCPT ); Fri, 7 Jan 2011 00:59:29 -0500 Received: from mail30s.wh2.ocn.ne.jp ([125.206.180.198]:15653 "HELO mail30s.wh2.ocn.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751808Ab1AGF72 (ORCPT ); Fri, 7 Jan 2011 00:59:28 -0500 Received: from vs3003.wh2.ocn.ne.jp (125.206.180.231) by mail30s.wh2.ocn.ne.jp (RS ver 1.0.95vs) with SMTP id 2-0436099966 for ; Fri, 7 Jan 2011 14:59:27 +0900 (JST) Received: (qmail 78484 invoked from network); 7 Jan 2011 05:59:26 -0000 Received: from unknown (HELO localhost6.localdomain6) (220.110.201.18) by with SMTP; 7 Jan 2011 05:59:26 -0000 Subject: [PATCH 1/4] iw: survey: Mark frequency in use To: johannes@sipsolutions.net, linville@tuxdriver.com From: Bruno Randolf Cc: nbd@openwrt.org, linux-wireless@vger.kernel.org Date: Fri, 07 Jan 2011 15:00:25 +0900 Message-ID: <20110107060025.21507.11061.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 X-SF-Loop: 1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 07 Jan 2011 05:59:30 +0000 (UTC) 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]));