bbf:wifi Security mode enable value show none

This commit is contained in:
nevadita.chatterjee 2021-11-24 07:32:13 +05:30 committed by Amin Ben Ramdhane
parent 80103f73ed
commit 947ecd0bea

View file

@ -141,11 +141,17 @@ static int get_supported_modes(const char *ubus_method, const char *ifname, char
static char *get_security_mode(struct uci_section *section)
{
char *encryption = NULL;
char *ptrch = NULL;
dmuci_get_value_by_section_string(section, "encryption", &encryption);
if (!encryption || *encryption == '\0')
return "None";
/*Here the encryption type and the cipher are seperated*/
ptrch = strchr(encryption, '+');
if (ptrch)
*ptrch = '\0';
if (strstr(encryption, "wep")) {
char *key_index = NULL, *key = NULL;