Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_scan_sta.c
Context not available. | |||||
IEEE80211_SCANNER_ALG(ibss, IEEE80211_M_IBSS, adhoc_default); | IEEE80211_SCANNER_ALG(ibss, IEEE80211_M_IBSS, adhoc_default); | ||||
IEEE80211_SCANNER_ALG(ahdemo, IEEE80211_M_AHDEMO, adhoc_default); | IEEE80211_SCANNER_ALG(ahdemo, IEEE80211_M_AHDEMO, adhoc_default); | ||||
static void | |||||
ap_force_promisc(struct ieee80211com *ic) | |||||
{ | |||||
struct ifnet *ifp = ic->ic_ifp; | |||||
IEEE80211_LOCK(ic); | |||||
/* set interface into promiscuous mode */ | |||||
ifp->if_flags |= IFF_PROMISC; | |||||
ieee80211_runtask(ic, &ic->ic_promisc_task); | |||||
IEEE80211_UNLOCK(ic); | |||||
} | |||||
static void | |||||
ap_reset_promisc(struct ieee80211com *ic) | |||||
{ | |||||
IEEE80211_LOCK(ic); | |||||
ieee80211_syncifflag_locked(ic, IFF_PROMISC); | |||||
IEEE80211_UNLOCK(ic); | |||||
} | |||||
static int | static int | ||||
ap_start(struct ieee80211_scan_state *ss, struct ieee80211vap *vap) | ap_start(struct ieee80211_scan_state *ss, struct ieee80211vap *vap) | ||||
{ | { | ||||
Context not available. | |||||
st->st_scangen++; | st->st_scangen++; | ||||
st->st_newscan = 1; | st->st_newscan = 1; | ||||
ap_force_promisc(vap->iv_ic); | ieee80211_promisc(vap, true); | ||||
return 0; | return 0; | ||||
} | } | ||||
Context not available. | |||||
static int | static int | ||||
ap_cancel(struct ieee80211_scan_state *ss, struct ieee80211vap *vap) | ap_cancel(struct ieee80211_scan_state *ss, struct ieee80211vap *vap) | ||||
{ | { | ||||
ap_reset_promisc(vap->iv_ic); | ieee80211_promisc(vap, false); | ||||
return 0; | return 0; | ||||
} | } | ||||
Context not available. | |||||
return 0; | return 0; | ||||
} | } | ||||
} | } | ||||
ap_reset_promisc(ic); | ieee80211_promisc(vap, false); | ||||
if (ss->ss_flags & (IEEE80211_SCAN_NOPICK | IEEE80211_SCAN_NOJOIN)) { | if (ss->ss_flags & (IEEE80211_SCAN_NOPICK | IEEE80211_SCAN_NOJOIN)) { | ||||
/* | /* | ||||
* Manual/background scan, don't select+join the | * Manual/background scan, don't select+join the | ||||
Context not available. |