summaryrefslogtreecommitdiff
path: root/cesar/bsu
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/bsu')
-rw-r--r--cesar/bsu/aclf/aclf.h4
-rw-r--r--cesar/bsu/aclf/src/aclf.c15
2 files changed, 1 insertions, 18 deletions
diff --git a/cesar/bsu/aclf/aclf.h b/cesar/bsu/aclf/aclf.h
index 3574ab5771..f1e92315aa 100644
--- a/cesar/bsu/aclf/aclf.h
+++ b/cesar/bsu/aclf/aclf.h
@@ -93,10 +93,6 @@ struct bsu_aclf_t
* Last zero_cross read in PRATIC register.
*/
u32 zero_cross_last_date;
- /** count number of Power Line synchronisation. */
- u32 pwl_sync_nb;
- /** Use the weight to compute the beacon period (shift value). */
- uint pwl_sync_weight;
};
typedef struct bsu_aclf_t bsu_aclf_t;
diff --git a/cesar/bsu/aclf/src/aclf.c b/cesar/bsu/aclf/src/aclf.c
index ece831093c..a5d2b7bb0a 100644
--- a/cesar/bsu/aclf/src/aclf.c
+++ b/cesar/bsu/aclf/src/aclf.c
@@ -27,11 +27,6 @@
= BSU_ACLF_BP_ ## freq ## HZ_TCK; \
} while (0)
-/** WP History coefficient value fast i.e. 1/2^4. */
-#define BSU_ACLF_WP_FAST 4
-/** WP History coefficient value slow i.e. 1/2^8. */
-#define BSU_ACLF_WP_SLOW 8
-
/** Local variable. */
static bsu_aclf_t bsu_aclf_global;
@@ -82,14 +77,10 @@ bsu_aclf_compute_beacon_period_from_acl (bsu_aclf_t *ctx)
(zc_diff_tck + zc_interval_tck / 2) / zc_interval_tck;
uint bp_tck = 2 * zc_diff_tck / zc_nb;
ctx->beacon_period_tck +=
- ((int)bp_tck - (int)ctx->beacon_period_tck)
- >> ctx->pwl_sync_weight;
+ ((int)bp_tck - (int)ctx->beacon_period_tck) >> 4;
bsu_aclf_truncate_beacon_period (ctx);
/* Store the last zero crossing date. */
ctx->zero_cross_last_date = zero_cross_date;
- ctx->pwl_sync_nb++;
- if (ctx->pwl_sync_nb == CONFIG_ACLF_SYNC_TO_SLOWER_WEIGHT_NB)
- ctx->pwl_sync_weight = BSU_ACLF_WP_SLOW;
}
}
@@ -200,8 +191,6 @@ bsu_aclf_clear (bsu_aclf_t *ctx)
for (i = 0; i < COUNT (ctx->bto); i++)
ctx->bto[i] = 0;
ctx->zero_cross_last_date = 0;
- ctx->pwl_sync_nb = 0;
- ctx->pwl_sync_weight = BSU_ACLF_WP_FAST;
}
/**
@@ -230,8 +219,6 @@ bsu_aclf_init (phy_t *phy, mac_config_t *mac_config)
memset (ctx, 0, sizeof (bsu_aclf_t));
ctx->phy = phy;
ctx->mac_config = mac_config;
- ctx->pwl_sync_nb = 0;
- ctx->pwl_sync_weight = BSU_ACLF_WP_FAST;
bsu_aclf_stats_init (ctx);
return ctx;
}