So, the scan portion works a couple ways.
Firstly, the interface moves to mode IEEE80211_S_SCAN . That's when
it's looking for networks to connect to.
Secondly, it marks a FEXT or a normal flag SCAN, which says "i'm doing
scanning as well as normal receive." Think of this for example like
doing a background scan whilst doing traffic.
The routines in ieee80211_scan.c and ieee80211_scan_sw.c and
ieee80211_scan_sta.c take care of starting the scan, changing channels
if needed, etc.
There are two paths here.
ieee80211_scan_sw.c implements the net80211 controlled scanner. This
schedules channel changes, background scanning, etc. Most drivers do
Drivers that implement scanning in the driver/firmware instead tie
into the scan routines and will start their own scans. rsu, iwm, iwn
do this - they send a scan command to the firmware. It doesn't require
normal traffic to be stopped; the firmware takes care of scheduling
when to do scanning and when to do data!
Then there's two paths into populating the scan cache.
One - the device (eg almost everything) just pass up received beacons
in scan mode. ieee80211_input_sta() will filter out the relevant
beacon frames. Look at sta_recv_mgmt(), SUBTYPE_BEACON, it'll
eventually end up at ieee80211_add_scan() .
Two - intelligent devices can populate the scan cache directly. I
think if_ndis does this (via a call to ieee80211_add_scan()).
Everything else so far returns beacon frames as RX frames when
So, that's why I said "do monitor mode first." Ideally you'd like to
get monitor mode RX working first. Once you get beacons showing up in
an 802.11 tcpdump you know you're ready for doing STA mode (and
On 13 November 2017 at 08:40, Farhan Khan <kha...@gmail.com> wrote:
> Hi all,
> I am trying to get the "ifconfig wlan0 list scan" command to display local
> access points. I am fairly certain I have the "up" part working (loading
> firmware, turning it on) but the scan portion does not yet.
> I am trying to identify what functions I might have missed with dtrace, but
> I do not know where to start off and the probes are too rapid to identify
> where it starts when I run the "ifconfig" command. I am fairly certain it
> originates in ieee80211 and kicks that off to the driver, but I cannot
> easily identify where.
> Does anyone know where? Thank you.
> email@example.com mailing list
> To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"