@@ -633,6 +633,7 @@ static void mesh_mpm_fsm(struct wpa_supplicant *wpa_s, struct sta_info *sta,
struct hostapd_data *hapd = wpa_s->ifmsh->bss[0];
struct mesh_conf *conf = wpa_s->ifmsh->mconf;
u16 reason = 0;
+ struct os_reltime remaining;
wpa_msg(wpa_s, MSG_DEBUG, "MPM " MACSTR " state %s event %s",
MAC2STR(sta->addr), mplstate[sta->plink_state],
@@ -663,6 +664,8 @@ static void mesh_mpm_fsm(struct wpa_supplicant *wpa_s, struct sta_info *sta,
wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
if (!reason)
reason = WLAN_REASON_MESH_CLOSE_RCVD;
+ eloop_cancel_timeout_one(plink_timer, wpa_s, sta,
+ &remaining);
eloop_register_timeout(dot11MeshHoldingTimeout, 0,
plink_timer, wpa_s, sta);
mesh_mpm_send_plink_action(wpa_s, sta,
@@ -676,6 +679,8 @@ static void mesh_mpm_fsm(struct wpa_supplicant *wpa_s, struct sta_info *sta,
break;
case CNF_ACPT:
wpa_mesh_set_plink_state(wpa_s, sta, PLINK_CNF_RCVD);
+ eloop_cancel_timeout_one(plink_timer, wpa_s, sta,
+ &remaining);
eloop_register_timeout(dot11MeshConfirmTimeout, 0,
plink_timer, wpa_s, sta);
break;
@@ -693,6 +698,8 @@ static void mesh_mpm_fsm(struct wpa_supplicant *wpa_s, struct sta_info *sta,
wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
if (!reason)
reason = WLAN_REASON_MESH_CLOSE_RCVD;
+ eloop_cancel_timeout_one(plink_timer, wpa_s, sta,
+ &remaining);
eloop_register_timeout(dot11MeshHoldingTimeout, 0,
plink_timer, wpa_s, sta);
sta->mpm_close_reason = reason;
@@ -722,6 +729,8 @@ static void mesh_mpm_fsm(struct wpa_supplicant *wpa_s, struct sta_info *sta,
wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
if (!reason)
reason = WLAN_REASON_MESH_CLOSE_RCVD;
+ eloop_cancel_timeout_one(plink_timer, wpa_s, sta,
+ &remaining);
eloop_register_timeout(dot11MeshHoldingTimeout, 0,
plink_timer, wpa_s, sta);
sta->mpm_close_reason = reason;
@@ -743,6 +752,8 @@ static void mesh_mpm_fsm(struct wpa_supplicant *wpa_s, struct sta_info *sta,
wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
reason = WLAN_REASON_MESH_CLOSE_RCVD;
+ eloop_cancel_timeout_one(plink_timer, wpa_s, sta,
+ &remaining);
eloop_register_timeout(dot11MeshHoldingTimeout, 0,
plink_timer, wpa_s, sta);
sta->mpm_close_reason = reason;