diff options
author | sam <sam@FreeBSD.org> | 2009-01-28 19:24:29 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-01-28 19:24:29 +0000 |
commit | 7e2ede100c8b197a4ff32cf53d59b2921f8a2cb9 (patch) | |
tree | eb339953b9d0a1f0698b7a0f1fd8195aa676a800 /sbin | |
parent | 85eedef5da0512806dcc0324a4f8ceff39afc392 (diff) | |
download | FreeBSD-src-7e2ede100c8b197a4ff32cf53d59b2921f8a2cb9.zip FreeBSD-src-7e2ede100c8b197a4ff32cf53d59b2921f8a2cb9.tar.gz |
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
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index cf38719..ed2757e 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -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); } |