ieee80211_ioctl.c (153402) | ieee80211_ioctl.c (153421) |
---|---|
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 153402 2005-12-14 01:14:22Z sam $"); | 34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 153421 2005-12-14 19:32:53Z sam $"); |
35 36/* 37 * IEEE 802.11 ioctl support (FreeBSD-specific) 38 */ 39 40#include "opt_inet.h" 41#include "opt_ipx.h" 42 --- 1441 unchanged lines hidden (view full) --- 1484 ireq->i_val = ic->ic_mcast_rate; 1485 break; 1486 case IEEE80211_IOC_FRAGTHRESHOLD: 1487 ireq->i_val = ic->ic_fragthreshold; 1488 break; 1489 case IEEE80211_IOC_MACCMD: 1490 error = ieee80211_ioctl_getmaccmd(ic, ireq); 1491 break; | 35 36/* 37 * IEEE 802.11 ioctl support (FreeBSD-specific) 38 */ 39 40#include "opt_inet.h" 41#include "opt_ipx.h" 42 --- 1441 unchanged lines hidden (view full) --- 1484 ireq->i_val = ic->ic_mcast_rate; 1485 break; 1486 case IEEE80211_IOC_FRAGTHRESHOLD: 1487 ireq->i_val = ic->ic_fragthreshold; 1488 break; 1489 case IEEE80211_IOC_MACCMD: 1490 error = ieee80211_ioctl_getmaccmd(ic, ireq); 1491 break; |
1492 case IEEE80211_IOC_BURST: 1493 ireq->i_val = (ic->ic_flags & IEEE80211_F_BURST) != 0; 1494 break; |
|
1492 default: 1493 error = EINVAL; 1494 break; 1495 } 1496 return error; 1497} 1498 1499static int --- 877 unchanged lines hidden (view full) --- 2377 ireq->i_val != IEEE80211_FRAG_MAX) 2378 return EINVAL; 2379 if (!(IEEE80211_FRAG_MIN <= ireq->i_val && 2380 ireq->i_val <= IEEE80211_FRAG_MAX)) 2381 return EINVAL; 2382 ic->ic_fragthreshold = ireq->i_val; 2383 error = IS_UP(ic) ? ic->ic_reset(ic->ic_ifp) : 0; 2384 break; | 1495 default: 1496 error = EINVAL; 1497 break; 1498 } 1499 return error; 1500} 1501 1502static int --- 877 unchanged lines hidden (view full) --- 2380 ireq->i_val != IEEE80211_FRAG_MAX) 2381 return EINVAL; 2382 if (!(IEEE80211_FRAG_MIN <= ireq->i_val && 2383 ireq->i_val <= IEEE80211_FRAG_MAX)) 2384 return EINVAL; 2385 ic->ic_fragthreshold = ireq->i_val; 2386 error = IS_UP(ic) ? ic->ic_reset(ic->ic_ifp) : 0; 2387 break; |
2388 case IEEE80211_IOC_BURST: 2389 if (ireq->i_val) { 2390 if ((ic->ic_caps & IEEE80211_C_BURST) == 0) 2391 return EINVAL; 2392 ic->ic_flags |= IEEE80211_F_BURST; 2393 } else 2394 ic->ic_flags &= ~IEEE80211_F_BURST; 2395 error = ENETRESET; /* XXX maybe not for station? */ 2396 break; |
|
2385 default: 2386 error = EINVAL; 2387 break; 2388 } 2389 if (error == ENETRESET && !IS_UP_AUTO(ic)) 2390 error = 0; 2391 return error; 2392} --- 97 unchanged lines hidden --- | 2397 default: 2398 error = EINVAL; 2399 break; 2400 } 2401 if (error == ENETRESET && !IS_UP_AUTO(ic)) 2402 error = 0; 2403 return error; 2404} --- 97 unchanged lines hidden --- |