summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorOlivier Dufour2013-06-11 10:56:49 +0200
committerOlivier Dufour2013-06-14 14:46:14 +0200
commitaeedd73e01c16778be05e458d77f3a1c7118bea7 (patch)
treec255667889a99119ffe471ae2694e6ac1e46167a /cesar
parent99e3aeb9be22447b377db8b9ed4583461f54617d (diff)
cesar/{cl,cp}: refactor declaration with config items, refs #4044
Diffstat (limited to 'cesar')
-rw-r--r--cesar/cl/src/send_data.c2
-rw-r--r--cesar/cp/eoc/multi_sta/action/src/multi_sta_action.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/cesar/cl/src/send_data.c b/cesar/cl/src/send_data.c
index 8a432e9e7d..dd6fd72b1f 100644
--- a/cesar/cl/src/send_data.c
+++ b/cesar/cl/src/send_data.c
@@ -225,7 +225,6 @@ cl_data_send_prepare (cl_t *ctx, u8 *buffer, uint length, uint tag,
/* Get the TEI from the mactotei table. */
uint tei;
- uint group = 0;
#if CONFIG_CL_EOC_ROUTE
/* For STA, if tei is unassociated, or MAC limit is reached
* drop the packet */
@@ -245,6 +244,7 @@ cl_data_send_prepare (cl_t *ctx, u8 *buffer, uint length, uint tag,
else
tei = cl_eoc_mactotei_find_tei (ctx, dmac);
#else
+ uint group = 0;
tei = cl_mactotei_table_find_tei_and_tag_from_mac (ctx, dmac, &group);
#endif
dbg_assert (tei != ctx->mac_config->tei);
diff --git a/cesar/cp/eoc/multi_sta/action/src/multi_sta_action.c b/cesar/cp/eoc/multi_sta/action/src/multi_sta_action.c
index 8430c2e219..1fd85ca269 100644
--- a/cesar/cp/eoc/multi_sta/action/src/multi_sta_action.c
+++ b/cesar/cp/eoc/multi_sta/action/src/multi_sta_action.c
@@ -57,8 +57,6 @@ cp_eoc_multi_sta_action__assoc_req_common (cp_t *ctx, cp_mme_rx_t *mme)
dbg_assert (ctx);
dbg_assert (mme);
- cp_sta_own_data_t *own = cp_sta_mgr_get_sta_own_data (ctx);
-
/* Add the station to the AVLN. */
net = cp_sta_mgr_get_our_avln (ctx);
@@ -68,6 +66,8 @@ cp_eoc_multi_sta_action__assoc_req_common (cp_t *ctx, cp_mme_rx_t *mme)
sta = cp_sta_mgr_sta_get_from_mac (ctx, mme->peer.mac);
#if CONFIG_CP_EOC_MULTI_STA_WL_ALLOWED
+ cp_sta_own_data_t *own = cp_sta_mgr_get_sta_own_data (ctx);
+
/* The station already exists get the TEI. */
if (sta)
tei = cp_sta_get_tei (sta);