aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_mpm.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2015-01-22 05:22:16 (GMT)
committerJouni Malinen <j@w1.fi>2015-01-28 11:09:31 (GMT)
commit871ff0b7466a9fa62a9980deb30949e495dea095 (patch)
tree1fc5783d872b861e43a7464ed84f274c9a6fa37c /wpa_supplicant/mesh_mpm.c
parent467775c5ac05dc9bb44a8b886257b2c36c374b54 (diff)
downloadhostap-871ff0b7466a9fa62a9980deb30949e495dea095.zip
hostap-871ff0b7466a9fa62a9980deb30949e495dea095.tar.gz
hostap-871ff0b7466a9fa62a9980deb30949e495dea095.tar.bz2
mesh: Sync plink state with kernel
The plink_state exists both wpa_supplicant and kernel. Synchronize them with wpa_mesh_set_plink_state(). Signed-off-by: Kenzoh Nishikawa <Kenzoh.Nishikawa@jp.sony.com> Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/mesh_mpm.c')
-rw-r--r--wpa_supplicant/mesh_mpm.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 4a259ff..0da7e13 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -193,6 +193,11 @@ static void mesh_mpm_init_link(struct wpa_supplicant *wpa_s,
sta->my_lid = llid;
sta->peer_lid = 0;
+
+ /*
+ * We do not use wpa_mesh_set_plink_state() here because there is no
+ * entry in kernel yet.
+ */
sta->plink_state = PLINK_LISTEN;
}
@@ -348,9 +353,9 @@ fail:
/* configure peering state in ours and driver's station entry */
-static void
-wpa_mesh_set_plink_state(struct wpa_supplicant *wpa_s, struct sta_info *sta,
- enum mesh_plink_state state)
+void wpa_mesh_set_plink_state(struct wpa_supplicant *wpa_s,
+ struct sta_info *sta,
+ enum mesh_plink_state state)
{
struct hostapd_sta_add_params params;
int ret;
@@ -417,7 +422,7 @@ static void plink_timer(void *eloop_ctx, void *user_data)
/* confirm timer */
if (!reason)
reason = WLAN_REASON_MESH_CONFIRM_TIMEOUT;
- sta->plink_state = PLINK_HOLDING;
+ wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
eloop_register_timeout(conf->dot11MeshHoldingTimeout / 1000,
(conf->dot11MeshHoldingTimeout % 1000) * 1000,
plink_timer, wpa_s, sta);