Deleted Added
sdiff udiff text old ( 190384 ) new ( 190391 )
full compact
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 190391 2009-03-24 20:39:08Z 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"

--- 542 unchanged lines hidden (view full) ---

579static __noinline int
580ieee80211_ioctl_getmaccmd(struct ieee80211vap *vap, struct ieee80211req *ireq)
581{
582 const struct ieee80211_aclator *acl = vap->iv_acl;
583
584 return (acl == NULL ? EINVAL : acl->iac_getioctl(vap, ireq));
585}
586
587static __noinline int
588ieee80211_ioctl_getcurchan(struct ieee80211vap *vap, struct ieee80211req *ireq)
589{
590 struct ieee80211com *ic = vap->iv_ic;
591 struct ieee80211_channel *c;
592
593 if (ireq->i_len != sizeof(struct ieee80211_channel))
594 return EINVAL;

--- 359 unchanged lines hidden (view full) ---

954 break;
955 case IEEE80211_IOC_BEACON_INTERVAL:
956 /* NB: get from ic_bss for station mode */
957 ireq->i_val = vap->iv_bss->ni_intval;
958 break;
959 case IEEE80211_IOC_PUREG:
960 ireq->i_val = (vap->iv_flags & IEEE80211_F_PUREG) != 0;
961 break;
962 case IEEE80211_IOC_BGSCAN:
963 ireq->i_val = (vap->iv_flags & IEEE80211_F_BGSCAN) != 0;
964 break;
965 case IEEE80211_IOC_BGSCAN_IDLE:
966 ireq->i_val = vap->iv_bgscanidle*hz/1000; /* ms */
967 break;
968 case IEEE80211_IOC_BGSCAN_INTERVAL:
969 ireq->i_val = vap->iv_bgscanintvl/hz; /* seconds */

--- 1893 unchanged lines hidden (view full) ---

2863 if (ireq->i_val)
2864 vap->iv_flags |= IEEE80211_F_PUREG;
2865 else
2866 vap->iv_flags &= ~IEEE80211_F_PUREG;
2867 /* NB: reset only if we're operating on an 11g channel */
2868 if (isvap11g(vap))
2869 error = ENETRESET;
2870 break;
2871 case IEEE80211_IOC_BGSCAN:
2872 if (ireq->i_val) {
2873 if ((vap->iv_caps & IEEE80211_C_BGSCAN) == 0)
2874 return EOPNOTSUPP;
2875 vap->iv_flags |= IEEE80211_F_BGSCAN;
2876 } else
2877 vap->iv_flags &= ~IEEE80211_F_BGSCAN;
2878 break;

--- 454 unchanged lines hidden ---