mesh: Relocate RSN initialization
RSN initialization should work together with mesh join when it's used. Since mesh join could be called at a different stage if DFS channel is used, relocate the RSN initialization call to mesh join. It is still the same call flow of mesh join before this if non-DFS channels are used, hence no significant side effect will occur. Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
This commit is contained in:
parent
0daa7b75fa
commit
4b5453cedd
1 changed files with 8 additions and 3 deletions
|
@ -203,6 +203,14 @@ static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ifmsh->mconf->security != MESH_CONF_SEC_NONE &&
|
||||||
|
wpas_mesh_init_rsn(wpa_s)) {
|
||||||
|
wpa_printf(MSG_ERROR,
|
||||||
|
"mesh: RSN initialization failed - deinit mesh");
|
||||||
|
wpa_supplicant_mesh_deinit(wpa_s);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
|
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
|
||||||
wpa_s->pairwise_cipher = wpa_s->mesh_rsn->pairwise_cipher;
|
wpa_s->pairwise_cipher = wpa_s->mesh_rsn->pairwise_cipher;
|
||||||
wpa_s->group_cipher = wpa_s->mesh_rsn->group_cipher;
|
wpa_s->group_cipher = wpa_s->mesh_rsn->group_cipher;
|
||||||
|
@ -375,9 +383,6 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mconf->security != MESH_CONF_SEC_NONE && wpas_mesh_init_rsn(wpa_s))
|
|
||||||
goto out_free;
|
|
||||||
|
|
||||||
wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue