summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cesar/mac/common/mfs.h6
-rw-r--r--cesar/mac/sar/src/sar.c12
-rw-r--r--cesar/mac/sar/src/sar_expiration.c8
3 files changed, 19 insertions, 7 deletions
diff --git a/cesar/mac/common/mfs.h b/cesar/mac/common/mfs.h
index cb401df18c..07fe832e0d 100644
--- a/cesar/mac/common/mfs.h
+++ b/cesar/mac/common/mfs.h
@@ -20,8 +20,10 @@
/** Default encoded RX window size for data (corresponding to 16). */
#define MFS_RX_WINDOW_SIZE_DATA_DEFAULT_ENCODED 0x2
-/** Delay during the one the MFS is still active. */
-#define MFS_ACTIVITY_DELAY_MS 1000
+/** Delay during the one the MFS TX is still active. */
+#define MFS_TX_ACTIVITY_DELAY_MS 1000
+/** Delay during the one the MFS RX is still active. */
+#define MFS_RX_ACTIVITY_DELAY_MS 1500
/** Release timeout. */
#define MFS_RELEASE_DELAY_MS 1000
/** Delay TX PBs have to pass through MAC layer. */
diff --git a/cesar/mac/sar/src/sar.c b/cesar/mac/sar/src/sar.c
index 7849e22ad1..8f61507c31 100644
--- a/cesar/mac/sar/src/sar.c
+++ b/cesar/mac/sar/src/sar.c
@@ -869,11 +869,17 @@ sar_mfs_add (sar_t *ctx, mfs_t *mfs)
{
dbg_assert (ctx);
dbg_assert (mfs);
- mfs->common.expiration_ntb = mac_ntb ()
- + MAC_MS_TO_TCK (MFS_ACTIVITY_DELAY_MS);
- /* Add the MFS to the CA. */
if (mfs->common.tx)
+ {
+ mfs->common.expiration_ntb =
+ mac_ntb () + MAC_MS_TO_TCK (MFS_TX_ACTIVITY_DELAY_MS);
+ /* Add the MFS to the CA. */
ca_mfs_add (ctx->ca, &mfs->tx);
+ }
+ else
+ mfs->common.expiration_ntb =
+ mac_ntb () + MAC_MS_TO_TCK (MFS_RX_ACTIVITY_DELAY_MS);
+
SAR_TRACE (MFS_ADD, mfs);
}
diff --git a/cesar/mac/sar/src/sar_expiration.c b/cesar/mac/sar/src/sar_expiration.c
index d6cc611f66..744f4e88b8 100644
--- a/cesar/mac/sar/src/sar_expiration.c
+++ b/cesar/mac/sar/src/sar_expiration.c
@@ -42,8 +42,12 @@ sar_expiration_mfs_update_ntb (sar_t *ctx, mfs_t *mfs, u32 arrival_ntb)
{
dbg_assert (ctx);
dbg_assert (mfs);
- mfs->common.expiration_ntb = arrival_ntb
- + MAC_MS_TO_TCK (MFS_ACTIVITY_DELAY_MS);
+ if (mfs->common.tx)
+ mfs->common.expiration_ntb = arrival_ntb
+ + MAC_MS_TO_TCK (MFS_TX_ACTIVITY_DELAY_MS);
+ else
+ mfs->common.expiration_ntb = arrival_ntb
+ + MAC_MS_TO_TCK (MFS_RX_ACTIVITY_DELAY_MS);
}
void