summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschodet2010-07-06 13:44:53 +0000
committerschodet2010-07-06 13:44:53 +0000
commit9576ca71f8331ffe01717199f73cb20d535cf91e (patch)
tree7c79163364b337870818355727568d91f96cffc0
parented6e74d131e62cc0ea032949460364ee9f134fb0 (diff)
cesar/{hal/phy,mac/pbproc}: delay rx_activate after short PPDU, closes #1714
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7273 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--cesar/hal/phy/defs.h3
-rw-r--r--cesar/mac/pbproc/src/fsm_handle_fc.c6
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/rx_data.c12
3 files changed, 16 insertions, 5 deletions
diff --git a/cesar/hal/phy/defs.h b/cesar/hal/phy/defs.h
index 222a0e1a04..c75a5f97cd 100644
--- a/cesar/hal/phy/defs.h
+++ b/cesar/hal/phy/defs.h
@@ -71,6 +71,9 @@
/** Delay for MAFADESE start. */
#define PHY_START_MAFADESE_DELAY_TCK (1400 / 3)
+/** Hardware delay after short MPDU to activate RX again. */
+#define PHY_RX_ACTIVATE_DELAY_AFTER_SHORT_TCK (60 * 25)
+
/** Hardware delay for RX between sample on medium and DSP analysis. */
#define PHY_RX_HARDWARE_DELAY_TCK (10 + 3)
diff --git a/cesar/mac/pbproc/src/fsm_handle_fc.c b/cesar/mac/pbproc/src/fsm_handle_fc.c
index c698886701..72c5824743 100644
--- a/cesar/mac/pbproc/src/fsm_handle_fc.c
+++ b/cesar/mac/pbproc/src/fsm_handle_fc.c
@@ -91,7 +91,8 @@ pbproc_fhfc_handle_fc (pbproc_t *ctx, u32 rx_date, const pbproc_fc_t *fc_av)
ca_access_vcs_restart (ctx->ca, rx_date,
ctx->times.eifs_tck,
PBPROC_ANTICIP_TCK, true);
- phy_rx_activate (ctx->phy, true, 0, true);
+ phy_rx_activate (ctx->phy, false, rx_date + ctx->times.pre_fcs_tck
+ + PHY_RX_ACTIVATE_DELAY_AFTER_SHORT_TCK, true);
pbproc_fsm_change_state (ctx, PBPROC_FSM_STATE_IDLE);
/* Handle HP 1.0 detection. */
u32 fc10 = phy_rx_fc10 (ctx->phy);
@@ -123,7 +124,8 @@ pbproc_fhfc_handle_fc (pbproc_t *ctx, u32 rx_date, const pbproc_fc_t *fc_av)
ca_access_vcs_restart (ctx->ca, rx_date,
ctx->times.eifs_tck,
PBPROC_ANTICIP_TCK, true);
- phy_rx_activate (ctx->phy, true, 0, true);
+ phy_rx_activate (ctx->phy, false, rx_date + ctx->times.pre_fcs_tck
+ + PHY_RX_ACTIVATE_DELAY_AFTER_SHORT_TCK, true);
pbproc_fsm_change_state (ctx, PBPROC_FSM_STATE_IDLE);
}
}
diff --git a/cesar/mac/pbproc/test/pbproc/src/rx_data.c b/cesar/mac/pbproc/test/pbproc/src/rx_data.c
index f98aab2e46..806d5e94a2 100644
--- a/cesar/mac/pbproc/test/pbproc/src/rx_data.c
+++ b/cesar/mac/pbproc/test/pbproc/src/rx_data.c
@@ -1208,7 +1208,9 @@ rx_data_fc10 (test_t t, test_pbproc_t *tp, u32 fc10,
.length_tck = MAC_EIFS_AV_TCK,
.anticipation_tck = PBPROC_ANTICIP_TCK,
.eifs = true),
- SCENARIO_EVENT (phy_rx_activate, .now = true,
+ SCENARIO_EVENT (phy_rx_activate, .now = false,
+ .date = date + MAC_PREAMBLE_TCK + MAC_FC_AV_TCK
+ + PHY_RX_ACTIVATE_DELAY_AFTER_SHORT_TCK,
.pre_detection = true),
SCENARIO_END
};
@@ -1256,7 +1258,9 @@ rx_data_errors_test_case (test_t t)
.length_tck = MAC_EIFS_AV_TCK,
.anticipation_tck = PBPROC_ANTICIP_TCK,
.eifs = true),
- SCENARIO_EVENT (phy_rx_activate, .now = true,
+ SCENARIO_EVENT (phy_rx_activate, .now = false,
+ .date = date + MAC_PREAMBLE_TCK + MAC_FC_AV_TCK
+ + PHY_RX_ACTIVATE_DELAY_AFTER_SHORT_TCK,
.pre_detection = true),
SCENARIO_END
};
@@ -1315,7 +1319,9 @@ rx_data_errors_test_case (test_t t)
.length_tck = MAC_EIFS_AV_TCK,
.anticipation_tck = PBPROC_ANTICIP_TCK,
.eifs = true),
- SCENARIO_EVENT (phy_rx_activate, .now = true,
+ SCENARIO_EVENT (phy_rx_activate, .now = false,
+ .date = date + MAC_PREAMBLE_TCK + MAC_FC_AV_TCK
+ + PHY_RX_ACTIVATE_DELAY_AFTER_SHORT_TCK,
.pre_detection = true),
SCENARIO_END
};