wifi-scan icon indicating copy to clipboard operation
wifi-scan copied to clipboard

Handle NL80211_CMD_SCAN_ABORTED command

Open bmegli opened this issue 8 years ago • 2 comments

We should handle NL80211_CMD_SCAN_ABORTED command in notifications channel.

Otherwise we may have the following race condition:

  • we read up notifications
  • we trigger scan if necessary
  • we wait for completion
  • we collect results

It's possible that If the scan is aborted after triggering, before completion we may wait indefinitely for results. I am not sure, this needs investigation.

bmegli avatar Oct 13 '16 08:10 bmegli

Any hints on how to implement this? It is very useful.

nini-os avatar Jun 23 '20 12:06 nini-os

Probably in handle_NL80211_MULTICAST_GROUP_SCAN, the case for NL80211_CMD_SCAN_ABORTED.

This is called from two places:

  • in non blocking readout of any pending notifications
  • while waiting for scan results

Some logic could be added to either:

  • (re)schedule scan
  • or report error

I am not sure it is needed. Ideally a way to abort scan and check what happens would be handy.

bmegli avatar Jun 23 '20 17:06 bmegli