summaryrefslogtreecommitdiff
path: root/cesar/cp2/sta/mgr/src/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp2/sta/mgr/src/net.c')
-rw-r--r--cesar/cp2/sta/mgr/src/net.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/cesar/cp2/sta/mgr/src/net.c b/cesar/cp2/sta/mgr/src/net.c
index 97b5e453a5..d9e992aba9 100644
--- a/cesar/cp2/sta/mgr/src/net.c
+++ b/cesar/cp2/sta/mgr/src/net.c
@@ -186,13 +186,6 @@ cp_net_garbage_station_list (cp_t *ctx, cp_net_t *net, u32 date_ms,
slab_release (sta);
sta = sta_next;
}
-
- if (cp_net_is_empty (ctx, net) && net->station_avln)
- {
- cp_fsm_event_t *event;
- event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_ALL_STA_LEAVED);
- cp_fsm_post (ctx, event);
- }
}
/**
@@ -443,19 +436,12 @@ cp_net_sta_remove_assoc (cp_t *ctx, cp_net_t *net, cp_tei_t tei)
slab_release (sta);
}
- if (cp_net_is_empty (ctx, net))
+ if (cp_sta_mgr_net_list_is_empty (ctx))
{
cp_fsm_event_t *event;
- event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_ALL_STA_LEAVED);
+ event = cp_fsm_event_bare_new (ctx,
+ CP_FSM_EVENT_TYPE_NET_LIST_EMPTY);
cp_fsm_post (ctx, event);
-
- if (cp_sta_mgr_net_list_is_empty (ctx))
- {
- cp_fsm_event_t *event;
- event = cp_fsm_event_bare_new (ctx,
- CP_FSM_EVENT_TYPE_NET_LIST_EMPTY);
- cp_fsm_post (ctx, event);
- }
}
}
@@ -495,16 +481,6 @@ cp_net_sta_remove_unassoc (cp_t *ctx, cp_net_t *net, mac_t mac_addr)
//release the station.
slab_release (sta);
}
-
- // If the net is empty post an event to the FSM.
- // Check the associated list.
- if (cp_net_is_empty (ctx, net))
- {
- cp_fsm_event_t *event;
- event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_ALL_STA_LEAVED);
- cp_fsm_post (ctx, event);
- net->present = false;
- }
}
/**