Before requesting a scan, check the time threshold

Authored by meven on Oct 17 2019, 10:52 AM.

Description

Before requesting a scan, check the time threshold

Summary:
Currently we don't follow the documented way to check requestScan results and if it has succeeded.
This ends up generating, retries and warning such as :

plasma-nm: Wireless scan on "wlp2s0" failed: "Scanning not allowed immediately following previous scan"

This patch checks if the device has not finished a scan within the last 10 seconds and that the last scan finished before allowing more scans to be requested.

RequestScan Doc :
https://developer.gnome.org/NetworkManager/stable/gdbus-org.freedesktop.NetworkManager.Device.Wireless.html#gdbus-method-org-freedesktop-NetworkManager-Device-Wireless.RequestScan
10 seconds request scan threshold in NetworkManager :
https://github.com/NetworkManager/NetworkManager/blob/master/src/devices/wifi/nm-device-wifi.c#L1204

Depends on D23576

Reviewers: Plasma, jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D23578

Details

Committed
mevenOct 17 2019, 10:53 AM
Reviewer
jgrulich
Differential Revision
D23578: Before requesting a scan, check the time threshold
Parents
R116:a495e38eee01: Drop Configure from KCM title
Branches
Unknown
Tags
Unknown