Deleted Added
full compact
ieee80211_ioctl.c (186302) ieee80211_ioctl.c (186904)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
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:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright

--- 8 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>
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:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright

--- 8 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 186302 2008-12-18 23:00:09Z sam $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 186904 2009-01-08 17:12:47Z 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"

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

57#include <netipx/ipx.h>
58#include <netipx/ipx_if.h>
59#endif
60
61#include <net80211/ieee80211_var.h>
62#include <net80211/ieee80211_ioctl.h>
63#include <net80211/ieee80211_regdomain.h>
64#include <net80211/ieee80211_input.h>
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"

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

57#include <netipx/ipx.h>
58#include <netipx/ipx_if.h>
59#endif
60
61#include <net80211/ieee80211_var.h>
62#include <net80211/ieee80211_ioctl.h>
63#include <net80211/ieee80211_regdomain.h>
64#include <net80211/ieee80211_input.h>
65#ifdef IEEE80211_SUPPORT_TDMA
66#include <net80211/ieee80211_tdma.h>
67#endif
65
66#define IS_UP_AUTO(_vap) \
67 (IFNET_IS_UP_RUNNING(vap->iv_ifp) && \
68 (_vap)->iv_roaming == IEEE80211_ROAMING_AUTO)
69
70static const uint8_t zerobssid[IEEE80211_ADDR_LEN];
71static struct ieee80211_channel *findchannel(struct ieee80211com *,
72 int ieee, int mode);

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

1084 if (vap->iv_opmode == IEEE80211_M_STA &&
1085 vap->iv_state == IEEE80211_S_RUN)
1086 ireq->i_val =
1087 (vap->iv_bss->ni_flags & IEEE80211_NODE_RIFS) != 0;
1088 else
1089 ireq->i_val =
1090 (vap->iv_flags_ext & IEEE80211_FEXT_RIFS) != 0;
1091 break;
68
69#define IS_UP_AUTO(_vap) \
70 (IFNET_IS_UP_RUNNING(vap->iv_ifp) && \
71 (_vap)->iv_roaming == IEEE80211_ROAMING_AUTO)
72
73static const uint8_t zerobssid[IEEE80211_ADDR_LEN];
74static struct ieee80211_channel *findchannel(struct ieee80211com *,
75 int ieee, int mode);

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

1087 if (vap->iv_opmode == IEEE80211_M_STA &&
1088 vap->iv_state == IEEE80211_S_RUN)
1089 ireq->i_val =
1090 (vap->iv_bss->ni_flags & IEEE80211_NODE_RIFS) != 0;
1091 else
1092 ireq->i_val =
1093 (vap->iv_flags_ext & IEEE80211_FEXT_RIFS) != 0;
1094 break;
1095#ifdef IEEE80211_SUPPORT_TDMA
1096 case IEEE80211_IOC_TDMA_SLOT:
1097 case IEEE80211_IOC_TDMA_SLOTCNT:
1098 case IEEE80211_IOC_TDMA_SLOTLEN:
1099 case IEEE80211_IOC_TDMA_BINTERVAL:
1100 error = ieee80211_tdma_ioctl_get80211(vap, ireq);
1101 break;
1102#endif
1092 default:
1093 error = EINVAL;
1094 break;
1095 }
1096 return error;
1097#undef MS
1098}
1099

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

3100 return EOPNOTSUPP;
3101 vap->iv_flags_ext |= IEEE80211_FEXT_RIFS;
3102 } else
3103 vap->iv_flags_ext &= ~IEEE80211_FEXT_RIFS;
3104 /* NB: if not operating in 11n this can wait */
3105 if (isvapht(vap))
3106 error = ERESTART;
3107 break;
1103 default:
1104 error = EINVAL;
1105 break;
1106 }
1107 return error;
1108#undef MS
1109}
1110

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

3111 return EOPNOTSUPP;
3112 vap->iv_flags_ext |= IEEE80211_FEXT_RIFS;
3113 } else
3114 vap->iv_flags_ext &= ~IEEE80211_FEXT_RIFS;
3115 /* NB: if not operating in 11n this can wait */
3116 if (isvapht(vap))
3117 error = ERESTART;
3118 break;
3119#ifdef IEEE80211_SUPPORT_TDMA
3120 case IEEE80211_IOC_TDMA_SLOT:
3121 case IEEE80211_IOC_TDMA_SLOTCNT:
3122 case IEEE80211_IOC_TDMA_SLOTLEN:
3123 case IEEE80211_IOC_TDMA_BINTERVAL:
3124 error = ieee80211_tdma_ioctl_set80211(vap, ireq);
3125 break;
3126#endif
3108 default:
3109 error = EINVAL;
3110 break;
3111 }
3112 /*
3113 * The convention is that ENETRESET means an operation
3114 * requires a complete re-initialization of the device (e.g.
3115 * changing something that affects the association state).

--- 191 unchanged lines hidden ---
3127 default:
3128 error = EINVAL;
3129 break;
3130 }
3131 /*
3132 * The convention is that ENETRESET means an operation
3133 * requires a complete re-initialization of the device (e.g.
3134 * changing something that affects the association state).

--- 191 unchanged lines hidden ---