summaryrefslogtreecommitdiff
path: root/cesar/mac/common
diff options
context:
space:
mode:
authorMilenko Jelisavcic2012-09-26 13:43:31 +0200
committerMilenko Jelisavcic2012-10-19 10:57:28 +0200
commit499b914e7a8f01cd2e3539695728ffe845836065 (patch)
treed022e0e19fad319fe1330befacddce9afc5bf061 /cesar/mac/common
parent52d71eb998c3cc96091b8c0a21167d97a2f7cf06 (diff)
cesar{common,mac}: define max number of stations
Diffstat (limited to 'cesar/mac/common')
-rw-r--r--cesar/mac/common/src/store.c4
-rw-r--r--cesar/mac/common/test/store/src/test_store.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/cesar/mac/common/src/store.c b/cesar/mac/common/src/store.c
index 9f4634ce8e..f1d85811ea 100644
--- a/cesar/mac/common/src/store.c
+++ b/cesar/mac/common/src/store.c
@@ -10,6 +10,7 @@
* \brief MFS and STA store, store pointers to MFS and STA information.
* \ingroup mac_common
*/
+#include "common/defs/homeplugAV.h"
#include "common/std.h"
#include "mac/common/store.h"
@@ -66,7 +67,7 @@ struct mac_store_t
/** Maximum GLID ever created, used for optimization. */
uint glid_max;
/** Peers, indexed by TEI. */
- mac_store_sta_t *sta[MAC_TEI_STA_MAX + 1];
+ mac_store_sta_t *sta[HPAV_TEI_NB];
/** Unassociated MFS. */
list_t unassociated;
};
@@ -80,6 +81,7 @@ mac_store_init (void)
{
uint i;
dbg_assert (BLK_SIZE == (MAC_LLID_MAX + 1) * sizeof (mfs_t *));
+ dbg_assert (MAC_TEI_STA_MAX < HPAV_TEI_NB);
mac_store_t *ctx = &mac_store_global_context;
for (i = 0; i < COUNT (ctx->bcast_tx_plid); i++)
ctx->bcast_tx_plid[i] = NULL;
diff --git a/cesar/mac/common/test/store/src/test_store.c b/cesar/mac/common/test/store/src/test_store.c
index ea1129f285..143fc40886 100644
--- a/cesar/mac/common/test/store/src/test_store.c
+++ b/cesar/mac/common/test/store/src/test_store.c
@@ -11,6 +11,8 @@
* \ingroup test
*/
#include "common/std.h"
+#include "common/defs/homeplugAV.h"
+
#include "mac/common/store.h"
#include "mac/common/mfs.h"
#include "mac/common/sta.h"
@@ -30,9 +32,9 @@ struct test_store_t
lib_rnd_t rnd[1];
mac_store_t *store;
mfs_t *used_mfs[NB_MFS];
- bool used_mfs_set[2][2][2][MAC_LID_BEACON_MAX + 1][MAC_TEI_STA_MAX + 1];
+ bool used_mfs_set[2][2][2][MAC_LID_BEACON_MAX + 1][HPAV_TEI_NB];
uint used_mfs_nb, used_mfs_max;
- bool used_tei[MAC_TEI_STA_MAX + 1];
+ bool used_tei[HPAV_TEI_NB];
uint used_tei_nb, used_tei_max;
uint travel_mfs_nb, travel_mfs_alias_nb, travel_mfs_unassoc_nb;
};