mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
auto-t: iwd.py: scan only on needed frequencies
get_ordered_network() now scans automatically and has been updated to use the StationDebug.Scan() API rather than doing a full dbus scan (unless full_scan = True). The frequencies to be scanned are picked automatically based on the current hostapd status (hidden behind ctx.hostapd.get_frequency()).
This commit is contained in:
parent
57933425ca
commit
7a74a825a4
@ -414,7 +414,7 @@ class Device(IWDDBusAbstract):
|
||||
|
||||
self._wait_for_async_op()
|
||||
|
||||
def get_ordered_networks(self, scan_if_needed = True):
|
||||
def get_ordered_networks(self, scan_if_needed = True, full_scan = False):
|
||||
'''Return the list of networks found in the most recent
|
||||
scan, sorted by their user interface importance
|
||||
score as calculated by iwd. If the device is
|
||||
@ -440,7 +440,10 @@ class Device(IWDDBusAbstract):
|
||||
IWD._wait_for_object_condition(self, condition)
|
||||
|
||||
try:
|
||||
self.scan()
|
||||
if full_scan:
|
||||
self.scan()
|
||||
else:
|
||||
self.debug_scan(ctx.get_frequencies())
|
||||
except InProgressEx:
|
||||
pass
|
||||
|
||||
@ -458,7 +461,7 @@ class Device(IWDDBusAbstract):
|
||||
|
||||
return None
|
||||
|
||||
def get_ordered_network(self, network, scan_if_needed = True):
|
||||
def get_ordered_network(self, network, scan_if_needed = True, full_scan = False):
|
||||
'''Returns a single network from ordered network call, or None if the
|
||||
network wasn't found. If the network is not found an exception is
|
||||
raised, this removes the need to extra asserts in autotests.
|
||||
|
Loading…
Reference in New Issue
Block a user