Hi Reinette, > I think I can see how this could happen. From what I can tell there is > no checking if a scan is in progress when userspace triggers a new scan. There isn't anywhere in mac80211, but all scans are now triggered by cfg80211, which does the checking. > ieee80211_scan -> ieee80211_request_scan -> __ieee80211_start_scan > without local->hw_scanning or local->sw_scanning being checked. > > Considering this the above warning could happen in the following > scenario: > * userspace triggers scan, this sets local->hw_scanning and goes off > scanning > * userspace triggers another scan, even though local->hw_scanning is set > it continues anyway and calls the drivers scanning function, this > function returns error (which will cause ieee80211_scan_completed to be > called) or calls ieee80211_scan_completed immediately because it is > still busy with previous scan > * now original scan completes and it tries to call > ieee80211_scan_completed, but this triggers the warning because previous > call of ieee80211_scan_completed cleared local->hw_scanning Due to the check in cfg80211, I don't see how this could possibly happen. But there are IWL_DEBUG_MAC80211 calls, so it should be easy to figure it out if reproducible. Zdenek, are you taking the interface down at the same time maybe? I could see a race condition here where mac80211 assumes the scan must have finished when the interface goes down, and maybe iwlwifi does that too or something. Haven't looked at the code right now. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part