summaryrefslogtreecommitdiff
path: root/cesar/bsu
diff options
context:
space:
mode:
authorYacine Belkadi2013-04-25 15:07:30 +0200
committerYacine Belkadi2013-05-22 10:53:37 +0200
commit21ef1bf39c7cbbeff2c333e74b24c8ad426006e3 (patch)
treec9c1aa810ac06c8fe79cae5e750a5c44499d07f2 /cesar/bsu
parent788ef9b8c3584b453f22faf088a028335317f4a9 (diff)
cesar/bsu: use MAC_TOLERANCE_TCK when comparing beacon date to beacon period date
It may be possible for the beacon_period_start_date to be just a few ticks before bpsd0 (the beacon period start date) even though it's the beacon for the current beacon period. Use MAC_TOLERANCE_TCK to account for that.
Diffstat (limited to 'cesar/bsu')
-rw-r--r--cesar/bsu/src/bsu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cesar/bsu/src/bsu.c b/cesar/bsu/src/bsu.c
index f81fb12b36..72557a80db 100644
--- a/cesar/bsu/src/bsu.c
+++ b/cesar/bsu/src/bsu.c
@@ -833,8 +833,8 @@ bsu_timer_event_process__sta (bsu_t *ctx)
ctx->sta_avln->beacon.beacon_period_start_date = bpsd[1];
ctx->track_new = false;
}
- else if (less_mod2p32 (
- ctx->sta_avln->beacon.beacon_period_start_date, bpsd0))
+ else if (less_mod2p32 (ctx->sta_avln->beacon.beacon_period_start_date,
+ bpsd0 - MAC_TOLERANCE_TCK))
{
bsu_avln_schedules_decrease_countdown (ctx, ctx->sta_avln);
ctx->sta_avln->beacon.beacon_period_start_date = bpsd0;