summaryrefslogtreecommitdiff
path: root/cesar/mac/pbproc
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/mac/pbproc')
-rw-r--r--cesar/mac/pbproc/test/pbproc/inc/test_pbproc.h3
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/ca.c8
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/rx_data.c4
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/rx_sound.c2
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/test_pbproc.c4
5 files changed, 12 insertions, 9 deletions
diff --git a/cesar/mac/pbproc/test/pbproc/inc/test_pbproc.h b/cesar/mac/pbproc/test/pbproc/inc/test_pbproc.h
index ee8ebafc1a..db29992dbb 100644
--- a/cesar/mac/pbproc/test/pbproc/inc/test_pbproc.h
+++ b/cesar/mac/pbproc/test/pbproc/inc/test_pbproc.h
@@ -27,6 +27,9 @@
/** Date offset for expiration tests. */
#define TEST_PBPROC_EXPIRATION_DATE_OFFSET 1000000000
+/** End date of default allocation. */
+#define TEST_PBPROC_ALLOC_END_DATE 0x80000000
+
/** Test pbproc context. */
struct test_pbproc_t
{
diff --git a/cesar/mac/pbproc/test/pbproc/src/ca.c b/cesar/mac/pbproc/test/pbproc/src/ca.c
index 3f2cf4b032..08c3852107 100644
--- a/cesar/mac/pbproc/test/pbproc/src/ca.c
+++ b/cesar/mac/pbproc/test/pbproc/src/ca.c
@@ -50,8 +50,8 @@ ca_access_activate (ca_t *ctx, u32 date)
ctx->current_allocation_param.hybrid = params->hybrid;
ctx->current_allocation_param.merge = params->merge;
ctx->current_allocation_param.nek_switch = params->nek_switch;
- ctx->current_allocation_param.end_date = 0x80000000;
- ctx->current_allocation_param.aifs_date = 0x80000000;
+ ctx->current_allocation_param.end_date = TEST_PBPROC_ALLOC_END_DATE;
+ ctx->current_allocation_param.aifs_date = TEST_PBPROC_ALLOC_END_DATE;
return &ctx->current_allocation_param;
}
@@ -104,8 +104,8 @@ ca_access_aifs (ca_t *ctx)
ctx->current_allocation_param.hybrid = params->hybrid;
ctx->current_allocation_param.merge = params->merge;
ctx->current_allocation_param.nek_switch = params->nek_switch;
- ctx->current_allocation_param.end_date = 0x80000000;
- ctx->current_allocation_param.aifs_date = 0x80000000;
+ ctx->current_allocation_param.end_date = TEST_PBPROC_ALLOC_END_DATE;
+ ctx->current_allocation_param.aifs_date = TEST_PBPROC_ALLOC_END_DATE;
return &ctx->current_allocation_param;
}
diff --git a/cesar/mac/pbproc/test/pbproc/src/rx_data.c b/cesar/mac/pbproc/test/pbproc/src/rx_data.c
index 7233e07419..b8fee52d99 100644
--- a/cesar/mac/pbproc/test/pbproc/src/rx_data.c
+++ b/cesar/mac/pbproc/test/pbproc/src/rx_data.c
@@ -993,7 +993,7 @@ rx_data_nfu_test (test_t t, test_pbproc_t *tp, u32 date, rx_data_nfu_t nfu)
}
if (nfu == NFU_OUT_OF_ALLOC)
{
- date += 0x80000000;
+ date += TEST_PBPROC_ALLOC_END_DATE;
restart_date = date + length_tck - MAC_PREAMBLE_TCK - MAC_FC_AV_TCK -
MAC_CIFS_TCK;
length_tck = MAC_PREAMBLE_TCK + MAC_FC_AV_TCK + MAC_CIFS_TCK;
@@ -1061,7 +1061,7 @@ rx_beacon_nfu_test (test_t t, test_pbproc_t *tp, rx_data_nfu_t nfu)
u32 date = 12345;
if (nfu == NFU_OUT_OF_ALLOC)
/* Date to overshoot allocation. */
- date = 0x80000000 - MAC_PREAMBLE_HYBRID_TCK / 2;
+ date = TEST_PBPROC_ALLOC_END_DATE - MAC_PREAMBLE_HYBRID_TCK / 2;
const uint pre_fc_fl_tck = MAC_PREAMBLE_HYBRID_TCK + MAC_FC_10_TCK
+ MAC_FC_AV_TCK + MAC_PAYLOAD_TCK (6, MAC_DX567_TCK)
+ MAC_B2BIFS_TCK;
diff --git a/cesar/mac/pbproc/test/pbproc/src/rx_sound.c b/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
index 323b8db0eb..a029baea1b 100644
--- a/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
+++ b/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
@@ -278,7 +278,7 @@ rx_sound_nfu_test (test_t t, test_pbproc_t *tp, u32 date, rx_sound_nfu_t nfu)
.fccs_av = 0,
};
if (nfu == NFU_OUT_OF_ALLOC)
- date += 0x80000000;
+ date += TEST_PBPROC_ALLOC_END_DATE;
length_tck = MAC_PREAMBLE_TCK + MAC_FC_AV_TCK
+ MAC_FL_TO_TCK (MAC_TCK_TO_FL (fl_tck))
+ MAC_PREAMBLE_TCK + MAC_FC_AV_TCK + MAC_CIFS_TCK;
diff --git a/cesar/mac/pbproc/test/pbproc/src/test_pbproc.c b/cesar/mac/pbproc/test/pbproc/src/test_pbproc.c
index f531bbb1df..e08a77cf79 100644
--- a/cesar/mac/pbproc/test/pbproc/src/test_pbproc.c
+++ b/cesar/mac/pbproc/test/pbproc/src/test_pbproc.c
@@ -128,8 +128,8 @@ test_pbproc_alloc (test_pbproc_t *ctx, bool hybrid,
ctx->pbproc->alloc.merge = false;
ctx->pbproc->times = ctx->pbproc->times_array[PBPROC_TIMES_ARRAY_INDEX (
hybrid, ctx->pbproc->alloc.coexistence_mode)];
- ctx->pbproc->alloc.end_date = 0x80000000;
- ctx->pbproc->alloc.aifs_date = 0x80000000;
+ ctx->pbproc->alloc.end_date = TEST_PBPROC_ALLOC_END_DATE;
+ ctx->pbproc->alloc.aifs_date = TEST_PBPROC_ALLOC_END_DATE;
ctx->pbproc->alloc.beacon_period_start_date = beacon_period_start_date;
}