summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
Diffstat (limited to 'cesar')
-rw-r--r--cesar/cp/msg/inc/msg_vs.h3
-rw-r--r--cesar/cp/msg/src/msg_vs.c3
-rw-r--r--cesar/cp/msg/stub/src/msg_vs.c3
-rw-r--r--cesar/cp/sta/action/src/vs.c3
-rw-r--r--cesar/mac/sar/inc/sar_pb_stats.h9
-rw-r--r--cesar/mac/sar/sar_pb_stats.h12
-rw-r--r--cesar/mac/sar/src/sar.c6
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/sar_pb_stats.c33
8 files changed, 47 insertions, 25 deletions
diff --git a/cesar/cp/msg/inc/msg_vs.h b/cesar/cp/msg/inc/msg_vs.h
index eb34620056..6e13c97b24 100644
--- a/cesar/cp/msg/inc/msg_vs.h
+++ b/cesar/cp/msg/inc/msg_vs.h
@@ -254,7 +254,8 @@ cp_msg_vs_get_pb_stats_req_receive (cp_t *ctx, cp_mme_rx_t *mme);
*/
cp_mme_tx_t *
cp_msg_vs_get_pb_stats_cnf_send_begin (cp_t *ctx, cp_mme_peer_t *peer,
- cp_msg_vs_get_pb_stats_cnf_result_t result, uint nb_measures);
+ cp_msg_vs_get_pb_stats_cnf_result_t
+ result, uint nb_measures);
/**
* Send one station info field of VS_GET_PB_STATS.CNF
diff --git a/cesar/cp/msg/src/msg_vs.c b/cesar/cp/msg/src/msg_vs.c
index bbe59d9961..e317dcdb7f 100644
--- a/cesar/cp/msg/src/msg_vs.c
+++ b/cesar/cp/msg/src/msg_vs.c
@@ -844,7 +844,8 @@ cp_msg_vs_get_pb_stats_req_receive (cp_t *ctx, cp_mme_rx_t *mme)
cp_mme_tx_t *
cp_msg_vs_get_pb_stats_cnf_send_begin (cp_t *ctx, cp_mme_peer_t *peer,
- cp_msg_vs_get_pb_stats_cnf_result_t result, uint nb_measures)
+ cp_msg_vs_get_pb_stats_cnf_result_t
+ result, uint nb_measures)
{
cp_mme_tx_t * mme;
uint mme_payload_length;
diff --git a/cesar/cp/msg/stub/src/msg_vs.c b/cesar/cp/msg/stub/src/msg_vs.c
index 10174a25f6..e834dfdc3d 100644
--- a/cesar/cp/msg/stub/src/msg_vs.c
+++ b/cesar/cp/msg/stub/src/msg_vs.c
@@ -227,7 +227,8 @@ cp_msg_vs_get_pb_stats_cnf_send_begin (cp_t *ctx, cp_mme_peer_t *peer,
cp_mme_tx_t *
cp_msg_vs_get_pb_stats_cnf_send_begin (cp_t *ctx, cp_mme_peer_t *peer,
- cp_msg_vs_get_pb_stats_cnf_result_t result, uint nb_measures)
+ cp_msg_vs_get_pb_stats_cnf_result_t
+ result, uint nb_measures)
{
return NULL;
}
diff --git a/cesar/cp/sta/action/src/vs.c b/cesar/cp/sta/action/src/vs.c
index f103a2975f..68166dd25c 100644
--- a/cesar/cp/sta/action/src/vs.c
+++ b/cesar/cp/sta/action/src/vs.c
@@ -628,7 +628,8 @@ cp_sta_action_vs__started__vs_get_pb_stats_req (cp_t *ctx, cp_mme_rx_t *mme)
ctx, &mme->peer, result, nb_measures);
if (result == CP_MSG_VS_GET_PB_STATS_CNF_RESULT_SUCCESS)
- cp_msg_vs_get_pb_stats_cnf_send_measure (ctx, mme_tx, index, nb_measures);
+ cp_msg_vs_get_pb_stats_cnf_send_measure (ctx, mme_tx, index,
+ nb_measures);
cp_msg_vs_get_pb_stats_cnf_send_end (ctx, mme_tx);
sar_read_pb_stats_end (ctx->sar);
diff --git a/cesar/mac/sar/inc/sar_pb_stats.h b/cesar/mac/sar/inc/sar_pb_stats.h
index f1aa05a9d6..d1c9766eb1 100644
--- a/cesar/mac/sar/inc/sar_pb_stats.h
+++ b/cesar/mac/sar/inc/sar_pb_stats.h
@@ -112,8 +112,10 @@ sar_pb_stats_eof_mpdu (sar_pb_stats_t *ctx)
/**
* Function which return the start index and the amount of line to read.
* \param ctx the SAR pb stats ctx.
- * \param *index pointor which contain the first entry index to read in the pb stats table
- * \param *amount pointor which contain the amount of entry to read in the pb stats table.
+ * \param *index pointor which contain the first entry index to read in
+ * the pb stats table
+ * \param *amount pointor which contain the amount of entry to read in
+ * the pb stats table.
* \return zero on success
*/
int
@@ -126,7 +128,8 @@ sar_pb_stats_read_start (sar_pb_stats_t *ctx, uint *index, uint *amount);
* \param *data copy address destination
*/
void
-sar_pb_stats_read_entry (sar_pb_stats_t *ctx, uint index, sar_pb_stats_entry_t *data);
+sar_pb_stats_read_entry (sar_pb_stats_t *ctx, uint index,
+ sar_pb_stats_entry_t *data);
/**
* Indicate the end of the reading operation
diff --git a/cesar/mac/sar/sar_pb_stats.h b/cesar/mac/sar/sar_pb_stats.h
index 9546dc313f..acb94397da 100644
--- a/cesar/mac/sar/sar_pb_stats.h
+++ b/cesar/mac/sar/sar_pb_stats.h
@@ -43,17 +43,20 @@ typedef struct sar_pb_stats_entry_t sar_pb_stats_entry_t;
BEGIN_DECLS
/**
- * Bridge function which will call sar_pb_stats function if this last have been compiled.
+ * Bridge function which will call sar_pb_stats function if this last have
+ * been compiled.
* \param ctx the SAR pb stats ctx.
* \param *index pointor to the first entry to read in the pb stats table
- * \param *amount pointor which return the amount of entry to read in the pb stats table.
+ * \param *amount pointor which return the amount of entry to read in the
+ * pb stats table.
* \return zero on success
*/
int
sar_read_pb_stats_begin (sar_t *ctx, uint *index, uint *amount);
/**
- * Bridge function which will call sar_pb_stats function if this last have been compiled.
+ * Bridge function which will call sar_pb_stats function if this last have
+ * been compiled.
* \param ctx the SAR pb stats ctx.
* \param index index requested to be read in pb stats table
* \param *data copy destination
@@ -62,7 +65,8 @@ void
sar_read_pb_stats_entry (sar_t *ctx, uint index, sar_pb_stats_entry_t *data);
/**
- * Bridge function which will call sar_pb_stats function if this last have been compiled.
+ * Bridge function which will call sar_pb_stats function if this last have
+ * been compiled.
* \param ctx the SAR pb stats ctx.
*/
void
diff --git a/cesar/mac/sar/src/sar.c b/cesar/mac/sar/src/sar.c
index 2f02e3c540..6406244f68 100644
--- a/cesar/mac/sar/src/sar.c
+++ b/cesar/mac/sar/src/sar.c
@@ -508,8 +508,8 @@ sar_init (mac_store_t *mac_store, pbproc_t *pbproc, ca_t *ca, u32 seed)
/* pbproc */
sar_global.pbproc_ctx = pbproc;
pbproc_init_cb (pbproc, &sar_global, sar_mpdu_add, sar_beacon_add);
- /* Init the bridgedma context by giving the functions to call back when a */
- /* job had been bridge. */
+ /* Init the bridgedma context by giving the functions to call back when
+ * a job had been bridge. */
sar_global.bridgedma_ctx = phy_bridgedma_init (&sar_global,
NULL, NULL);
/* Fill the PBPOOL */
@@ -529,7 +529,7 @@ sar_init (mac_store_t *mac_store, pbproc_t *pbproc, ca_t *ca, u32 seed)
lib_rnd_init (&ctx->rnd_gen, seed ^ 0x19257164);
/* Resume the thread only if the SAR is not in unit test. */
#ifndef SAR_UNIT_TEST
- /* Create the Thread for the SAR. */
+ /* Create the Thread for the SAR. */
cyg_thread_create (MAC_SAR_THREAD_PRIORITY,
&sar_process,
(cyg_addrword_t) ctx,
diff --git a/cesar/mac/sar/test/unit_test/ecos/src/sar_pb_stats.c b/cesar/mac/sar/test/unit_test/ecos/src/sar_pb_stats.c
index 79c65b0000..3284d1a28d 100644
--- a/cesar/mac/sar/test/unit_test/ecos/src/sar_pb_stats.c
+++ b/cesar/mac/sar/test/unit_test/ecos/src/sar_pb_stats.c
@@ -71,7 +71,8 @@ test_case_recording_stats (test_t test)
for (iteration=0; iteration<ENTRY_X; iteration++)
{
u8 nb_pb = (iteration % (MAC_MAX_PB_PER_MPDU -1)) + 1;
- int index = (iteration + (PB_STATS_NB_ENTRY -1)) % PB_STATS_NB_ENTRY;
+ int index = (iteration + (PB_STATS_NB_ENTRY -1)) %
+ PB_STATS_NB_ENTRY;
sar_test_create_mpdu (&mpdu,
nb_pb,
@@ -89,7 +90,8 @@ test_case_recording_stats (test_t test)
blk_release (mpdu.rx.mfs);
test_fail_unless (t.sar->pb_stats.write_index == iteration);
- test_fail_unless (t.sar->pb_stats.amount_to_read == (PB_STATS_NB_ENTRY-1));
+ test_fail_unless (t.sar->pb_stats.amount_to_read ==
+ (PB_STATS_NB_ENTRY-1));
test_fail_unless (t.sar->pb_stats.amount_read == 0);
test_fail_unless (t.sar->pb_stats.current_pb == nb_pb);
test_fail_unless (t.sar->pb_stats.table[index].pb_nb == nb_pb);
@@ -125,18 +127,21 @@ test_case_recording_stats (test_t test)
test_fail_unless (t.sar->pb_stats.write_index == ENTRY_X);
test_fail_unless (t.sar->pb_stats.current_pb == NB_PB_2);
- test_fail_unless (t.sar->pb_stats.table[ENTRY_X-1].pb_nb == NB_PB_2);
+ test_fail_unless (t.sar->pb_stats.table[ENTRY_X-1].pb_nb ==
+ NB_PB_2);
/* Check status recorded in the table */
for (i=0; i<PB_STATS_BITMAP_SIZE; i++)
- test_fail_unless (t.sar->pb_stats.table[ENTRY_X-1].pb_bitmap[i] == check[i]);
+ test_fail_unless (t.sar->pb_stats.table[ENTRY_X-1].pb_bitmap[i]
+ == check[i]);
while (mpdu.rx.mfs->rx.head)
mpdu.rx.mfs->rx.head = sar_pb_release (
mpdu.rx.mfs->rx.head);
mac_store_mfs_remove (t.mac_store, mpdu.rx.mfs);
- dbg_check (mac_store_sta_remove (t.mac_store, mpdu.rx.params.tei));
+ dbg_check (mac_store_sta_remove (t.mac_store,
+ mpdu.rx.params.tei));
blk_release (mpdu.rx.mfs);
}
sar_cleanup (t.sar);
@@ -174,11 +179,13 @@ test_case_reading_stats (test_t test)
mpdu.rx.mfs->rx.head = sar_pb_release (
mpdu.rx.mfs->rx.head);
mac_store_mfs_remove (t.mac_store, mpdu.rx.mfs);
- dbg_check (mac_store_sta_remove (t.mac_store, mpdu.rx.params.tei));
+ dbg_check (mac_store_sta_remove (t.mac_store,
+ mpdu.rx.params.tei));
blk_release (mpdu.rx.mfs);
}
- test_fail_unless (sar_read_pb_stats_begin (t.sar, &read_index, &nb_to_read) == 0);
+ test_fail_unless (sar_read_pb_stats_begin (t.sar, &read_index,
+ &nb_to_read) == 0);
test_fail_unless (read_index == 0);
test_fail_unless (nb_to_read == ENTRY_X);
@@ -227,15 +234,18 @@ test_case_reading_stats (test_t test)
mpdu.rx.mfs->rx.head);
mac_store_mfs_remove (t.mac_store, mpdu.rx.mfs);
blk_release (mpdu.rx.mfs);
- dbg_check (mac_store_sta_remove (t.mac_store, mpdu.rx.params.tei));
+ dbg_check (mac_store_sta_remove (t.mac_store,
+ mpdu.rx.params.tei));
test_fail_unless (t.sar->pb_stats.control_reg == 0);
test_fail_unless (t.sar->pb_stats.write_index == iteration + 1);
}
- test_fail_unless (sar_read_pb_stats_begin (t.sar, &read_index, &nb_to_read) == 0);
+ test_fail_unless (sar_read_pb_stats_begin (t.sar, &read_index,
+ &nb_to_read) == 0);
test_fail_unless (read_index == 0);
test_fail_unless (nb_to_read == ENTRY_X);
- test_fail_unless (t.sar->pb_stats.control_reg == PB_STATS__READ_IN_PROGRESS);
+ test_fail_unless (t.sar->pb_stats.control_reg ==
+ PB_STATS__READ_IN_PROGRESS);
test_fail_unless (t.sar->pb_stats.write_index == ENTRY_X);
sar_test_create_mpdu (&mpdu, 8, /* nb_pb */
@@ -249,7 +259,8 @@ test_case_reading_stats (test_t test)
blk_release (mpdu.rx.mfs);
dbg_check (mac_store_sta_remove (t.mac_store, mpdu.rx.params.tei));
- test_fail_unless (t.sar->pb_stats.control_reg == PB_STATS__READ_IN_PROGRESS);
+ test_fail_unless (t.sar->pb_stats.control_reg ==
+ PB_STATS__READ_IN_PROGRESS);
test_fail_unless (t.sar->pb_stats.write_index == ENTRY_X);
sar_read_pb_stats_end (t.sar);
test_fail_unless (t.sar->pb_stats.control_reg == 0);