QSAP: add support for setting ieee80211ax in hostapd

80211ax is enabled by default. allow disabling 80211ax for wigig
softap.
Also add support for creating a seperate config file for
wigig, to avoid conflicts with wifi APs.

Change-Id: If04f7da1695715aea037a01da11728c7350ed68c
This commit is contained in:
Dedy Lansky
2019-11-10 13:58:58 +02:00
committed by Lior David
parent 59c014ff95
commit a2dd08f8d4
2 changed files with 15 additions and 3 deletions

View File

@@ -91,7 +91,8 @@ s8 *Cmd_req[eCMD_REQ_LAST] = {
s8 *Conf_req[CONF_REQ_LAST] = {
"dual2g",
"dual5g",
"owe"
"owe",
"60g",
};
/*
@@ -188,6 +189,7 @@ static struct Command cmd_list[eCMD_LAST] = {
{ "deny_mac_file", NULL },
{ "owe_transition_ifname", NULL },
{ "sae_require_mfp", NULL },
{ "ieee80211ax", NULL },
};
@@ -2609,6 +2611,9 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen)
} else if (!(strncmp(pcmd, Conf_req[CONF_owe], strlen(Conf_req[CONF_owe])))) {
pcmd += strlen(Conf_req[CONF_owe]);
SKIP_BLANK_SPACE(pcmd);
} else if (!(strncmp(pcmd, Conf_req[CONF_60g], strlen(Conf_req[CONF_60g])))) {
pcmd += strlen(Conf_req[CONF_60g]);
SKIP_BLANK_SPACE(pcmd);
} else {
// DO NOTHING
}
@@ -3185,6 +3190,8 @@ void qsap_hostd_exec_cmd(s8 *pcmd, s8 *presp, u32 *plen)
pconffile = CONFIG_FILE_5G;
} else if (!(strncmp(pcmd+4, Conf_req[CONF_owe], strlen(Conf_req[CONF_owe])))) {
pconffile = CONFIG_FILE_OWE;
} else if (!(strncmp(pcmd+4, Conf_req[CONF_60g], strlen(Conf_req[CONF_60g])))) {
pconffile = CONFIG_FILE_60G;
} else {
pconffile = CONFIG_FILE;
}
@@ -3243,10 +3250,11 @@ int qsapsetSoftap(int argc, char *argv[])
ALOGD("ARG: %d - %s\n", i+1, argv[i]);
}
// check if 2nd arg is dual2g/dual5g
// check if 2nd arg is dual2g/dual5g/owe/60g
if (argc > 2
&& (strncmp(argv[2], Conf_req[CONF_2g], 4) == 0
|| strncmp(argv[2], Conf_req[CONF_owe], 3) == 0)) {
|| strncmp(argv[2], Conf_req[CONF_owe], 3) == 0
|| strncmp(argv[2], Conf_req[CONF_60g], 3) == 0)) {
snprintf(setCmd, SET_BUF_LEN, "set %s", argv[2]);
offset = 1;
argc--;

View File

@@ -91,6 +91,7 @@ enum error_val {
/** Configuration file name for SAP+SAP*/
#define CONFIG_FILE_2G "/data/vendor/wifi/hostapd/hostapd_dual2g.conf"
#define CONFIG_FILE_5G "/data/vendor/wifi/hostapd/hostapd_dual5g.conf"
#define CONFIG_FILE_60G "/data/vendor/wifi/hostapd/hostapd_60g.conf"
/** Configuration file name for OWE-transition */
#define CONFIG_FILE_OWE "/data/vendor/wifi/hostapd/hostapd_owe.conf"
@@ -256,6 +257,7 @@ enum eConf_req {
CONF_2g = 0,
CONF_5g = 1,
CONF_owe = 2,
CONF_60g = 3,
CONF_REQ_LAST
};
@@ -361,6 +363,8 @@ typedef enum esap_cmd {
eCMD_OWE_TRANS_IFNAME = 83,
eCMD_SAE_REQUIRE_MPF = 84,
eCMD_IEEE80211AX = 85,
eCMD_LAST /** New command numbers should be added above this */
} esap_cmd_t;