From 6476e4aec08e305418f61968269407d1eb65af00 Mon Sep 17 00:00:00 2001 From: shivamcandela Date: Mon, 24 May 2021 01:04:44 +0530 Subject: [PATCH] selecting multiple security modes in station profile Signed-off-by: shivamcandela --- py-json/station_profile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py-json/station_profile.py b/py-json/station_profile.py index 48fa1103..12edea66 100644 --- a/py-json/station_profile.py +++ b/py-json/station_profile.py @@ -191,9 +191,13 @@ class StationProfile: # unset any other security flag before setting our present flags if security_type == "wpa3": self.set_command_param("add_sta", "ieee80211w", 2) - # self.add_sta_data["key"] = passwd + def add_security_extra(self, security): + types = {"wep": "wep_enable", "wpa": "wpa_enable", "wpa2": "wpa2_enable", "wpa3": "use-wpa3", "open": "[BLANK]"} + self.desired_add_sta_flags.append(types[security]) + self.desired_add_sta_flags_mask.append(types[security]) + def set_command_param(self, command_name, param_name, param_value): # we have to check what the param name is if (command_name is None) or (command_name == ""):