summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaranjeiro2007-10-12 14:07:33 +0000
committerlaranjeiro2007-10-12 14:07:33 +0000
commit6676ceb194aee5c2da85aa5286cd32f23eb164f4 (patch)
tree6715fdf3f53e4ab00e0eddba7244627b01c2b930
parentba635ec6e885212ec24acf2496ef3681a5ceab0b (diff)
Removed unused functions for the SAR unit tests.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@829 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--mac/sar/test/src/sar_unit_test_functions.c160
1 files changed, 0 insertions, 160 deletions
diff --git a/mac/sar/test/src/sar_unit_test_functions.c b/mac/sar/test/src/sar_unit_test_functions.c
index b5c06066b9..72ea485174 100644
--- a/mac/sar/test/src/sar_unit_test_functions.c
+++ b/mac/sar/test/src/sar_unit_test_functions.c
@@ -14,90 +14,6 @@
#include "common/std.h"
#include "mac/sar/test/inc/sar_unit_test_functions.h"
-test_t test;
-
-mac_store_t * init_mac_store (void)
-{
- mac_store_t *store;
- mfs_rx_t *mfs_rx;
- mfs_tx_t *mfs_tx;
- bool added;
-
- store = mac_store_init ();
-
- //add a STA
- mac_store_sta_add (store, 0x1);
-
- mfs_rx = mac_store_mfs_add_rx (store, false, false, 0x01, 0x1, &added);
- dbg_assert (added);
-
- mfs_rx = mac_store_mfs_add_rx (store, false, false, 0x02, 0x1, &added);
- dbg_assert (added);
-
- mfs_rx = mac_store_mfs_add_rx (store, false, false, 0x03, 0x1, &added);
- dbg_assert (added);
-
- mfs_rx = mac_store_mfs_add_rx (store, false, true, MAC_LID_NONE, 0x1,
- &added);
- dbg_assert (added);
-
- mfs_tx = mac_store_mfs_add_tx (store, false, false, 0x01, 0x1, &added);
- dbg_assert (added);
-
- mfs_tx = mac_store_mfs_add_tx (store, false, false, 0x02, 0x1, &added);
- dbg_assert (added);
-
- mfs_tx = mac_store_mfs_add_tx (store, false, false, 0x03, 0x1, &added);
- dbg_assert (added);
-
- mfs_tx = mac_store_mfs_add_tx (store, false, true, MAC_LID_NONE, 0x1,
- &added);
- dbg_assert (added);
-
- return store;
-}
-
-/**
- * Launch the Bridge DMA and simulate the iterruption of it.
- */
-void sar_unit_test_bridge_dma_process_done (void)
-{
- bridge_dma_interruption (NULL, 0);
-}
-
-/**
- * Add a job to the bridge_dma
- */
-void sar_unit_test_bridge_dma_add_job (void)
-{
- rx_upper_layer_transmit_data (&sar_ctx.data_ctx);
-}
-
-/**
- */
-void sar_unit_test_bridge_dma_add_job_print_debug (void)
-{
- sar_job_mfs_t * job;
-
- printf ("*********** SAR UNIT TEST MFS RX PROCESS ***************\n");
- if ((job = bridge_dma_get_head (&sar_ctx.data_ctx.jobs_pending_list)))
- {
- printf ("JOB data len : %d\n", job->job.data_len);
- }
- else
- {
- printf ("No more job in buffer\n");
- }
-
- printf ("jobs in the bridge list\n");
- while ((job = bridge_dma_get_head (&sar_ctx.bridge_dma_jobs)))
- {
- printf ("JOB data len : %d\n", job->job.data_len);
- }
-
- printf ("*********** END OF SAR UNIT MFS MPDU RX PROCESS ***************\n");
-}
-
/** TODO REMOVE THIS FUNCTIONS **/
/**
@@ -126,79 +42,3 @@ void pbproc_rx_segment_refill (pbproc_t *ctx, pb_t *first, pb_t *last, uint nb)
{
pb_free_range(first);
}
-
-/**
- * Implementation of the sar_segmentation_done_cb_t call back.
- * Only used in this test.
- *
- * \param user User data
- * \param buffer the buffer address
- * \param length the length of the data copied by the bridge
- */
-void sar_complete_segmentation_done (void *user, u8 *buffer, u16 length)
-{
-
-}
-
-/**
- * Implementation of the sar_reassembly_done_cb_t call back.
- * Only used in this test.
- *
- * \param user User data
- * \param buffer the buffer address
- * \param length the length of the data copied
- */
-void sar_complete_reassembly_done (void *user, u8* buffer, u16 length)
-{
-
-}
-
-u16 mix_pb_list (mfs_tx_t *mfs, pb_t **first, pb_t **last)
-{
- pb_t *list[100];
- u16 size;
- pb_t *head;
- pb_t *tmp;
- lib_rnd_t rnd_ctx1;
- lib_rnd_t rnd_ctx2;
- int i;
- u16 slot1;
- u16 slot2;
-
- lib_rnd_init (&rnd_ctx1, 123456);
- lib_rnd_init (&rnd_ctx2, 234567);
-
- //count the quantity of PBs.
- for (size = 0, head = mfs->head; head != NULL; head = head->next, size++)
- {
- list[size] = head;
- }
- list[size] = NULL;
-
- // randomize the list
- for (i = 0; i < size; i++)
- {
- slot1 = lib_rnd32 (&rnd_ctx1) % size;
- slot2 = lib_rnd32 (&rnd_ctx2) % size;
-
- tmp = list[slot1];
- list[slot1] = list[slot2];
- list[slot2] = tmp;
- }
-
- //Chain the PB list
- for (i = 0; i < size - 1; i++)
- {
- list[i]->next = list[i+1];
- }
-
- *first = list[0];
- *last = list[size - 1];
- list[size - 1]->next = NULL;
-
- //remove the data from the mfs.
- mfs->head = NULL;
- mfs->tail = NULL;
-
- return size;
-}