summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorYacine Belkadi2012-10-01 15:44:18 +0200
committerYacine Belkadi2012-10-18 09:25:42 +0200
commita5f1a99d24f531631582f906446bd796c926df45 (patch)
tree20ba14cc86143c69ceee94bb6c43e42f2a14181d /cesar
parentb2bda9575c46f4aebd19672f184d528f10b239bc (diff)
cesar/cp/sta/action: specialize cp_sta_action_garbage() for AV
Up to now, there was one cp_sta_action_garbage() common to all. This is going to change in next commits. To prepare for that, create a specific AV version.
Diffstat (limited to 'cesar')
-rw-r--r--cesar/cp/av/sta/action/src/action.c9
-rw-r--r--cesar/cp/sta/action/Module2
-rw-r--r--cesar/cp/sta/action/action.h2
-rw-r--r--cesar/cp/sta/action/src/action.c28
-rw-r--r--cesar/cp/sta/core/test/src/action_stub.c2
-rw-r--r--cesar/cp/sta/core/test/src/core_thread.c2
-rw-r--r--cesar/cp/sta/core/test/src/core_timer.c2
7 files changed, 15 insertions, 32 deletions
diff --git a/cesar/cp/av/sta/action/src/action.c b/cesar/cp/av/sta/action/src/action.c
index 2389abb723..b8ee4b3c0e 100644
--- a/cesar/cp/av/sta/action/src/action.c
+++ b/cesar/cp/av/sta/action/src/action.c
@@ -119,3 +119,12 @@ cp_av_sta_action_init (cp_t *ctx)
/* Initialize the STA action poweron module. */
cp_av_sta_action_poweron_init (ctx);
}
+
+void
+cp_av_sta_action_garbage (cp_t *ctx)
+{
+ /* Update local bridge table. */
+ cp_sta_action_update_bridge_table (ctx);
+ /* Update tone map list for CE in TX. */
+ ce_tx_update_tone_map (ctx);
+}
diff --git a/cesar/cp/sta/action/Module b/cesar/cp/sta/action/Module
index 985ddc7409..f1b9a87c9e 100644
--- a/cesar/cp/sta/action/Module
+++ b/cesar/cp/sta/action/Module
@@ -1,2 +1,2 @@
-SOURCES := action.c assoc.c drv.c misc.c poweron.c bridge.c vs.c
+SOURCES := assoc.c drv.c misc.c poweron.c bridge.c vs.c
MODULES := common/defs/mmtypes
diff --git a/cesar/cp/sta/action/action.h b/cesar/cp/sta/action/action.h
index 0ab84b4ae0..d4c2c62f22 100644
--- a/cesar/cp/sta/action/action.h
+++ b/cesar/cp/sta/action/action.h
@@ -49,6 +49,8 @@ cp_sta_action_init (cp_t *ctx);
*
* Request STA manager to remove expired networks or stations.
*/
+#define cp_sta_action_garbage \
+ CP_VARIANT_FUNCTION(sta_action_garbage)
void
cp_sta_action_garbage (cp_t *ctx);
diff --git a/cesar/cp/sta/action/src/action.c b/cesar/cp/sta/action/src/action.c
deleted file mode 100644
index 545c58e7cc..0000000000
--- a/cesar/cp/sta/action/src/action.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Cesar project {{{
- *
- * Copyright (C) 2008 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/sta/action/src/action.c
- * \brief STA action.
- * \ingroup cp_sta_action
- */
-#include "common/std.h"
-
-#include "action.h"
-#include "cp/inc/context.h" // cp_t
-#include "cp/sta/action/bridge.h"
-#include "ce/tx/tx.h"
-#include "cp/fsm/fsm.h"
-
-void
-cp_sta_action_garbage (cp_t *ctx)
-{
- /* Update local bridge table. */
- cp_sta_action_update_bridge_table (ctx);
- /* Update tone map list for CE in TX. */
- ce_tx_update_tone_map (ctx);
-}
diff --git a/cesar/cp/sta/core/test/src/action_stub.c b/cesar/cp/sta/core/test/src/action_stub.c
index 066c0815bf..891ccc84b8 100644
--- a/cesar/cp/sta/core/test/src/action_stub.c
+++ b/cesar/cp/sta/core/test/src/action_stub.c
@@ -17,7 +17,7 @@
#include "cp/sta/action/action.h"
void
-cp_sta_action_garbage (cp_t *ctx)
+cp_utest_sta_action_garbage (cp_t *ctx)
{
}
diff --git a/cesar/cp/sta/core/test/src/core_thread.c b/cesar/cp/sta/core/test/src/core_thread.c
index 0aff7e893b..1ed71fbd61 100644
--- a/cesar/cp/sta/core/test/src/core_thread.c
+++ b/cesar/cp/sta/core/test/src/core_thread.c
@@ -200,7 +200,7 @@ cp_fsm_process_urgent(cp_t *ctx)
}
void
-cp_sta_action_garbage(cp_t *ctx)
+cp_utest_sta_action_garbage(cp_t *ctx)
{
test_action_garbage = true;
}
diff --git a/cesar/cp/sta/core/test/src/core_timer.c b/cesar/cp/sta/core/test/src/core_timer.c
index c75a18bf6e..2f0d8d4a4f 100644
--- a/cesar/cp/sta/core/test/src/core_timer.c
+++ b/cesar/cp/sta/core/test/src/core_timer.c
@@ -104,7 +104,7 @@ cp_cl_interf_process_mme (cp_t *ctx)
}
void
-cp_sta_action_garbage(cp_t *ctx)
+cp_utest_sta_action_garbage(cp_t *ctx)
{
if (garbage_date == 0)
garbage_date = cyg_current_time();