summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cl/src/cl.c11
-rw-r--r--cl/test/Makefile2
-rw-r--r--cl/test/overide/mac/sar/src/sar.c1
-rw-r--r--cl/test/src/cl_mme_send_as_mme.c2
-rw-r--r--cl/test/src/cl_recv_data.c1
-rw-r--r--cl/test/src/cl_send_data.c6
-rw-r--r--test_general/integration/hle-cl-sar-pbproc/maximus_log2
-rw-r--r--test_general/integration/hle-cl-sar-pbproc/src/Maximus.py39
-rw-r--r--test_general/integration/hle-cl-sar-pbproc/src/hle-cl-sar-pbproc.c1
-rw-r--r--test_general/station/src/int_station.c15
10 files changed, 34 insertions, 46 deletions
diff --git a/cl/src/cl.c b/cl/src/cl.c
index 470781cb65..e04dcabf28 100644
--- a/cl/src/cl.c
+++ b/cl/src/cl.c
@@ -496,6 +496,9 @@ void cl_data_send (cl_t *cl, u8 *buffer, uint length)
if (!drop && !acs && mfs)
{
sar_msdu_add (cl->sar, buffer, length, sar_get_ntb(cl->sar), mfs);
+
+ /* release the mfs */
+ blk_release (mfs);
}
}
else
@@ -566,14 +569,6 @@ void cl_data_recv (void *ctx, u8 *buffer, uint length, mfs_rx_t *mfs)
dbg_assert (length >= 64 && length <= 1518);
dbg_assert (mfs);
- /*
- * author nelio
- * 25 oct. 07 - 13:03:48
- *
- * release the mfs until no data from the HLE is requested
- */
- blk_release (mfs);
-
cl = (cl_t *) ctx;
dbg_assert (cl->data_rx.cb);
diff --git a/cl/test/Makefile b/cl/test/Makefile
index e748bfdfb5..1f29559559 100644
--- a/cl/test/Makefile
+++ b/cl/test/Makefile
@@ -1,7 +1,5 @@
BASE = ../..
-COV = y
-
INCLUDES = cl/test/overide
HOST_PROGRAMS = cl_mactotei_api cl_mactotei_heapsort cl_mactotei_find \
diff --git a/cl/test/overide/mac/sar/src/sar.c b/cl/test/overide/mac/sar/src/sar.c
index 4c6f835191..71e84f28ae 100644
--- a/cl/test/overide/mac/sar/src/sar.c
+++ b/cl/test/overide/mac/sar/src/sar.c
@@ -39,7 +39,6 @@ bool sar_msdu_add (sar_t *sar_ctx, u8* buffer, u16 length,
dbg_assert (sar_ctx);
dbg_assert (mfs);
- blk_release (mfs);
if (mfs->common.mme)
{
diff --git a/cl/test/src/cl_mme_send_as_mme.c b/cl/test/src/cl_mme_send_as_mme.c
index 6194588f4d..d2146348df 100644
--- a/cl/test/src/cl_mme_send_as_mme.c
+++ b/cl/test/src/cl_mme_send_as_mme.c
@@ -68,7 +68,9 @@ int main (void)
}
test_end;
+
mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
+ blk_release (mfs);
added = mac_store_sta_remove (mac_store, 1);
dbg_assert (added);
mac_store_uninit (mac_store);
diff --git a/cl/test/src/cl_recv_data.c b/cl/test/src/cl_recv_data.c
index 2c6b180732..05c9de5c0a 100644
--- a/cl/test/src/cl_recv_data.c
+++ b/cl/test/src/cl_recv_data.c
@@ -62,6 +62,7 @@ int main (void)
cl_uninit (cl);
mac_store_uninit (mac_store);
blk_release (mac_config);
+ blk_release (mfs);
pbproc_uninit (pbproc);
sar_uninit (sar);
diff --git a/cl/test/src/cl_send_data.c b/cl/test/src/cl_send_data.c
index 0a93c0d6c6..907392db00 100644
--- a/cl/test/src/cl_send_data.c
+++ b/cl/test/src/cl_send_data.c
@@ -100,15 +100,17 @@ int main (void)
cl_uninit (cl);
+
mfs = mac_store_mfs_get_tx (mac_store, false, false, 1, 2);
+ dbg_assert (mfs);
mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
blk_release (mfs);
- blk_release (mfs);
mfs = mac_store_mfs_get_tx (mac_store, true, false, 1, 0xff);
+ dbg_assert (mfs);
mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
blk_release (mfs);
- blk_release (mfs);
+
added = mac_store_sta_remove (mac_store, 2);
mac_store_uninit (mac_store);
diff --git a/test_general/integration/hle-cl-sar-pbproc/maximus_log b/test_general/integration/hle-cl-sar-pbproc/maximus_log
index 1d66cdebf9..f04ea94bd8 100644
--- a/test_general/integration/hle-cl-sar-pbproc/maximus_log
+++ b/test_general/integration/hle-cl-sar-pbproc/maximus_log
@@ -1 +1 @@
-Maximus(1000000): *** Exit Fulminata Maximus simulator ***
+Maximus(1001000): *** Exit Fulminata Maximus simulator ***
diff --git a/test_general/integration/hle-cl-sar-pbproc/src/Maximus.py b/test_general/integration/hle-cl-sar-pbproc/src/Maximus.py
index d26850d115..c6ebd7f173 100644
--- a/test_general/integration/hle-cl-sar-pbproc/src/Maximus.py
+++ b/test_general/integration/hle-cl-sar-pbproc/src/Maximus.py
@@ -12,7 +12,7 @@ maximus.init (sys.argv)
# TEI of station 1 will be 1
station1 = maximus.create_sta()
-station1.debug()
+#station1.debug()
# TEI of station 2 will be 2
station2 = maximus.create_sta()
@@ -58,15 +58,6 @@ fc1.add_param_ushort ("lid", 1)
fc1.add_param_ushort ("tei", 2)
fc1.send()
-fc2 = maximus.create_fcall ("fc_station_link_add")
-fc2.set_sta (station2)
-fc2.add_param_ushort ("type", 0)
-fc2.add_param_ushort ("bcast", 0)
-fc2.add_param_ushort ("mme", 0)
-fc2.add_param_ushort ("lid", 1)
-fc2.add_param_ushort ("tei", 1)
-fc2.send()
-
fc1 = maximus.create_fcall ("fc_station_link_add")
fc1.set_sta (station1)
fc1.add_param_ushort ("type", 1)
@@ -80,6 +71,15 @@ fc2 = maximus.create_fcall ("fc_station_link_add")
fc2.set_sta (station2)
fc2.add_param_ushort ("type", 0)
fc2.add_param_ushort ("bcast", 0)
+fc2.add_param_ushort ("mme", 0)
+fc2.add_param_ushort ("lid", 1)
+fc2.add_param_ushort ("tei", 1)
+fc2.send()
+
+fc2 = maximus.create_fcall ("fc_station_link_add")
+fc2.set_sta (station2)
+fc2.add_param_ushort ("type", 0)
+fc2.add_param_ushort ("bcast", 0)
fc2.add_param_ushort ("mme", 1)
fc2.add_param_ushort ("lid", 248)
fc2.add_param_ushort ("tei", 1)
@@ -131,25 +131,14 @@ maximus.wait (1000000)
while not station1.is_idle() and not station2.is_idle() :
maximus.wait(10000)
-fc1 = maximus.create_fcall ("fc_station_link_remove")
+maximus.wait(1000)
+fc1 = maximus.create_fcall ("fc_station_uninit")
fc1.set_sta (station1)
-fc1.add_param_ushort ("type", 1)
-fc1.add_param_ushort ("bcast", 0)
-fc1.add_param_ushort ("mme", 0)
-fc1.add_param_ushort ("lid", 1)
-fc1.add_param_ushort ("tei", 2)
fc1.send()
-fc2 = maximus.create_fcall ("fc_station_link_remove")
+fc2 = maximus.create_fcall ("fc_station_uninit")
fc2.set_sta (station2)
-fc2.add_param_ushort ("type", 0)
-fc2.add_param_ushort ("bcast", 0)
-fc2.add_param_ushort ("mme", 0)
-fc2.add_param_ushort ("lid", 1)
-fc2.add_param_ushort ("tei", 1)
fc2.send()
-
-#maximus.wait(1000)
-station1.remove()
+#station1.remove()
station2.remove() \ No newline at end of file
diff --git a/test_general/integration/hle-cl-sar-pbproc/src/hle-cl-sar-pbproc.c b/test_general/integration/hle-cl-sar-pbproc/src/hle-cl-sar-pbproc.c
index 37dc76567f..1eceadbf4f 100644
--- a/test_general/integration/hle-cl-sar-pbproc/src/hle-cl-sar-pbproc.c
+++ b/test_general/integration/hle-cl-sar-pbproc/src/hle-cl-sar-pbproc.c
@@ -18,6 +18,7 @@
#include "lib/test.h"
#include "lib/read_word.h"
+#include "lib/restrack.h"
#include "mac/sar/sar.h"
#include "cl/cl.h"
diff --git a/test_general/station/src/int_station.c b/test_general/station/src/int_station.c
index e7c9dd1255..b36899ad76 100644
--- a/test_general/station/src/int_station.c
+++ b/test_general/station/src/int_station.c
@@ -51,8 +51,8 @@ int_station_t *int_station_init (void)
int_sta_global.cl
= cl_init (int_sta_global.mac_store, int_sta_global.sar);
-
- int_sta_global.hle = hle_init(int_sta_global.cl);
+
+ int_sta_global.hle = hle_init (int_sta_global.cl);
// Create the Thread for the SAR.
cyg_thread_create (9, &sar_process, (cyg_addrword_t) int_sta_global.sar,
@@ -85,10 +85,11 @@ void int_station_uninit (int_station_t *ctx)
dbg_assert (ctx->hle);
pbproc_activate (ctx->pbproc, false);
+
pbproc_uninit (ctx->pbproc);
sar_uninit (ctx->sar);
cl_uninit (ctx->cl);
- hle_uninit(ctx->hle);
+ hle_uninit (ctx->hle);
blk_release (ctx->mac_config);
@@ -246,12 +247,12 @@ void int_station_link_remove (int_station_t *ctx, uint type, uint bcast,
mfs->rx.head = mfs->rx.head->next;
blk_release_desc ((blk_t *) pb);
}
- }
- // remove the MFS from the sar
- sar_mfs_remove (ctx->sar, mfs);
+ // remove the MFS from the sar
+ sar_mfs_remove (ctx->sar, mfs);
- blk_release (mfs);
+ blk_release (mfs);
+ }
}
/**