[Bugfix][API-438] fix get_sta_auth return wrong value
Change-Id: I371aa81ca13ebc7a1733fba748926541d71d1e27
(cherry picked from commit b98d1cf0a03f6ca16d31fca33f66f86e41149c76)
diff --git a/src/lynq/lib/liblynq-wifi6/libwifi6.c b/src/lynq/lib/liblynq-wifi6/libwifi6.c
index e98c229..37531c6 100755
--- a/src/lynq/lib/liblynq-wifi6/libwifi6.c
+++ b/src/lynq/lib/liblynq-wifi6/libwifi6.c
@@ -697,7 +697,8 @@
}
p = strstr(split_lines[i], FLAG_KEY_MGMT);
if (p != NULL) {
- curr_state->ap->auth = convert_auth_from_key_mgmt(p);
+ curr_state->ap->auth = convert_auth_from_key_mgmt(p + strlen(FLAG_KEY_MGMT));
+ printf("key_mgmt %d, -- %s\n", curr_state->ap->auth, p);
ret = 0;
continue;
}
@@ -719,7 +720,7 @@
} //end else if (state != NULL)
if ((p = strstr(split_lines[i], FLAG_ID)) == split_lines[i]) {
ret = 0;
- curr_state->net_no = atoi(p);
+ curr_state->net_no = atoi(p + strlen(FLAG_ID));
printf("net_no %d, -- %s\n", curr_state->net_no, p);
}
}