From owner-svn-src-head@FreeBSD.ORG Wed Jan 28 19:24:29 2009 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 7524810656E2; Wed, 28 Jan 2009 19:24:29 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62C5B8FC1F; Wed, 28 Jan 2009 19:24:29 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0SJOT9U030252; Wed, 28 Jan 2009 19:24:29 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0SJOTTE030251; Wed, 28 Jan 2009 19:24:29 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901281924.n0SJOTTE030251@svn.freebsd.org> From: Sam Leffler Date: Wed, 28 Jan 2009 19:24:29 +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: r187845 - 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: Wed, 28 Jan 2009 19:24:31 -0000 Author: sam Date: Wed Jan 28 19:24:29 2009 New Revision: 187845 URL: http://svn.freebsd.org/changeset/base/187845 Log: include the channel list in list caps when -v is set; ieee channel #'s are not available and we have to hack around the mapchan routine but it lets us see the calibration table w/o forcing the debug regdomain Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Wed Jan 28 19:23:12 2009 (r187844) +++ head/sbin/ifconfig/ifieee80211.c Wed Jan 28 19:24:29 2009 (r187845) @@ -3342,10 +3342,13 @@ list_capabilities(int s) { struct ieee80211_devcaps_req *dc; - dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); + if (verbose) + dc = malloc(IEEE80211_DEVCAPS_SIZE(MAXCHAN)); + else + dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); if (dc == NULL) errx(1, "no space for device capabilities"); - dc->dc_chaninfo.ic_nchans = 1; + dc->dc_chaninfo.ic_nchans = verbose ? MAXCHAN : 1; getdevcaps(s, dc); printb("drivercaps", dc->dc_drivercaps, IEEE80211_C_BITS); if (dc->dc_cryptocaps != 0 || verbose) { @@ -3357,6 +3360,10 @@ list_capabilities(int s) printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS); } putchar('\n'); + if (verbose) { + chaninfo = &dc->dc_chaninfo; /* XXX */ + print_channels(s, &dc->dc_chaninfo, 1/*allchans*/, verbose); + } free(dc); }