ieee80211_ioctl.c (187801) | ieee80211_ioctl.c (187835) |
---|---|
1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 187801 2009-01-27 23:42:14Z sam $"); | 28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 187835 2009-01-28 18:39:23Z sam $"); |
29 30/* 31 * IEEE 802.11 ioctl support (FreeBSD-specific) 32 */ 33 34#include "opt_inet.h" 35#include "opt_ipx.h" 36#include "opt_wlan.h" --- 673 unchanged lines hidden (view full) --- 710 malloc(IEEE80211_DEVCAPS_SIZE(maxchans), M_TEMP, M_NOWAIT | M_ZERO); 711 if (dc == NULL) 712 return ENOMEM; 713 dc->dc_drivercaps = ic->ic_caps; 714 dc->dc_cryptocaps = ic->ic_cryptocaps; 715 dc->dc_htcaps = ic->ic_htcaps; 716 ci = &dc->dc_chaninfo; 717 ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans); | 29 30/* 31 * IEEE 802.11 ioctl support (FreeBSD-specific) 32 */ 33 34#include "opt_inet.h" 35#include "opt_ipx.h" 36#include "opt_wlan.h" --- 673 unchanged lines hidden (view full) --- 710 malloc(IEEE80211_DEVCAPS_SIZE(maxchans), M_TEMP, M_NOWAIT | M_ZERO); 711 if (dc == NULL) 712 return ENOMEM; 713 dc->dc_drivercaps = ic->ic_caps; 714 dc->dc_cryptocaps = ic->ic_cryptocaps; 715 dc->dc_htcaps = ic->ic_htcaps; 716 ci = &dc->dc_chaninfo; 717 ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans); |
718 KASSERT(ci->ic_nchans <= maxchans, 719 ("nchans %d maxchans %d", ci->ic_nchans, maxchans)); |
|
718 ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans); 719 error = copyout(dc, ireq->i_data, IEEE80211_DEVCAPS_SPACE(dc)); 720 free(dc, M_TEMP); 721 return error; 722} 723 724static __noinline int 725ieee80211_ioctl_getstavlan(struct ieee80211vap *vap, struct ieee80211req *ireq) --- 2632 unchanged lines hidden --- | 720 ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans); 721 error = copyout(dc, ireq->i_data, IEEE80211_DEVCAPS_SPACE(dc)); 722 free(dc, M_TEMP); 723 return error; 724} 725 726static __noinline int 727ieee80211_ioctl_getstavlan(struct ieee80211vap *vap, struct ieee80211req *ireq) --- 2632 unchanged lines hidden --- |