Page MenuHomeFreeBSD

net80211: do not cancel scan when packet is sent
ClosedPublic

Authored by avos on Sep 20 2016, 2:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 30 2024, 10:39 AM
Unknown Object (File)
Dec 23 2023, 11:37 AM
Unknown Object (File)
Aug 29 2023, 3:57 AM
Unknown Object (File)
Aug 25 2023, 7:33 AM
Unknown Object (File)
Aug 5 2023, 12:20 AM
Unknown Object (File)
Aug 5 2023, 12:18 AM
Unknown Object (File)
Aug 5 2023, 12:18 AM
Unknown Object (File)
Aug 4 2023, 11:54 PM
Subscribers

Details

Summary

Restore pre-r300383 behavior when a frame is sent:

  • stop scan;
  • send frame;
  • when beacon arrives and our bit in TIM is not set - restart the scan.

NOTE 1:
Ideally, this should introduce new interface (ieee80211_pause_anyscan()); however, since
ieee80211_cancel_anyscan() is not used by drivers and only called by ieee80211_start_pkt()
the current patch overrides it's behavior instead.

NOTE 2:
In case, if AP will forget to reset TIM (see r295932 as an example), the scan will hang forever.

Test Plan

Tested with Intel 3945BG, STA mode, w/ data transmission:

  • without patch: scan results may be truncated;
  • with patch:
    • TIM is clear: net80211 will wait, until data will be transmitted (not nice when mplayer(1) is running);
    • our bit in TIM is set: 'ifconfig wlan0 scan' hangs (interruptible).

Diff Detail

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

Event Timeline

avos retitled this revision from to net80211: do not cancel scan when packet is sent.
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.

Hm, don't we have a general scan timeout that should prevent a scan from hanging forever?

Hm, don't we have a general scan timeout that should prevent a scan from hanging forever?

Well,

  1. (answers your question) no, there is no 'global' scan watchdog (only few local watchodgs in wpi(4)/iwn(4)/iwm(4); however, we don't need them for software-driven scan, because it cannot hang).
  2. (mine statement) 'hang' means:
    • scan request is sent; ifconfig waits for 'scan complete event';
    • outgoing traffic cancels scan; it stops (but preserves IEEE80211_FEXT_BGSCAN flag); no event is sent (with this patch; currently the event is sent anyway, but scan results may be incomplete);
    • traffic was sent; ic_lastdata settles;
  3. sta_recv_mgmt() checks via contbgscan() if the scan may be restarted; if everything is okay, new scan starts;
  4. scan ends; 'scan complete' event is sent (and ifconfig displays scan results).
adrian edited edge metadata.
This revision is now accepted and ready to land.Sep 23 2016, 5:13 AM
This revision was automatically updated to reflect the committed changes.