Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2018 18:15:27 -0400
From:      Farhan Khan <khanzf@gmail.com>
To:        freebsd-wireless@freebsd.org
Subject:   ifconfig scan returns no results - tracing rtwn(4)'s scanning execution flow
Message-ID:  <CAFd4kYCHGWdGqGBv3Kns2674c4SAzzYuQjJf3OEVD=i0cTFF8Q@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I'm having trouble tracing the scanning code. My extension to
rtl8188ee currently returns immediately after running 'ifconfig wlan0
scan' without any identified BSSes. I am not yet certain why and am
trying to figure out why. I suspect something is immediately failing
and immediately returning. However, my tracing the code makes it
appear circular and I am not certain where ieee80211(9) reaches into
the kernel to perform the scan.

My understanding of process flow:
* ieee80211_swscan_attach queues a task for scan_curchan_task.
* scan_curchan_task runs ic->ic_set_channel (733) and then immediately
scans the channel with ic->ic_scan_curchan (line 745) in
ieee80211_scan_sw.c.
* ic->ic_scan_curchan is a pointer to to rtwn_scan_curchan() in
if_rtwn.c (line 287).
* rtwn_scan_curchan() almost immediately runs sc->sc_scan_curchan(),
which is itself a pointer to ic->ic_scan_curchan.

That's circular. Where did I go wrong?

If rtwn(4)'s scanning is performed by the kernel, where does it reach
into the kernel? I am trying to figure out where the failure in the
lack of results from "ifconfig wlan0 scan" originates from.

(Oh, lest anyone asks, I have at least 3 WiFi APs immediatley by the
test laptop specifically for this test :)

Thank you,

--
Farhan Khan
PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFd4kYCHGWdGqGBv3Kns2674c4SAzzYuQjJf3OEVD=i0cTFF8Q>