Handling the scanning is complicated.
- we want to have periodic scans. But only at certain times, and with an increasing back off timeout.
- the user can initiate explicit scans via D-Bus. Thereby a list of SSIDs scan be provided.
- if there are any hidden Wi-Fi profiles configured, we want to explicitly scan for their SSIDs.
- explicit scans are not possible at any time. But we should not reject the scan request, but instead remember to scan later, when possible.
This is a heavy rework. It also aims to fix issues of scanning since the recent rework of supplicant handling in commit b83f07916a54 ('supplicant: large rework of wpa_supplicant handling') that can render Wi-Fi scanning broken.
Fixes: b83f07916a54 ('supplicant: large rework of wpa_supplicant handling'):
e07fc217e wifi: rework scanning of Wi-Fi device
src/devices/wifi/nm-device-wifi.c | 864 ++++++++++++++++++++++++--------------
1 file changed, 542 insertions(+), 322 deletions(-)