Skip to content

Commit 025a9c2

Browse files
MaochenWang1rlubos
authored andcommitted
[nrf fromtree] hostap: fix other STA failed to connect to SAP
The format of wpa_passphrase and sae_password is wrong when start the SAP, which leads the invaild MIC check error when other STA try to connect in security mode. Change the wrong format can fix this issue. Signed-off-by: Maochen Wang <maochen.wang@nxp.com> (cherry picked from commit 838ff13)
1 parent 0823505 commit 025a9c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/hostap/src/supp_api.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ int hapd_config_network(struct hostapd_iface *iface,
13571357
if (!hostapd_cli_cmd_v("set wpa_key_mgmt WPA-PSK")) {
13581358
goto out;
13591359
}
1360-
if (!hostapd_cli_cmd_v("set wpa_passphrase \"%s\"", params->psk)) {
1360+
if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) {
13611361
goto out;
13621362
}
13631363
if (!hostapd_cli_cmd_v("set wpa_pairwise CCMP")) {
@@ -1370,7 +1370,7 @@ int hapd_config_network(struct hostapd_iface *iface,
13701370
if (!hostapd_cli_cmd_v("set wpa_key_mgmt WPA-PSK")) {
13711371
goto out;
13721372
}
1373-
if (!hostapd_cli_cmd_v("set wpa_passphrase \"%s\"", params->psk)) {
1373+
if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) {
13741374
goto out;
13751375
}
13761376
if (!hostapd_cli_cmd_v("set rsn_pairwise CCMP")) {
@@ -1383,7 +1383,7 @@ int hapd_config_network(struct hostapd_iface *iface,
13831383
if (!hostapd_cli_cmd_v("set wpa_key_mgmt WPA-PSK-SHA256")) {
13841384
goto out;
13851385
}
1386-
if (!hostapd_cli_cmd_v("set wpa_passphrase \"%s\"", params->psk)) {
1386+
if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) {
13871387
goto out;
13881388
}
13891389
if (!hostapd_cli_cmd_v("set rsn_pairwise CCMP")) {
@@ -1396,7 +1396,7 @@ int hapd_config_network(struct hostapd_iface *iface,
13961396
if (!hostapd_cli_cmd_v("set wpa_key_mgmt SAE")) {
13971397
goto out;
13981398
}
1399-
if (!hostapd_cli_cmd_v("set sae_password \"%s\"",
1399+
if (!hostapd_cli_cmd_v("set sae_password %s",
14001400
params->sae_password ? params->sae_password :
14011401
params->psk)) {
14021402
goto out;

0 commit comments

Comments
 (0)