QSAP: Enhance 'set' commmand to configure for OWE
This creates a new hostapd_owe.conf if use below 'set' CMD: "softap qccmd set owe <args>" CRs-Fixed: 2356574 Change-Id: I1ef4f11f7bdb3155dcfbc2c75fa106c8a3ecc61a
This commit is contained in:
parent
b44cdad94e
commit
d855500014
2 changed files with 14 additions and 2 deletions
|
@ -90,7 +90,8 @@ s8 *Cmd_req[eCMD_REQ_LAST] = {
|
|||
*/
|
||||
s8 *Conf_req[CONF_REQ_LAST] = {
|
||||
"dual2g",
|
||||
"dual5g"
|
||||
"dual5g",
|
||||
"owe"
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -2598,6 +2599,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
|
||||
}
|
||||
|
@ -3172,6 +3176,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;
|
||||
}
|
||||
|
@ -3231,7 +3237,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--;
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue