Some thoughts about background scanning
Hey,
just thought a bit about background scanning (not triggering scans at
any time but just hopping back to the operating channel once in a while
to allow RX/TX).
My current approach is quite easy but works well: Extend the scan state
machine with a new state (OPERATION) which restores the channel and the
correct filter flags and notifies the AP that we're back. The state
machine moves there after every scanned channel. The result is that
the complete scan can take quite some time, something a round 15 seconds.
Scanning multiple channels before switching back would allow us to
reduce the amount of time the scan takes. So, what I'd like to have is
integration with pm_qos in order to determine how much channels may be
scanned at once before we have to switch back. Shouldn't be that
difficult ;) However, the current scan state machine is very inflexible
and I'd have to add a lot of ugly stuff to make it work really good (at
least that's my impression currently).
So, a completely new approach would be to pre-compute all necessary scan
states. Based on the cfg80211 scan request, the current pm_qos values
and the beacon characteristics we could derive a table of necessary scan
states and extend it by operation states.
For example:
Channel 1, Active Scan, 30ms
Channel 2, Active Scan, 30ms
Channel 3, Active Scan, 30ms
Channel 4, Active Scan, 30ms
Channel 11, Operation Mode, 120ms
(Continue reading)