003-mesh-relocate-RSN-init-function.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 07bad5f256cbe8a4b45d32c5b43b870ee815fb42 Mon Sep 17 00:00:00 2001
  2. From: Peter Oh <[email protected]>
  3. Date: Tue, 29 May 2018 14:39:07 -0700
  4. Subject: [PATCH 03/18] mesh: relocate RSN init function
  5. RSN init function should work together with mesh join
  6. when it's used. Since mesh join could be called at different stage
  7. if DFS channel is used, relocate the function to mesh join.
  8. It is still the same call flows of mesh join before this changes
  9. if non-DFS channels are used, hence no side effect will occur.
  10. Signed-off-by: Peter Oh <[email protected]>
  11. ---
  12. wpa_supplicant/mesh.c | 9 ++++++---
  13. 1 file changed, 6 insertions(+), 3 deletions(-)
  14. --- a/wpa_supplicant/mesh.c
  15. +++ b/wpa_supplicant/mesh.c
  16. @@ -336,9 +336,6 @@ static int wpa_supplicant_mesh_init(stru
  17. return -1;
  18. }
  19. - if (wpas_mesh_init_rsn(wpa_s))
  20. - goto out_free;
  21. -
  22. wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
  23. return 0;
  24. @@ -384,6 +381,12 @@ void wpas_join_mesh(struct wpa_supplican
  25. struct wpa_ssid *ssid = wpa_s->current_ssid;
  26. int ret = 0;
  27. + if (wpas_mesh_init_rsn(wpa_s)) {
  28. + wpa_printf(MSG_ERROR, "Init RSN failed. Deinit mesh...");
  29. + wpa_supplicant_mesh_deinit(wpa_s);
  30. + return;
  31. + }
  32. +
  33. if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
  34. wpa_s->pairwise_cipher = wpa_s->mesh_rsn->pairwise_cipher;
  35. wpa_s->group_cipher = wpa_s->mesh_rsn->group_cipher;