summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorCyril Jourdan2013-06-04 17:22:41 +0200
committerCyril Jourdan2013-06-14 15:40:57 +0200
commit7322bb179627ac48e0d4abf768e678a1c27e0b91 (patch)
tree1a56a3aa5bc30e5c9b041201b33a7148e225d9a0 /cesar
parentd956631de58d0203999368de874a9215b48b624f (diff)
cesar/mac/common: backport mac_store_sta_get_noref from EoC, refs #4018
Diffstat (limited to 'cesar')
-rw-r--r--cesar/mac/common/src/store.c9
-rw-r--r--cesar/mac/common/store.h15
2 files changed, 24 insertions, 0 deletions
diff --git a/cesar/mac/common/src/store.c b/cesar/mac/common/src/store.c
index 6705e8c582..4ae58c1290 100644
--- a/cesar/mac/common/src/store.c
+++ b/cesar/mac/common/src/store.c
@@ -613,6 +613,15 @@ mac_store_sta_get_ (mac_store_t *ctx, uint tei __FL)
}
}
+sta_t * ARCH_ILRAM
+mac_store_sta_get_noref_ (mac_store_t *ctx, uint tei __FL)
+{
+ dbg_claim (ctx);
+ dbg_claim (MAC_TEI_IS_STA (tei));
+ mac_store_sta_t *sta = ctx->sta[tei];
+ return sta ? &sta->sta : NULL;
+}
+
void
mac_store_sta_add_ (mac_store_t *ctx, uint tei __FL)
{
diff --git a/cesar/mac/common/store.h b/cesar/mac/common/store.h
index a95d7deb57..c492e8f792 100644
--- a/cesar/mac/common/store.h
+++ b/cesar/mac/common/store.h
@@ -315,6 +315,21 @@ mac_store_sta_get_ (mac_store_t *ctx, uint tei __FL);
#define mac_store_sta_get(args...) mac_store_sta_get_ (args __fL)
/**
+ * Get a STA information structure pointer.
+ * \param ctx store context
+ * \param tei peer terminal equipment id
+ * \return a pointer to the STA information structure or NULL if it
+ * does not exist
+ * \context ISR
+ *
+ * Call is made without additional reference call so time is saved.
+ * /!\ ISR should be locked to call this function.
+ */
+sta_t *
+mac_store_sta_get_noref_ (mac_store_t *ctx, uint tei __FL);
+#define mac_store_sta_get_noref(args...) mac_store_sta_get_noref_ (args __fL)
+
+/**
* Create a new STA information structure.
* \param ctx store context
* \param tei peer terminal equipment id