commit 20faa37467e8cf688a1286c6528af39bb78df138
parent 1462d68eb6a4ec9ff95c785ead08a492f395e80b
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Sat, 20 Apr 2019 22:28:59 +0200
test-runner: Futher fix for the SETUP group support
Drop a pointless asignment of has_hw_conf to false when it's already
false, fix index when accessing radio_conf_list. Apparently the SETUP
group is not used in any of our test and wasn't tested itself so could
as well have removed the code.
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/test-runner.c b/tools/test-runner.c
@@ -1014,7 +1014,7 @@ static bool configure_hw_radios(struct l_settings *hw_settings,
struct l_queue *wiphy_list)
{
char **radio_conf_list;
- int i, num_radios_requested, num_radios_created;
+ int num_radios_requested, num_radios_created;
bool status = false;
bool has_hw_conf;
@@ -1041,6 +1041,8 @@ static bool configure_hw_radios(struct l_settings *hw_settings,
}
if (has_hw_conf) {
+ int i;
+
for (i = 0; radio_conf_list[i]; i++) {
size_t len = strlen(radio_conf_list[i]);
@@ -1072,7 +1074,6 @@ static bool configure_hw_radios(struct l_settings *hw_settings,
}
num_radios_created = 0;
- i = 0;
while (num_radios_requested > num_radios_created) {
struct wiphy *wiphy;
@@ -1088,13 +1089,11 @@ static bool configure_hw_radios(struct l_settings *hw_settings,
p2p_device = true;
use_chanctx = true;
- has_hw_conf = false;
-
sprintf(wiphy->name, "rad%d", num_radios_created);
goto configure;
}
- strcpy(wiphy->name, radio_conf_list[i]);
+ strcpy(wiphy->name, radio_conf_list[num_radios_created]);
if (!l_settings_get_uint(hw_settings, wiphy->name,
HW_CONFIG_PHY_CHANNELS, &channels))