Merge "QSAP: Enhance 'set' commmand to configure for OWE"

This commit is contained in:
Linux Build Service Account
2019-01-02 18:28:14 -08:00
committed by Gerrit - the friendly Code Review server
2 changed files with 14 additions and 2 deletions

View File

@@ -90,7 +90,8 @@ s8 *Cmd_req[eCMD_REQ_LAST] = {
*/
s8 *Conf_req[CONF_REQ_LAST] = {
"dual2g",
"dual5g"
"dual5g",
"owe"
};
/*
@@ -2599,6 +2600,9 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen)
} else if (!(strncmp(pcmd, Conf_req[CONF_5g], strlen(Conf_req[CONF_5g])))) {
pcmd += strlen(Conf_req[CONF_5g]);
SKIP_BLANK_SPACE(pcmd);
} else if (!(strncmp(pcmd, Conf_req[CONF_owe], strlen(Conf_req[CONF_owe])))) {
pcmd += strlen(Conf_req[CONF_owe]);
SKIP_BLANK_SPACE(pcmd);
} else {
// DO NOTHING
}
@@ -3173,6 +3177,8 @@ void qsap_hostd_exec_cmd(s8 *pcmd, s8 *presp, u32 *plen)
pconffile = CONFIG_FILE_2G;
} else if (!(strncmp(pcmd+4, Conf_req[CONF_5g], strlen(Conf_req[CONF_5g])))) {
pconffile = CONFIG_FILE_5G;
} else if (!(strncmp(pcmd+4, Conf_req[CONF_owe], strlen(Conf_req[CONF_owe])))) {
pconffile = CONFIG_FILE_OWE;
} else {
pconffile = CONFIG_FILE;
}
@@ -3232,7 +3238,9 @@ int qsapsetSoftap(int argc, char *argv[])
}
// check if 2nd arg is dual2g/dual5g
if (argc > 2 && (strncmp(argv[2], Conf_req[CONF_2g], 4) == 0)) {
if (argc > 2
&& (strncmp(argv[2], Conf_req[CONF_2g], 4) == 0
|| strncmp(argv[2], Conf_req[CONF_owe], 3) == 0)) {
snprintf(setCmd, SET_BUF_LEN, "set %s", argv[2]);
offset = 1;
argc--;

View File

@@ -92,6 +92,9 @@ enum error_val {
#define CONFIG_FILE_2G "/data/vendor/wifi/hostapd/hostapd_dual2g.conf"
#define CONFIG_FILE_5G "/data/vendor/wifi/hostapd/hostapd_dual5g.conf"
/** Configuration file name for OWE-transition */
#define CONFIG_FILE_OWE "/data/vendor/wifi/hostapd/hostapd_owe.conf"
/** Configuration file name */
#define CONFIG_FILE "/data/vendor/wifi/hostapd/hostapd.conf"
@@ -252,6 +255,7 @@ enum eCmd_req {
enum eConf_req {
CONF_2g = 0,
CONF_5g = 1,
CONF_owe = 2,
CONF_REQ_LAST
};