mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-25 16:42:37 +01:00
test-runner: allow wpa_supplicant to be used in --hw mode
This lets test-runner's physical adapter pass-through to be used with wpa_supplicant.
This commit is contained in:
parent
4b1ce76549
commit
39ba0a9ebd
@ -927,12 +927,32 @@ class TestContext(Namespace):
|
||||
return frequencies
|
||||
|
||||
def start_wpas_interfaces(self):
|
||||
|
||||
if 'WPA_SUPPLICANT' not in self.hw_config:
|
||||
return
|
||||
|
||||
settings = self.hw_config['WPA_SUPPLICANT']
|
||||
wpas_radios = [rad for rad in self.radios if rad.name in settings]
|
||||
self.wpas_interfaces = [rad.create_interface(settings[rad.name], 'wpas') for rad in wpas_radios]
|
||||
|
||||
if self.args.hw:
|
||||
nradios = len(settings.items())
|
||||
|
||||
wpas_radios = self.radios[:nradios]
|
||||
self.wpas_interfaces = []
|
||||
|
||||
#
|
||||
# Physical radios most likely will use a different name
|
||||
# than 'rad#' but the config file is referenced by these
|
||||
# 'rad#' names. Iterate through both the settings and
|
||||
# physical radios to create interfaces associated with
|
||||
# each config file.
|
||||
#
|
||||
for vrad, hwrad in zip(settings.items(), wpas_radios):
|
||||
self.wpas_interfaces.append(hwrad.create_interface(vrad[1], 'wpas'))
|
||||
|
||||
else:
|
||||
wpas_radios = [rad for rad in self.radios if rad.name in settings]
|
||||
self.wpas_interfaces = [rad.create_interface('wpa_supplicant.conf', 'wpas') \
|
||||
for rad in wpas_radios]
|
||||
|
||||
def start_ofono(self):
|
||||
sim_keys = self.hw_config['SETUP'].get('sim_keys', None)
|
||||
|
Loading…
Reference in New Issue
Block a user