From owner-svn-src-head@FreeBSD.ORG Tue Jul 19 15:22:36 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 515C21065670; Tue, 19 Jul 2011 15:22:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4123F8FC19; Tue, 19 Jul 2011 15:22:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6JFMawK077687; Tue, 19 Jul 2011 15:22:36 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6JFMaeU077685; Tue, 19 Jul 2011 15:22:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201107191522.p6JFMaeU077685@svn.freebsd.org> From: Adrian Chadd Date: Tue, 19 Jul 2011 15:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224219 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2011 15:22:36 -0000 Author: adrian Date: Tue Jul 19 15:22:35 2011 New Revision: 224219 URL: http://svn.freebsd.org/changeset/base/224219 Log: This patch enables listing DFS related flags when 'ifconfig -v wlanX list channel' is run. The following new options are introduced: * D: channel requires DFS * R: channel has a radar event * I: channel has detected inteference * C: the CAC period has completed on a channel that requires it (ie, DFS + PASSIVE.) It's relevant for developing, debugging and using the DFS and interference options. Approved by: re (bz) Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Tue Jul 19 14:57:59 2011 (r224218) +++ head/sbin/ifconfig/ifieee80211.c Tue Jul 19 15:22:35 2011 (r224219) @@ -3451,10 +3451,21 @@ print_chaninfo(const struct ieee80211_ch { char buf[14]; + if (verb) + printf("Channel %3u : %u%c%c%c%c%c MHz%-14.14s", + ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, + IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', + IEEE80211_IS_CHAN_DFS(c) ? 'D' : ' ', + IEEE80211_IS_CHAN_RADAR(c) ? 'R' : ' ', + IEEE80211_IS_CHAN_CWINT(c) ? 'I' : ' ', + IEEE80211_IS_CHAN_CACDONE(c) ? 'C' : ' ', + get_chaninfo(c, verb, buf, sizeof(buf))); + else printf("Channel %3u : %u%c MHz%-14.14s", - ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, - IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', - get_chaninfo(c, verb, buf, sizeof(buf))); + ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, + IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', + get_chaninfo(c, verb, buf, sizeof(buf))); + } static int