summaryrefslogtreecommitdiff
path: root/cesar/mac/pbproc
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/mac/pbproc')
-rw-r--r--cesar/mac/pbproc/src/prep_mpdu.c10
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c14
2 files changed, 20 insertions, 4 deletions
diff --git a/cesar/mac/pbproc/src/prep_mpdu.c b/cesar/mac/pbproc/src/prep_mpdu.c
index b9d3a9977d..062c42584e 100644
--- a/cesar/mac/pbproc/src/prep_mpdu.c
+++ b/cesar/mac/pbproc/src/prep_mpdu.c
@@ -266,8 +266,10 @@ pbproc_prep_mpdu (pbproc_t *ctx, mfs_tx_t *mfs)
rifs_av_one_sym_tck = MAC_RIFS_DEFAULT_TCK;
rifs_av_two_sym_tck = MAC_RIFS_DEFAULT_TCK;
rifs_av_g2_sym_tck = MAC_RIFS_DEFAULT_TCK;
- /* Find tonemap. */
- if (MAC_TEI_IS_STA (prep->dtei))
+ /* Find tonemap.
+ * There is no need to do this job for MMEs, as we do not send sound
+ * instead and we always send them in ROBO (see #3988). */
+ if (!mfs->common.mme && MAC_TEI_IS_STA (prep->dtei))
{
sta_t *sta = mac_store_sta_get (ctx->store, prep->dtei);
if (sta)
@@ -371,8 +373,8 @@ pbproc_prep_mpdu (pbproc_t *ctx, mfs_tx_t *mfs)
blk_release (sta);
}
}
- /* No sound unless a CE is running and data is transfered. */
- if (!ctx->chandata_nb || mfs->common.mme)
+ /* No sound unless a CE is running. */
+ if (!ctx->chandata_nb)
sound_reason_code = TONEMAP_SRC_NULL;
/* Prepare parameters. */
phy_gil_t previous_gil = prep->gil;
diff --git a/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c b/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c
index a6670cdf63..fb8b9bc994 100644
--- a/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c
+++ b/cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c
@@ -110,6 +110,8 @@ struct prep_mpdu_test_t
u16 min_ssn_delta;
/* Expected delta between RX and TX ssn min. */
u16 expected_delta;
+ /* True if ROBO is expected even if a negotiated tonemap exists. */
+ bool robo_expected;
};
#define prep_mpdu_test(t, tp, date, params...) \
@@ -178,6 +180,11 @@ prep_mpdu_test_f (test_t t, test_pbproc_t *tp, u32 date,
TONEMAP_SRC_NULL;
uint tmi = params->tmi < TONEMAP_INDEX_NB && !sound_reason_code
? params->tmi : PHY_MOD_ROBO;
+ if (params->robo_expected)
+ {
+ tmi = PHY_MOD_ROBO;
+ tm = &tp->config.tonemask_info.tonemap_robo[PHY_MOD_ROBO];
+ }
phy_mod_t mod = tmi < PHY_MOD_ROBO_NB ? tmi : PHY_MOD_TM;
uint rifs_tck = params->symb_nb == 0 || tmi < PHY_MOD_ROBO_NB
? MAC_RIFS_DEFAULT_TCK : MAC_RIFS_SPC_ANY_TCK;
@@ -729,6 +736,13 @@ prep_mpdu_basic_test_case (test_t t)
.symb_nb = 2, .main_seg_nb_total = 2,
.tmi = 5, .tm_mod = 10);
} test_end;
+ test_begin (t, "tm unicast mme")
+ {
+ prep_mpdu_test (t, &tp, 0, .mme = true, .mfs_seg_nb = 1,
+ .duration_symb_nb = 25, .symb_nb = 19,
+ .main_seg_nb_total = 1, .tmi = 5, .tm_mod = 10,
+ .robo_expected = true);
+ } test_end;
test_begin (t, "robo unicast data limit dur encrypted")
{
prep_mpdu_test (t, &tp, 0, .mfs_seg_nb = 30, .duration_symb_nb = 25,