summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authordamien <damien@FreeBSD.org>2005-08-20 14:28:37 +0000
committerdamien <damien@FreeBSD.org>2005-08-20 14:28:37 +0000
commitc615f26ea8e0b091b811fc10352d6418afadcec9 (patch)
treeba2c8430505bc8df06ed18e87fbe8126a782523a /sys/dev
parenta127131b7d694d2429feaa6cf71b535de8456fac (diff)
downloadFreeBSD-src-c615f26ea8e0b091b811fc10352d6418afadcec9.zip
FreeBSD-src-c615f26ea8e0b091b811fc10352d6418afadcec9.tar.gz
Don't automatically start scanning in if_init() if IEEE80211_ROAMING_MANUAL
flag is set. MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/iwi/if_iwi.c10
-rw-r--r--sys/dev/ral/if_ral.c10
-rw-r--r--sys/dev/usb/if_ural.c10
3 files changed, 18 insertions, 12 deletions
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index 256c17a..9afa0c4 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -1571,7 +1571,8 @@ iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (error == ENETRESET) {
if ((ifp->if_flags & IFF_UP) &&
- (ifp->if_drv_flags & IFF_DRV_RUNNING))
+ (ifp->if_drv_flags & IFF_DRV_RUNNING) &&
+ (ic->ic_roaming != IEEE80211_ROAMING_MANUAL))
iwi_init(sc);
error = 0;
}
@@ -2271,10 +2272,11 @@ iwi_init(void *priv)
goto fail;
}
- if (ic->ic_opmode == IEEE80211_M_MONITOR)
+ if (ic->ic_opmode != IEEE80211_M_MONITOR) {
+ if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)
+ ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
+ } else
ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
- else
- ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
ifp->if_drv_flags |= IFF_DRV_RUNNING;
diff --git a/sys/dev/ral/if_ral.c b/sys/dev/ral/if_ral.c
index 1b275e9..250a737 100644
--- a/sys/dev/ral/if_ral.c
+++ b/sys/dev/ral/if_ral.c
@@ -2193,7 +2193,8 @@ ral_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (error == ENETRESET) {
if ((ifp->if_flags & IFF_UP) &&
- (ifp->if_drv_flags & IFF_DRV_RUNNING))
+ (ifp->if_drv_flags & IFF_DRV_RUNNING) &&
+ (ic->ic_roaming != IEEE80211_ROAMING_MANUAL))
ral_init(sc);
error = 0;
}
@@ -2766,10 +2767,11 @@ ral_init(void *priv)
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
ifp->if_drv_flags |= IFF_DRV_RUNNING;
- if (ic->ic_opmode == IEEE80211_M_MONITOR)
+ if (ic->ic_opmode != IEEE80211_M_MONITOR) {
+ if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)
+ ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
+ } else
ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
- else
- ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
#undef N
}
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index 7deb1bc..eb2dd88 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1408,7 +1408,8 @@ ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (error == ENETRESET) {
if ((ifp->if_flags & IFF_UP) &&
- (ifp->if_drv_flags & IFF_DRV_RUNNING))
+ (ifp->if_drv_flags & IFF_DRV_RUNNING) &&
+ (ic->ic_roaming != IEEE80211_ROAMING_MANUAL))
ural_init(sc);
error = 0;
}
@@ -2038,10 +2039,11 @@ ural_init(void *priv)
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
ifp->if_drv_flags |= IFF_DRV_RUNNING;
- if (ic->ic_opmode == IEEE80211_M_MONITOR)
+ if (ic->ic_opmode != IEEE80211_M_MONITOR) {
+ if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)
+ ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
+ } else
ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
- else
- ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
return;
OpenPOWER on IntegriCloud