summaryrefslogtreecommitdiff
path: root/cp/station/src/station_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'cp/station/src/station_events.c')
-rw-r--r--cp/station/src/station_events.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cp/station/src/station_events.c b/cp/station/src/station_events.c
index 24a4679839..b490a4ab01 100644
--- a/cp/station/src/station_events.c
+++ b/cp/station/src/station_events.c
@@ -35,10 +35,9 @@ station_launch_ustt(void)
void
station_ustt_expires(void)
-{
-
+{
// see Figure 7-76
- bool avln_detected = true;
+ bool avln_detected = false;
//STA_TRACE("ustt expires\n");
// check if some AVLN are detected
@@ -55,7 +54,7 @@ station_ustt_expires(void)
if( unassoc_sta_mme_periodic_sending)
station_stop_cm_unassoc_sta_mme_periodicaly();
}
- // check if we launch again the ustt timer Fig 7-76 or Fig 7-77
+ // check if we launch again the ustt timer (Fig 7-76 or Fig 7-77)
if( (station_status == POWER_ON) || (station_status == UNASSO_STA) )
{
station_launch_ustt();
@@ -80,7 +79,8 @@ station_send_cm_unassoc_sta_mme_periodicaly(void)
next_event_date_ms += offset_ms;
offset_ms = MaxDiscoverPeriod_ms - tmp;
dbg_assert(next_event_date_ms);
- dbg_assert(next_event_date_ms < (2 * MaxDiscoverPeriod_ms));
+ dbg_assert(next_event_date_ms < (2 * MaxDiscoverPeriod_ms));
+ dbg_assert(offset_ms < MaxDiscoverPeriod_ms);
station_gen_timed_event(&station_flag, STATION_FLAG_PERIODIC_UNASSO, next_event_date_ms);
// send the message
msg_cm_unassociated_sta_ind_send(INTERF_SAR, BROADCAST_MAC_AD);
@@ -91,5 +91,6 @@ station_stop_cm_unassoc_sta_mme_periodicaly(void)
{
// reset the flag
unassoc_sta_mme_periodic_sending = false;
+ // and reset the event
station_stop_timed_event(&station_flag, STATION_FLAG_PERIODIC_UNASSO);
}