67a26c98f2
The scan task refactoring stuff circa 2014-2016 broke the blocking task into a taskqueue with some async bits, but it apparently broke scans being interrupted by traffic. Notably - the new "field" SCAN_PAUSE sets both SCAN_INTERRUPT and SCAN_CANCEL, and a bunch of existing code was checking for SCAN_CANCEL only and breaking the scan. Unfortunately it was then (a) cancelling the scan entirely and (b) not notifying userland that scan was done. So: * Update the calls to scan_end() to only pass in 1 (saying the scan is complete) if SCAN_CANCEL is set WITHOUT SCAN_INTERRUPT. If both are set then yes, the scan is interrupted, but it isn't canceled - it's just paused. * Update the "did the scan flags change whilst the driver was called" logic to check for canceled scans, not interrupted scans. * The "scan done" logic now explicitly checks for either interrupted or completed scans. This accounts for the situation where a scan is being aborted via traffic but it ALSO happens to have finished (ie the last channel was checked.) This doesn't ENTIRELY fix scanning as the resume function is broken due to incorrect ticks math. Thus, the second half of this patch changes the ieee80211_ticks_*() macros to use int instead of long, matching the logic that the TCP code does with ticks and handles wrapping / negative ticks values. If cast to long then the wrapping math wouldn't work right (ie, if ticks was actually negative, ie, after the system has been up for a while.) This allows contbgscan() to correctly calculate if a scan should continue based on ticks and ic->ic_lastdata . Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D25031 |
||
---|---|---|
.. | ||
_ieee80211.h | ||
ieee80211_acl.c | ||
ieee80211_action.c | ||
ieee80211_action.h | ||
ieee80211_adhoc.c | ||
ieee80211_adhoc.h | ||
ieee80211_ageq.c | ||
ieee80211_ageq.h | ||
ieee80211_alq.c | ||
ieee80211_alq.h | ||
ieee80211_amrr.c | ||
ieee80211_amrr.h | ||
ieee80211_crypto_ccmp.c | ||
ieee80211_crypto_none.c | ||
ieee80211_crypto_tkip.c | ||
ieee80211_crypto_wep.c | ||
ieee80211_crypto.c | ||
ieee80211_crypto.h | ||
ieee80211_ddb.c | ||
ieee80211_dfs.c | ||
ieee80211_dfs.h | ||
ieee80211_freebsd.c | ||
ieee80211_freebsd.h | ||
ieee80211_hostap.c | ||
ieee80211_hostap.h | ||
ieee80211_ht.c | ||
ieee80211_ht.h | ||
ieee80211_hwmp.c | ||
ieee80211_input.c | ||
ieee80211_input.h | ||
ieee80211_ioctl.c | ||
ieee80211_ioctl.h | ||
ieee80211_mesh.c | ||
ieee80211_mesh.h | ||
ieee80211_monitor.c | ||
ieee80211_monitor.h | ||
ieee80211_node.c | ||
ieee80211_node.h | ||
ieee80211_output.c | ||
ieee80211_phy.c | ||
ieee80211_phy.h | ||
ieee80211_power.c | ||
ieee80211_power.h | ||
ieee80211_proto.c | ||
ieee80211_proto.h | ||
ieee80211_radiotap.c | ||
ieee80211_radiotap.h | ||
ieee80211_ratectl_none.c | ||
ieee80211_ratectl.c | ||
ieee80211_ratectl.h | ||
ieee80211_regdomain.c | ||
ieee80211_regdomain.h | ||
ieee80211_rssadapt.c | ||
ieee80211_rssadapt.h | ||
ieee80211_scan_sta.c | ||
ieee80211_scan_sw.c | ||
ieee80211_scan_sw.h | ||
ieee80211_scan.c | ||
ieee80211_scan.h | ||
ieee80211_sta.c | ||
ieee80211_sta.h | ||
ieee80211_superg.c | ||
ieee80211_superg.h | ||
ieee80211_tdma.c | ||
ieee80211_tdma.h | ||
ieee80211_var.h | ||
ieee80211_vht.c | ||
ieee80211_vht.h | ||
ieee80211_wds.c | ||
ieee80211_wds.h | ||
ieee80211_wps.h | ||
ieee80211_xauth.c | ||
ieee80211.c | ||
ieee80211.h |