ifieee80211.c (187844) | ifieee80211.c (187845) |
---|---|
1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 187844 2009-01-28 19:23:12Z sam $ | 27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 187845 2009-01-28 19:24:29Z sam $ |
28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 3301 unchanged lines hidden (view full) --- 3337 "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ 3338 "\37TXFRAG\40TDMA" 3339 3340static void 3341list_capabilities(int s) 3342{ 3343 struct ieee80211_devcaps_req *dc; 3344 | 28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 3301 unchanged lines hidden (view full) --- 3337 "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ 3338 "\37TXFRAG\40TDMA" 3339 3340static void 3341list_capabilities(int s) 3342{ 3343 struct ieee80211_devcaps_req *dc; 3344 |
3345 dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); | 3345 if (verbose) 3346 dc = malloc(IEEE80211_DEVCAPS_SIZE(MAXCHAN)); 3347 else 3348 dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); |
3346 if (dc == NULL) 3347 errx(1, "no space for device capabilities"); | 3349 if (dc == NULL) 3350 errx(1, "no space for device capabilities"); |
3348 dc->dc_chaninfo.ic_nchans = 1; | 3351 dc->dc_chaninfo.ic_nchans = verbose ? MAXCHAN : 1; |
3349 getdevcaps(s, dc); 3350 printb("drivercaps", dc->dc_drivercaps, IEEE80211_C_BITS); 3351 if (dc->dc_cryptocaps != 0 || verbose) { 3352 putchar('\n'); 3353 printb("cryptocaps", dc->dc_cryptocaps, IEEE80211_CRYPTO_BITS); 3354 } 3355 if (dc->dc_htcaps != 0 || verbose) { 3356 putchar('\n'); 3357 printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS); 3358 } 3359 putchar('\n'); | 3352 getdevcaps(s, dc); 3353 printb("drivercaps", dc->dc_drivercaps, IEEE80211_C_BITS); 3354 if (dc->dc_cryptocaps != 0 || verbose) { 3355 putchar('\n'); 3356 printb("cryptocaps", dc->dc_cryptocaps, IEEE80211_CRYPTO_BITS); 3357 } 3358 if (dc->dc_htcaps != 0 || verbose) { 3359 putchar('\n'); 3360 printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS); 3361 } 3362 putchar('\n'); |
3363 if (verbose) { 3364 chaninfo = &dc->dc_chaninfo; /* XXX */ 3365 print_channels(s, &dc->dc_chaninfo, 1/*allchans*/, verbose); 3366 } |
|
3360 free(dc); 3361} 3362 3363static int 3364get80211wme(int s, int param, int ac, int *val) 3365{ 3366 struct ieee80211req ireq; 3367 --- 1486 unchanged lines hidden --- | 3367 free(dc); 3368} 3369 3370static int 3371get80211wme(int s, int param, int ac, int *val) 3372{ 3373 struct ieee80211req ireq; 3374 --- 1486 unchanged lines hidden --- |