Page MenuHomeFreeBSD

network.subr: avoid unnecessary reinitialization
ClosedPublic

Authored by avos on Feb 29 2016, 5:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 5:55 PM
Unknown Object (File)
Sat, Nov 30, 5:53 PM
Unknown Object (File)
Nov 3 2024, 7:20 PM
Unknown Object (File)
Nov 3 2024, 7:20 PM
Unknown Object (File)
Nov 3 2024, 7:19 PM
Unknown Object (File)
Nov 3 2024, 7:08 PM
Unknown Object (File)
Oct 31 2024, 1:50 PM
Unknown Object (File)
Sep 29 2024, 11:25 PM
Subscribers

Details

Summary

Do not start interface when wpa_supplicant or hostapd is used; they will restart it anyway

Test Plan

Tested with:

  • Intel 3945BG, STA mode (wpa_supplicant)
  • RTL8188EU, HOSTAP mode (hostapd)

wpi(4) (wlandebug state):
wlan0: start running, 0 vaps running
wlan0: ieee80211_start_locked: up parent wpi0
wlan0: start running, 1 vaps running
wlan0: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan0: sta_newstate: INIT -> SCAN (0)
(---------------------- this part was optimized away ------------------)
wlan0: stop running, 1 vaps running
wlan0: ieee80211_new_state_locked: SCAN -> INIT (nrunning 0 nscanning 0)
wlan0: down parent wpi0
wlan0: ieee80211_newstate_cb: SCAN -> INIT arg -1
wlan0: sta_newstate: SCAN -> INIT (-1)
wlan0: start running, 0 vaps running
wlan0: ieee80211_start_locked: up parent wpi0
wlan0: start running, 1 vaps running
wlan0: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan0: sta_newstate: INIT -> SCAN (0)
(--------------------------------------------------------------------------)
wlan0: [00:1a:70:9e:9a:70] station assoc via MLME
wlan0: ieee80211_new_state_locked: SCAN -> AUTH (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> AUTH arg 192
wlan0: sta_newstate: SCAN -> AUTH (192)
wlan0: ieee80211_new_state_locked: AUTH -> ASSOC (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: AUTH -> ASSOC arg 0
wlan0: sta_newstate: AUTH -> ASSOC (0)
wlan0: ieee80211_new_state_locked: ASSOC -> RUN (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: ASSOC -> RUN arg 16
wlan0: sta_newstate: ASSOC -> RUN (16)

urtwn(4) (wlandebug state):
wlan3: start running, 0 vaps running
wlan3: ieee80211_start_locked: up parent urtwn1
wlan3: start running, 1 vaps running
wlan3: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan3: ieee80211_newstate_cb: INIT -> INIT arg 0
wlan3: hostap_newstate: INIT -> INIT (0)
wlan3: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan3: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan3: hostap_newstate: INIT -> SCAN (0)
(---------------------- this part was optimized away ------------------)
wlan3: stop running, 1 vaps running
wlan3: ieee80211_new_state_locked: SCAN -> INIT (nrunning 0 nscanning 0)
wlan3: down parent urtwn1
wlan3: ieee80211_newstate_cb: SCAN -> INIT arg -1
wlan3: hostap_newstate: SCAN -> INIT (-1)
wlan3: start running, 0 vaps running
wlan3: ieee80211_start_locked: up parent urtwn1
wlan3: start running, 1 vaps running
wlan3: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan3: ieee80211_newstate_cb: INIT -> INIT arg 0
wlan3: hostap_newstate: INIT -> INIT (0)
wlan3: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan3: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan3: hostap_newstate: INIT -> SCAN (0)
(--------------------------------------------------------------------------)
wlan3: ieee80211_init
wlan3: start running, 1 vaps running
wlan3: ieee80211_new_state_locked: SCAN -> SCAN (nrunning 0 nscanning 0)
wlan3: ieee80211_newstate_cb: SCAN -> INIT arg 0
wlan3: hostap_newstate: SCAN -> INIT (0)
wlan3: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
wlan3: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan3: hostap_newstate: INIT -> SCAN (0)
wlan3: ieee80211_new_state_locked: SCAN -> RUN (nrunning 0 nscanning 0)
wlan3: ieee80211_newstate_cb: SCAN -> RUN arg -1
wlan3: hostap_newstate: SCAN -> RUN (-1)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avos retitled this revision from to network.subr: avoid unnecessary reinitialization.
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added a reviewer: adrian.
avos set the repository for this revision to rS FreeBSD src repository - subversion.
avos edited the test plan for this revision. (Show Details)
adrian edited edge metadata.
This revision is now accepted and ready to land.Feb 29 2016, 7:02 AM
This revision was automatically updated to reflect the committed changes.