Deleted Added
full compact
ieee80211_proto.c (186302) ieee80211_proto.c (188533)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2008 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-2008 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_proto.c 186302 2008-12-18 23:00:09Z sam $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_proto.c 188533 2009-02-12 18:57:18Z thompsa $");
29
30/*
31 * IEEE 802.11 protocol support.
32 */
33
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

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

1067parent_updown(void *arg, int npending)
1068{
1069 struct ifnet *parent = arg;
1070
1071 parent->if_ioctl(parent, SIOCSIFFLAGS, NULL);
1072}
1073
1074/*
29
30/*
31 * IEEE 802.11 protocol support.
32 */
33
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

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

1067parent_updown(void *arg, int npending)
1068{
1069 struct ifnet *parent = arg;
1070
1071 parent->if_ioctl(parent, SIOCSIFFLAGS, NULL);
1072}
1073
1074/*
1075 * Block until the parent is in a known state. This is
1076 * used after any operations that dispatch a task (e.g.
1077 * to auto-configure the parent device up/down).
1078 */
1079void
1080ieee80211_waitfor_parent(struct ieee80211com *ic)
1081{
1082 taskqueue_drain(taskqueue_thread, &ic->ic_parent_task);
1083}
1084
1085/*
1075 * Start a vap running. If this is the first vap to be
1076 * set running on the underlying device then we
1077 * automatically bring the device up.
1078 */
1079void
1080ieee80211_start_locked(struct ieee80211vap *vap)
1081{
1082 struct ifnet *ifp = vap->iv_ifp;

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

1253
1254 IEEE80211_LOCK(ic);
1255 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
1256 struct ifnet *ifp = vap->iv_ifp;
1257 if (IFNET_IS_UP_RUNNING(ifp)) /* NB: avoid recursion */
1258 ieee80211_stop_locked(vap);
1259 }
1260 IEEE80211_UNLOCK(ic);
1086 * Start a vap running. If this is the first vap to be
1087 * set running on the underlying device then we
1088 * automatically bring the device up.
1089 */
1090void
1091ieee80211_start_locked(struct ieee80211vap *vap)
1092{
1093 struct ifnet *ifp = vap->iv_ifp;

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

1264
1265 IEEE80211_LOCK(ic);
1266 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
1267 struct ifnet *ifp = vap->iv_ifp;
1268 if (IFNET_IS_UP_RUNNING(ifp)) /* NB: avoid recursion */
1269 ieee80211_stop_locked(vap);
1270 }
1271 IEEE80211_UNLOCK(ic);
1272
1273 ieee80211_waitfor_parent(ic);
1261}
1262
1263/*
1264 * Stop all vap's running on a device and arrange
1265 * for those that were running to be resumed.
1266 */
1267void
1268ieee80211_suspend_all(struct ieee80211com *ic)

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

1273 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
1274 struct ifnet *ifp = vap->iv_ifp;
1275 if (IFNET_IS_UP_RUNNING(ifp)) { /* NB: avoid recursion */
1276 vap->iv_flags_ext |= IEEE80211_FEXT_RESUME;
1277 ieee80211_stop_locked(vap);
1278 }
1279 }
1280 IEEE80211_UNLOCK(ic);
1274}
1275
1276/*
1277 * Stop all vap's running on a device and arrange
1278 * for those that were running to be resumed.
1279 */
1280void
1281ieee80211_suspend_all(struct ieee80211com *ic)

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

1286 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
1287 struct ifnet *ifp = vap->iv_ifp;
1288 if (IFNET_IS_UP_RUNNING(ifp)) { /* NB: avoid recursion */
1289 vap->iv_flags_ext |= IEEE80211_FEXT_RESUME;
1290 ieee80211_stop_locked(vap);
1291 }
1292 }
1293 IEEE80211_UNLOCK(ic);
1294
1295 ieee80211_waitfor_parent(ic);
1281}
1282
1283/*
1284 * Start all vap's marked for resume.
1285 */
1286void
1287ieee80211_resume_all(struct ieee80211com *ic)
1288{

--- 465 unchanged lines hidden ---
1296}
1297
1298/*
1299 * Start all vap's marked for resume.
1300 */
1301void
1302ieee80211_resume_all(struct ieee80211com *ic)
1303{

--- 465 unchanged lines hidden ---