ieee80211_ioctl.c (147779) | ieee80211_ioctl.c (147794) |
---|---|
1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2005 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: --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2005 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: --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 147779 2005-07-05 18:05:25Z sam $"); | 34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 147794 2005-07-06 15:38:27Z sam $"); |
35 36/* 37 * IEEE 802.11 ioctl support (FreeBSD-specific) 38 */ 39 40#include "opt_inet.h" 41#include "opt_ipx.h" 42 --- 1403 unchanged lines hidden (view full) --- 1446 break; 1447 case IEEE80211_IOC_DTIM_PERIOD: 1448 ireq->i_val = ic->ic_dtim_period; 1449 break; 1450 case IEEE80211_IOC_BEACON_INTERVAL: 1451 /* NB: get from ic_bss for station mode */ 1452 ireq->i_val = ic->ic_bss->ni_intval; 1453 break; | 35 36/* 37 * IEEE 802.11 ioctl support (FreeBSD-specific) 38 */ 39 40#include "opt_inet.h" 41#include "opt_ipx.h" 42 --- 1403 unchanged lines hidden (view full) --- 1446 break; 1447 case IEEE80211_IOC_DTIM_PERIOD: 1448 ireq->i_val = ic->ic_dtim_period; 1449 break; 1450 case IEEE80211_IOC_BEACON_INTERVAL: 1451 /* NB: get from ic_bss for station mode */ 1452 ireq->i_val = ic->ic_bss->ni_intval; 1453 break; |
1454 case IEEE80211_IOC_PUREG: 1455 ireq->i_val = (ic->ic_flags & IEEE80211_F_PUREG) != 0; 1456 break; |
|
1454 default: 1455 error = EINVAL; 1456 break; 1457 } 1458 return error; 1459} 1460 1461static int --- 849 unchanged lines hidden (view full) --- 2311 return EINVAL; 2312 if (IEEE80211_BINTVAL_MIN <= ireq->i_val && 2313 ireq->i_val <= IEEE80211_BINTVAL_MAX) { 2314 ic->ic_lintval = ireq->i_val; 2315 error = ENETRESET; /* requires restart */ 2316 } else 2317 error = EINVAL; 2318 break; | 1457 default: 1458 error = EINVAL; 1459 break; 1460 } 1461 return error; 1462} 1463 1464static int --- 849 unchanged lines hidden (view full) --- 2314 return EINVAL; 2315 if (IEEE80211_BINTVAL_MIN <= ireq->i_val && 2316 ireq->i_val <= IEEE80211_BINTVAL_MAX) { 2317 ic->ic_lintval = ireq->i_val; 2318 error = ENETRESET; /* requires restart */ 2319 } else 2320 error = EINVAL; 2321 break; |
2322 case IEEE80211_IOC_PUREG: 2323 if (ireq->i_val) 2324 ic->ic_flags |= IEEE80211_F_PUREG; 2325 else 2326 ic->ic_flags &= ~IEEE80211_F_PUREG; 2327 /* NB: reset only if we're operating on an 11g channel */ 2328 if (ic->ic_curmode == IEEE80211_MODE_11G) 2329 error = ENETRESET; 2330 break; |
|
2319 default: 2320 error = EINVAL; 2321 break; 2322 } 2323 if (error == ENETRESET && !IS_UP_AUTO(ic)) 2324 error = 0; 2325 return error; 2326} --- 97 unchanged lines hidden --- | 2331 default: 2332 error = EINVAL; 2333 break; 2334 } 2335 if (error == ENETRESET && !IS_UP_AUTO(ic)) 2336 error = 0; 2337 return error; 2338} --- 97 unchanged lines hidden --- |