summaryrefslogtreecommitdiff
path: root/cesar/mac
diff options
context:
space:
mode:
authorschodet2009-12-22 16:14:49 +0000
committerschodet2009-12-22 16:14:49 +0000
commit8d292d3436612073c81d45f16d28adc1748049fe (patch)
tree18da4e3af78434e4fffd8c47321172bd417eda2e /cesar/mac
parentb4b326474eb5767b53a78afe4bb2a79e59561df1 (diff)
cesar/hal/phy: phy_{tx_param,rx_prepare}* interface changes, closes #1007
This includes: - replace mod, fecrate and pb_size with a combo parameter ; - remove unused tonemap_index ; - use specialised short_ppdu functions. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6574 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/mac')
-rw-r--r--cesar/mac/pbproc/inc/prep_mpdu.h6
-rw-r--r--cesar/mac/pbproc/src/fsm_rx_beacon.c5
-rw-r--r--cesar/mac/pbproc/src/fsm_rx_data.c6
-rw-r--r--cesar/mac/pbproc/src/fsm_rx_sound.c4
-rw-r--r--cesar/mac/pbproc/src/fsm_tx_data.c7
-rw-r--r--cesar/mac/pbproc/src/fsm_tx_sound.c3
-rw-r--r--cesar/mac/pbproc/src/prep_mpdu.c8
-rw-r--r--cesar/mac/pbproc/test/pbproc/inc/scenario_defs.h18
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/phy.c99
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c12
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/rx_data.c29
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/rx_sound.c8
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/tx_data.c42
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/tx_sound.c6
14 files changed, 118 insertions, 135 deletions
diff --git a/cesar/mac/pbproc/inc/prep_mpdu.h b/cesar/mac/pbproc/inc/prep_mpdu.h
index 5816496c88..113353bb04 100644
--- a/cesar/mac/pbproc/inc/prep_mpdu.h
+++ b/cesar/mac/pbproc/inc/prep_mpdu.h
@@ -46,10 +46,8 @@ struct pbproc_prep_mpdu_t
phy_fc_mode_t fc_mode;
/** Modulation type. */
phy_mod_t mod;
- /** TCC rate. */
- phy_fecrate_t fecrate;
- /** PB size. */
- phy_pb_size_t pb_size;
+ /** Phy combo parameters. */
+ u32 phy_combo_params;
/** Guard interval. */
phy_gil_t gil;
/** Tonemap. */
diff --git a/cesar/mac/pbproc/src/fsm_rx_beacon.c b/cesar/mac/pbproc/src/fsm_rx_beacon.c
index 4114f21597..90afb6f566 100644
--- a/cesar/mac/pbproc/src/fsm_rx_beacon.c
+++ b/cesar/mac/pbproc/src/fsm_rx_beacon.c
@@ -39,8 +39,9 @@ pbproc_frbe__handle (pbproc_t *ctx, u32 rx_date,
uint symb_nb = (1 * bits_per_pb + tm->bits_per_symbol - 1) /
tm->bits_per_symbol;
/* Unlock the hardware. */
- phy_rx_prepare (ctx->phy, false, PHY_MOD_MINI_ROBO, PHY_FEC_RATE_1_2,
- PHY_PB_SIZE_136, PHY_GIL_567, 0, symb_nb);
+ phy_rx_prepare (ctx->phy, PHY_COMBO_PARAMS (
+ PHY_MOD_MINI_ROBO, PHY_FEC_RATE_1_2, PHY_PB_SIZE_136),
+ PHY_GIL_567, symb_nb);
/* Program PB DMA. */
dbg_assert (ctx->rx_pool_size >= 1);
phy_pbdma_start (ctx->phy, true, NULL, 1, 1, 1,
diff --git a/cesar/mac/pbproc/src/fsm_rx_data.c b/cesar/mac/pbproc/src/fsm_rx_data.c
index ea9c733944..385e7c2231 100644
--- a/cesar/mac/pbproc/src/fsm_rx_data.c
+++ b/cesar/mac/pbproc/src/fsm_rx_data.c
@@ -217,9 +217,9 @@ pbproc_frda__handle (pbproc_t *ctx, u32 rx_date, const pbproc_fc_sof_t *sof)
}
/* First thing to do: unblock the hardware. */
if (tmi >= PHY_MOD_ROBO_NB)
- phy_set_tonemap (ctx->phy, 0, tm->tmdma_desc_head);
- phy_rx_prepare (ctx->phy, false, tmi < PHY_MOD_ROBO_NB ? tmi : PHY_MOD_TM,
- tm->fecrate, PHY_PB_SIZE_520, tm->gil, 0, symb_nb);
+ phy_set_tonemap (ctx->phy, tm->tmdma_desc_head);
+ phy_rx_prepare (ctx->phy, tm->phy_combo_params[PHY_PB_SIZE_520], tm->gil,
+ symb_nb);
/* Save received MPDU parameters. */
ctx->recv_mpdu.rx_params.preamble_ntb = rx_date
+ ctx->config->ntb_offset_tck;
diff --git a/cesar/mac/pbproc/src/fsm_rx_sound.c b/cesar/mac/pbproc/src/fsm_rx_sound.c
index f4bdafcc7d..e5ad6ecea2 100644
--- a/cesar/mac/pbproc/src/fsm_rx_sound.c
+++ b/cesar/mac/pbproc/src/fsm_rx_sound.c
@@ -74,8 +74,8 @@ pbproc_frso__handle (pbproc_t *ctx, u32 rx_date,
if (chandata)
{
/* Unblock hardware. */
- phy_rx_prepare_sound (ctx->phy, 1, mod, tm->fecrate, pb_size, tm->gil,
- symb_nb);
+ phy_rx_prepare_sound (ctx->phy, 1, tm->phy_combo_params[pb_size],
+ tm->gil, symb_nb);
/* Is sound completed? */
sta_t *sta = mac_store_sta_get (ctx->store, sound->stei);
if (sta)
diff --git a/cesar/mac/pbproc/src/fsm_tx_data.c b/cesar/mac/pbproc/src/fsm_tx_data.c
index f3c06cf23a..67c1f7d9cc 100644
--- a/cesar/mac/pbproc/src/fsm_tx_data.c
+++ b/cesar/mac/pbproc/src/fsm_tx_data.c
@@ -54,10 +54,9 @@ pbproc_ftda__handle (pbproc_t *ctx)
ctx->prep_mpdu.wack ? 0 : ctx->prep_mpdu.main_seg_nb,
&ctx->prep_mpdu.head->phy_pb, NULL, false);
if (ctx->prep_mpdu.mod == PHY_MOD_TM)
- phy_set_tonemap (ctx->phy, 0, ctx->prep_mpdu.tonemap);
- phy_tx_param (ctx->phy, ctx->prep_mpdu.fc_mode, false, ctx->prep_mpdu.mod,
- ctx->prep_mpdu.fecrate, ctx->prep_mpdu.pb_size,
- ctx->prep_mpdu.gil, 0);
+ phy_set_tonemap (ctx->phy, ctx->prep_mpdu.tonemap);
+ phy_tx_param (ctx->phy, ctx->prep_mpdu.fc_mode,
+ ctx->prep_mpdu.phy_combo_params, ctx->prep_mpdu.gil);
bool prp = ctx->access.prp && !ctx->prep_mpdu.rts_cts;
phy_tx_frame (ctx->phy, ctx->prep_mpdu.tx_date, true, prp,
ctx->prep_mpdu.fc_av.words);
diff --git a/cesar/mac/pbproc/src/fsm_tx_sound.c b/cesar/mac/pbproc/src/fsm_tx_sound.c
index a168e8fb77..6ccf688c2a 100644
--- a/cesar/mac/pbproc/src/fsm_tx_sound.c
+++ b/cesar/mac/pbproc/src/fsm_tx_sound.c
@@ -39,8 +39,7 @@ pbproc_ftso__handle (pbproc_t *ctx)
if (PHY_FC_MODE_IS_HYBRID (ctx->prep_mpdu.fc_mode))
phy_tx_fc10 (ctx->phy, ctx->prep_mpdu.tx_date, ctx->prep_mpdu.fc10);
phy_tx_param_sound (ctx->phy, ctx->prep_mpdu.fc_mode, 1,
- ctx->prep_mpdu.mod, ctx->prep_mpdu.fecrate,
- ctx->prep_mpdu.pb_size, ctx->prep_mpdu.gil);
+ ctx->prep_mpdu.phy_combo_params, ctx->prep_mpdu.gil);
bool prp = ctx->access.prp && !ctx->prep_mpdu.rts_cts;
phy_tx_frame (ctx->phy, ctx->prep_mpdu.tx_date, false, prp,
ctx->prep_mpdu.fc_av.words);
diff --git a/cesar/mac/pbproc/src/prep_mpdu.c b/cesar/mac/pbproc/src/prep_mpdu.c
index 9782349479..776a0efe3c 100644
--- a/cesar/mac/pbproc/src/prep_mpdu.c
+++ b/cesar/mac/pbproc/src/prep_mpdu.c
@@ -110,9 +110,8 @@ pbproc_prep_beacon (pbproc_t *ctx)
/* Modulation. */
prep->mod = PHY_MOD_MINI_ROBO;
tonemap_t *tm;
- tm = &ctx->config->tonemask_info.tonemap_robo[prep->mod];
- prep->fecrate = tm->fecrate;
- prep->pb_size = PHY_PB_SIZE_136;
+ tm = &ctx->config->tonemask_info.tonemap_robo[PHY_MOD_MINI_ROBO];
+ prep->phy_combo_params = tm->phy_combo_params[PHY_PB_SIZE_136];
prep->gil = tm->gil;
prep->tonemap = tm->tmdma_desc_head;
/* Compute number of symbols. */
@@ -289,8 +288,7 @@ pbproc_prep_mpdu (pbproc_t *ctx)
sound_reason_code = TONEMAP_SRC_NULL;
/* Prepare parameters. */
prep->mod = tmi < PHY_MOD_ROBO_NB ? tmi : PHY_MOD_TM;
- prep->fecrate = tm->fecrate;
- prep->pb_size = PHY_PB_SIZE_520;
+ prep->phy_combo_params = tm->phy_combo_params[PHY_PB_SIZE_520];
prep->gil = tm->gil;
prep->tonemap = tm->tmdma_desc_head;
prep->sound_reason_code = sound_reason_code;
diff --git a/cesar/mac/pbproc/test/pbproc/inc/scenario_defs.h b/cesar/mac/pbproc/test/pbproc/inc/scenario_defs.h
index a31bb635c4..3ed2aa85f3 100644
--- a/cesar/mac/pbproc/test/pbproc/inc/scenario_defs.h
+++ b/cesar/mac/pbproc/test/pbproc/inc/scenario_defs.h
@@ -88,6 +88,7 @@ scenario_action_pbproc_activate_cb (scenario_globals_t *globals,
phy_set_tonemap, \
phy_tx_fc10, \
phy_tx_param, \
+ phy_tx_param_short, \
phy_tx_param_sound, \
phy_tx_frame, \
phy_tx_prepare, \
@@ -95,6 +96,7 @@ scenario_action_pbproc_activate_cb (scenario_globals_t *globals,
phy_rx_param, \
phy_rx_activate, \
phy_rx_prepare, \
+ phy_rx_prepare_short, \
phy_rx_prepare_sound, \
phy_pbdma_start, \
phy_pbdma_update, \
@@ -113,10 +115,7 @@ scenario_action_pbproc_activate_cb (scenario_globals_t *globals,
pbproc_rx_cb, \
pbproc_rx_beacon_cb
-typedef struct
-{
- uint tonemap_index;
-} scenario_event_phy_set_tonemap_t;
+typedef scenario_empty_t scenario_event_phy_set_tonemap_t;
typedef struct
{
@@ -127,17 +126,20 @@ typedef struct
typedef struct
{
phy_fc_mode_t fc_mode;
- bool short_ppdu;
phy_mod_t mod;
phy_fecrate_t fecrate;
phy_pb_size_t pb_size;
phy_gil_t gil;
- uint tonemap_index;
} scenario_event_phy_tx_param_t;
typedef struct
{
phy_fc_mode_t fc_mode;
+} scenario_event_phy_tx_param_short_t;
+
+typedef struct
+{
+ phy_fc_mode_t fc_mode;
uint nb_pb;
phy_mod_t mod;
phy_fecrate_t fecrate;
@@ -170,15 +172,15 @@ typedef struct
typedef struct
{
- bool short_ppdu;
phy_mod_t mod;
phy_fecrate_t fecrate;
phy_pb_size_t pb_size;
phy_gil_t gil;
- uint tonemap_index;
uint symbol_nb;
} scenario_event_phy_rx_prepare_t;
+typedef scenario_empty_t scenario_event_phy_rx_prepare_short_t;
+
typedef struct
{
uint nb_pb;
diff --git a/cesar/mac/pbproc/test/pbproc/src/phy.c b/cesar/mac/pbproc/test/pbproc/src/phy.c
index 770a6d2c9f..4244e6357a 100644
--- a/cesar/mac/pbproc/test/pbproc/src/phy.c
+++ b/cesar/mac/pbproc/test/pbproc/src/phy.c
@@ -63,10 +63,9 @@ phy_set_tonemask (phy_t *ctx, u32 *tonemask, uint carrier_nb)
}
void
-phy_set_tonemap (phy_t *ctx, uint tonemap_index, blk_t *tonemap)
+phy_set_tonemap (phy_t *ctx, blk_t *tonemap)
{
- scenario_event (phy_set_tonemap, params);
- test_fail_unless (tonemap_index == params->tonemap_index);
+ scenario_event (phy_set_tonemap);
/* Test tonemap? */
}
@@ -79,36 +78,38 @@ phy_tx_fc10 (phy_t *ctx, u32 date, u32 fc_10)
}
void
-phy_tx_param (phy_t *ctx, phy_fc_mode_t fc_mode, bool short_ppdu,
- phy_mod_t mod, phy_fecrate_t fecrate, phy_pb_size_t pb_size,
- phy_gil_t gil, uint tonemap_index)
+phy_tx_param (phy_t *ctx, phy_fc_mode_t fc_mode, u32 mod_fecrate_pb_size,
+ phy_gil_t gil)
{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
scenario_event (phy_tx_param, params);
test_fail_unless (fc_mode == params->fc_mode);
- test_fail_unless (short_ppdu == params->short_ppdu);
- if (short_ppdu)
- {
- test_fail_unless (mod == PHY_MOD_NONE);
- test_fail_unless (fecrate == PHY_FEC_RATE_NONE);
- test_fail_unless (pb_size == PHY_PB_SIZE_NONE);
- test_fail_unless (gil == PHY_GIL_NB);
- test_fail_unless (tonemap_index == 0);
- }
- else
- {
- test_fail_unless (mod == params->mod);
- test_fail_unless (fecrate == params->fecrate);
- test_fail_unless (pb_size == params->pb_size);
- test_fail_unless (gil == params->gil);
- test_fail_unless (tonemap_index == params->tonemap_index);
- }
+ test_fail_unless (mod == params->mod);
+ test_fail_unless (fecrate == params->fecrate);
+ test_fail_unless (pb_size == params->pb_size);
+ test_fail_unless (gil == params->gil);
+}
+
+void
+phy_tx_param_short (phy_t *ctx, phy_fc_mode_t fc_mode)
+{
+ scenario_event (phy_tx_param_short, params);
+ test_fail_unless (fc_mode == params->fc_mode);
}
void
phy_tx_param_sound (phy_t *ctx, phy_fc_mode_t fc_mode, uint nb_pb,
- phy_mod_t mod, phy_fecrate_t fecrate,
- phy_pb_size_t pb_size, phy_gil_t gil)
+ u32 mod_fecrate_pb_size, phy_gil_t gil)
{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
scenario_event (phy_tx_param_sound, params);
test_fail_unless (fc_mode == params->fc_mode);
test_fail_unless (nb_pb == params->nb_pb);
@@ -161,37 +162,37 @@ phy_rx_activate (phy_t *ctx, bool now, u32 date, bool pre_detection)
}
void
-phy_rx_prepare (phy_t *ctx, bool short_ppdu, phy_mod_t mod,
- phy_fecrate_t fecrate, phy_pb_size_t pb_size, phy_gil_t gil,
- uint tonemap_index, uint symbol_nb)
+phy_rx_prepare (phy_t *ctx, u32 mod_fecrate_pb_size, phy_gil_t gil,
+ uint symbol_nb)
{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
scenario_event (phy_rx_prepare, params);
- test_fail_unless (short_ppdu == params->short_ppdu);
- if (short_ppdu)
- {
- test_fail_unless (mod == PHY_MOD_NONE);
- test_fail_unless (fecrate == PHY_FEC_RATE_NONE);
- test_fail_unless (pb_size == PHY_PB_SIZE_NONE);
- test_fail_unless (gil == PHY_GIL_NB);
- test_fail_unless (tonemap_index == 0);
- test_fail_unless (symbol_nb == 0);
- }
- else
- {
- test_fail_unless (mod == params->mod);
- test_fail_unless (fecrate == params->fecrate);
- test_fail_unless (pb_size == params->pb_size);
- test_fail_unless (gil == params->gil);
- test_fail_unless (tonemap_index == params->tonemap_index);
- test_fail_unless (symbol_nb == params->symbol_nb);
- }
+ test_fail_unless (mod == params->mod);
+ test_fail_unless (fecrate == params->fecrate);
+ test_fail_unless (pb_size == params->pb_size);
+ test_fail_unless (gil == params->gil);
+ test_fail_unless (symbol_nb == params->symbol_nb);
+}
+
+void
+phy_rx_prepare_short (phy_t *ctx)
+{
+ scenario_event (phy_rx_prepare_short);
}
void
-phy_rx_prepare_sound (phy_t *ctx, uint nb_pb, phy_mod_t mod,
- phy_fecrate_t fecrate, phy_pb_size_t pb_size,
+phy_rx_prepare_sound (phy_t *ctx, uint nb_pb, u32 mod_fecrate_pb_size,
phy_gil_t gil, uint symbol_nb)
{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
scenario_event (phy_rx_prepare_sound, params);
test_fail_unless (mod == params->mod);
test_fail_unless (fecrate == params->fecrate);
diff --git a/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c b/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c
index 9ced2713ab..3a2282b31f 100644
--- a/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c
+++ b/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c
@@ -147,8 +147,8 @@ prep_mpdu_test_f (test_t t, test_pbproc_t *tp, u32 date,
test_fail_unless (prep->fc_mode == PHY_FC_MODE_AV_1);
test_fail_unless (prep->mod == (tmi < PHY_MOD_ROBO_NB ? tmi
: PHY_MOD_TM));
- test_fail_unless (prep->fecrate == tm->fecrate);
- test_fail_unless (prep->pb_size == PHY_PB_SIZE_520);
+ test_fail_unless (prep->phy_combo_params == PHY_COMBO_PARAMS (
+ prep->mod, tm->fecrate, PHY_PB_SIZE_520));
test_fail_unless (prep->gil == tm->gil);
test_fail_unless (prep->tonemap == tm->tmdma_desc_head);
test_fail_unless (prep->sound_reason_code == sound_reason_code);
@@ -218,8 +218,8 @@ prep_mpdu_test_f (test_t t, test_pbproc_t *tp, u32 date,
test_fail_unless (prep->fc_mode == PHY_FC_MODE_AV_1);
test_fail_unless (prep->mod == (tmi < PHY_MOD_ROBO_NB ? tmi
: PHY_MOD_TM));
- test_fail_unless (prep->fecrate == tm->fecrate);
- test_fail_unless (prep->pb_size == PHY_PB_SIZE_520);
+ test_fail_unless (prep->phy_combo_params == PHY_COMBO_PARAMS (
+ prep->mod, tm->fecrate, PHY_PB_SIZE_520));
test_fail_unless (prep->gil == tm->gil);
test_fail_unless (prep->tonemap == tm->tmdma_desc_head);
test_fail_unless (prep->sound_reason_code == sound_reason_code);
@@ -626,8 +626,8 @@ prep_beacon_test (test_t t, test_pbproc_t *tp, u32 date, bool prepared,
test_fail_unless (prep->fc_mode == PHY_FC_MODE_HYBRID_1);
test_fail_unless (prep->sound_reason_code == TONEMAP_SRC_NULL);
test_fail_unless (prep->mod == PHY_MOD_MINI_ROBO);
- test_fail_unless (prep->fecrate == PHY_FEC_RATE_1_2);
- test_fail_unless (prep->pb_size == PHY_PB_SIZE_136);
+ test_fail_unless (prep->phy_combo_params == PHY_COMBO_PARAMS (
+ prep->mod, PHY_FEC_RATE_1_2, PHY_PB_SIZE_136));
test_fail_unless (prep->gil == PHY_GIL_567);
test_fail_unless (prep->tonemap == NULL);
test_fail_unless (prep->flp_tck == MAC_PREAMBLE_HYBRID_TCK
diff --git a/cesar/mac/pbproc/test/pbproc/src/rx_data.c b/cesar/mac/pbproc/test/pbproc/src/rx_data.c
index d48e1fb98d..75a2888f96 100644
--- a/cesar/mac/pbproc/test/pbproc/src/rx_data.c
+++ b/cesar/mac/pbproc/test/pbproc/src/rx_data.c
@@ -190,13 +190,11 @@ rx_data_burst_test_mpdu (test_t t, test_pbproc_t *tp,
ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT_COND (m->tmi >= PHY_MOD_ROBO_NB, phy_set_tonemap,
- .tonemap_index = 0),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = false,
+ SCENARIO_EVENT_COND (m->tmi >= PHY_MOD_ROBO_NB, phy_set_tonemap),
+ SCENARIO_EVENT (phy_rx_prepare,
.mod = m->tmi < PHY_MOD_ROBO_NB ? m->tmi : PHY_MOD_TM,
.fecrate = tm->fecrate, .pb_size = PHY_PB_SIZE_520,
- .gil = tm->gil, .tonemap_index = 0,
- .symbol_nb = m->symb_nb),
+ .gil = tm->gil, .symbol_nb = m->symb_nb),
SCENARIO_EVENT (phy_pbdma_start, .bypass_aes = !m->encrypted || drop,
.nb_total = m->pb_nb, .nb_ready = m->pb_nb,
.nb_pb_it = m->pb_nb == nb_pb_it && chandata_nb ? 0
@@ -213,9 +211,8 @@ rx_data_burst_test_mpdu (test_t t, test_pbproc_t *tp,
.crc_bitmap = m->crc_error,
.crc_bitmap_bits = m->pb_nb),
SCENARIO_EVENT_COND (burst->wack && m->mpdu_cnt == 0,
- phy_tx_param,
- .fc_mode = PHY_FC_MODE_AV_1,
- .short_ppdu = true),
+ phy_tx_param_short,
+ .fc_mode = PHY_FC_MODE_AV_1),
SCENARIO_EVENT_COND (burst->wack && m->mpdu_cnt == 0,
phy_tx_frame,
.date = date + pre_fc_fl_tck,
@@ -419,11 +416,11 @@ rx_beacon_test (test_t t, test_pbproc_t *tp, u32 date, uint symb_nb)
SCENARIO_EVENT (ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = false,
+ SCENARIO_EVENT (phy_rx_prepare,
.mod = PHY_MOD_MINI_ROBO,
.fecrate = PHY_FEC_RATE_1_2,
.pb_size = PHY_PB_SIZE_136, .gil = PHY_GIL_567,
- .tonemap_index = 0, .symbol_nb = symb_nb),
+ .symbol_nb = symb_nb),
SCENARIO_EVENT (phy_pbdma_start, .bypass_aes = true,
.nb_total = 1, .nb_ready = 1, .nb_pb_it = 1,
.chandata = false, .now = true),
@@ -878,7 +875,7 @@ rx_data_nfu_test (test_t t, test_pbproc_t *tp, u32 date, rx_data_nfu_t nfu)
SCENARIO_EVENT (ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = restart_date,
.length_tck = length_tck,
@@ -993,9 +990,9 @@ rx_data_sack_error_test (test_t t, test_pbproc_t *tp,
SCENARIO_EVENT (ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
- SCENARIO_EVENT_COND (wack, phy_tx_param, .fc_mode = PHY_FC_MODE_AV_1,
- .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
+ SCENARIO_EVENT_COND (wack, phy_tx_param_short,
+ .fc_mode = PHY_FC_MODE_AV_1),
SCENARIO_EVENT_COND (wack, phy_tx_frame, .date = date + pre_fc_fl_tck,
.want_conf = false,
.stop_tx_on_prp_lost = false),
@@ -1057,7 +1054,7 @@ rx_data_errors_test_case (test_t t)
SCENARIO_EVENT (ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = date,
.length_tck = MAC_EIFS_AV_TCK,
@@ -1091,7 +1088,7 @@ rx_data_errors_test_case (test_t t)
SCENARIO_EVENT (ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = date,
.length_tck = MAC_EIFS_AV_TCK,
diff --git a/cesar/mac/pbproc/test/pbproc/src/rx_sound.c b/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
index 695921dbcb..194e49cbce 100644
--- a/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
+++ b/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
@@ -94,10 +94,10 @@ rx_sound_test (test_t t, test_pbproc_t *tp, u32 date, uint chandata_nb,
.pb_size = pb_size, .gil = tm->gil,
.symbol_nb = symb_nb),
SCENARIO_EVENT_COND (chandata, phy_pbdma_start_chandata),
- SCENARIO_EVENT_COND (!chandata, phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT_COND (!chandata, phy_rx_prepare_short),
SCENARIO_ACTION_COND (chandata, phy_pbdma, .end_chandata = true),
- SCENARIO_EVENT_COND (!burst, phy_tx_param,
- .fc_mode = PHY_FC_MODE_AV_1, .short_ppdu = true),
+ SCENARIO_EVENT_COND (!burst, phy_tx_param_short,
+ .fc_mode = PHY_FC_MODE_AV_1),
SCENARIO_EVENT_COND (!burst, phy_tx_frame,
.date = date + pre_fc_fl_tck, .want_conf = false,
.stop_tx_on_prp_lost = false),
@@ -282,7 +282,7 @@ rx_sound_nfu_test (test_t t, test_pbproc_t *tp, u32 date, rx_sound_nfu_t nfu)
SCENARIO_EVENT (ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = restart_date,
.length_tck = length_tck,
diff --git a/cesar/mac/pbproc/test/pbproc/src/tx_data.c b/cesar/mac/pbproc/test/pbproc/src/tx_data.c
index c332b18331..9cb47c7cb2 100644
--- a/cesar/mac/pbproc/test/pbproc/src/tx_data.c
+++ b/cesar/mac/pbproc/test/pbproc/src/tx_data.c
@@ -73,10 +73,8 @@ tx_data_test (test_t t, test_pbproc_t *tp, u32 date, uint mfs_seg_nb,
.nb_ready = initial_pb_nb, .nb_pb_it = 0,
.chandata = false, .now = false),
SCENARIO_EVENT (phy_tx_param, .fc_mode = PHY_FC_MODE_AV_1,
- .short_ppdu = false, .mod = PHY_MOD_ROBO,
- .fecrate = PHY_FEC_RATE_1_2,
- .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417,
- .tonemap_index = 0),
+ .mod = PHY_MOD_ROBO, .fecrate = PHY_FEC_RATE_1_2,
+ .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417),
SCENARIO_EVENT (phy_tx_frame, .date = date, .want_conf = true,
.stop_tx_on_prp_lost = true),
SCENARIO_EVENT (ca_access_vcs_restart, .start_date = date,
@@ -98,7 +96,7 @@ tx_data_test (test_t t, test_pbproc_t *tp, u32 date, uint mfs_seg_nb,
.pre_detection = true),
SCENARIO_ACTION (phy_rx_fc, .rx_date = date + pre_fc_fl_tck,
.fc_av = (u32 *) &sack_fc),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_mfs_update, .mfs = mfs),
SCENARIO_EVENT (ca_backoff_success),
SCENARIO_EVENT (ca_access_vcs_restart,
@@ -148,10 +146,8 @@ tx_data_woack_test (test_t t, test_pbproc_t *tp, u32 date, uint mfs_seg_nb,
.nb_ready = initial_pb_nb, .nb_pb_it = initial_pb_nb,
.chandata = false, .now = false),
SCENARIO_EVENT (phy_tx_param, .fc_mode = PHY_FC_MODE_AV_1,
- .short_ppdu = false, .mod = PHY_MOD_ROBO,
- .fecrate = PHY_FEC_RATE_1_2,
- .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417,
- .tonemap_index = 0),
+ .mod = PHY_MOD_ROBO, .fecrate = PHY_FEC_RATE_1_2,
+ .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417),
SCENARIO_EVENT (phy_tx_frame, .date = date, .want_conf = true,
.stop_tx_on_prp_lost = true),
SCENARIO_EVENT (ca_access_vcs_restart, .start_date = date,
@@ -270,10 +266,8 @@ tx_data_beacon_test (test_t t, test_pbproc_t *tp, u32 date, uint duration_tck,
.nb_ready = 1, .nb_pb_it = 1, .chandata = false,
.now = false),
SCENARIO_EVENT (phy_tx_param, .fc_mode = PHY_FC_MODE_HYBRID_1,
- .short_ppdu = false, .mod = PHY_MOD_MINI_ROBO,
- .fecrate = PHY_FEC_RATE_1_2,
- .pb_size = PHY_PB_SIZE_136, .gil = PHY_GIL_567,
- .tonemap_index = 0),
+ .mod = PHY_MOD_MINI_ROBO, .fecrate = PHY_FEC_RATE_1_2,
+ .pb_size = PHY_PB_SIZE_136, .gil = PHY_GIL_567),
SCENARIO_EVENT (phy_tx_frame, .date = date, .want_conf = true,
.stop_tx_on_prp_lost = false),
SCENARIO_ACTION (phy_access_conf),
@@ -408,10 +402,8 @@ tx_data_cancel_test (test_t t, test_pbproc_t *tp, bool prp_won, bool rx_fc)
.nb_ready = 1, .nb_pb_it = 0, .chandata = false,
.now = false),
SCENARIO_EVENT (phy_tx_param, .fc_mode = PHY_FC_MODE_AV_1,
- .short_ppdu = false, .mod = PHY_MOD_ROBO,
- .fecrate = PHY_FEC_RATE_1_2,
- .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417,
- .tonemap_index = 0),
+ .mod = PHY_MOD_ROBO, .fecrate = PHY_FEC_RATE_1_2,
+ .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417),
SCENARIO_EVENT (phy_tx_frame, .date = date, .want_conf = true,
.stop_tx_on_prp_lost = true),
SCENARIO_EVENT (ca_access_vcs_restart, .start_date = date,
@@ -426,7 +418,7 @@ tx_data_cancel_test (test_t t, test_pbproc_t *tp, bool prp_won, bool rx_fc)
SCENARIO_EVENT_COND (!prp_won, ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = date - MAC_SLOT_TCK,
.length_tck = sack_length_tck,
@@ -443,10 +435,8 @@ tx_data_cancel_test (test_t t, test_pbproc_t *tp, bool prp_won, bool rx_fc)
.nb_ready = 1, .nb_pb_it = 0, .chandata = false,
.now = false),
SCENARIO_EVENT (phy_tx_param, .fc_mode = PHY_FC_MODE_AV_1,
- .short_ppdu = false, .mod = PHY_MOD_ROBO,
- .fecrate = PHY_FEC_RATE_1_2,
- .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417,
- .tonemap_index = 0),
+ .mod = PHY_MOD_ROBO, .fecrate = PHY_FEC_RATE_1_2,
+ .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417),
SCENARIO_EVENT (phy_tx_frame, .date = date, .want_conf = true,
.stop_tx_on_prp_lost = true),
SCENARIO_EVENT (ca_access_vcs_restart, .start_date = date,
@@ -461,10 +451,8 @@ tx_data_cancel_test (test_t t, test_pbproc_t *tp, bool prp_won, bool rx_fc)
.nb_ready = 1, .nb_pb_it = 0, .chandata = false,
.now = false),
SCENARIO_EVENT (phy_tx_param, .fc_mode = PHY_FC_MODE_AV_1,
- .short_ppdu = false, .mod = PHY_MOD_ROBO,
- .fecrate = PHY_FEC_RATE_1_2,
- .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417,
- .tonemap_index = 0),
+ .mod = PHY_MOD_ROBO, .fecrate = PHY_FEC_RATE_1_2,
+ .pb_size = PHY_PB_SIZE_520, .gil = PHY_GIL_417),
SCENARIO_EVENT (phy_tx_frame, .date = date2, .want_conf = true,
.stop_tx_on_prp_lost = false),
SCENARIO_ACTION (phy_rx_fc, .rx_date = date2 - MAC_SLOT_TCK,
@@ -474,7 +462,7 @@ tx_data_cancel_test (test_t t, test_pbproc_t *tp, bool prp_won, bool rx_fc)
SCENARIO_EVENT (ca_backoff_deferred, .slot_count = 3),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = date2 - MAC_SLOT_TCK,
.length_tck = sack_length_tck,
diff --git a/cesar/mac/pbproc/test/pbproc/src/tx_sound.c b/cesar/mac/pbproc/test/pbproc/src/tx_sound.c
index 04f3d24642..8eb119e994 100644
--- a/cesar/mac/pbproc/test/pbproc/src/tx_sound.c
+++ b/cesar/mac/pbproc/test/pbproc/src/tx_sound.c
@@ -92,7 +92,7 @@ tx_sound_test (test_t t, test_pbproc_t *tp)
.pre_detection = true),
SCENARIO_ACTION (phy_rx_fc, .rx_date = date + pre_fc_fl_tck,
.fc_av = (u32 *) &sound_ack_fc),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_backoff_success),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = date + pre_fc_fl_tck,
@@ -212,7 +212,7 @@ tx_sound_cancel_test (test_t t, test_pbproc_t *tp, bool prp_won, bool rx_fc)
SCENARIO_EVENT_COND (!prp_won, ca_backoff_cancel),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = date - MAC_SLOT_TCK,
.length_tck = sack_length_tck,
@@ -262,7 +262,7 @@ tx_sound_cancel_test (test_t t, test_pbproc_t *tp, bool prp_won, bool rx_fc)
SCENARIO_EVENT (ca_backoff_deferred, .slot_count = 3),
SCENARIO_EVENT (phy_tx_cancel),
SCENARIO_EVENT (ca_access_hold),
- SCENARIO_EVENT (phy_rx_prepare, .short_ppdu = true),
+ SCENARIO_EVENT (phy_rx_prepare_short),
SCENARIO_EVENT (ca_access_vcs_restart,
.start_date = date2 - MAC_SLOT_TCK,
.length_tck = sack_length_tck,