aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-11-21 13:01:19 +0100
committerMax <msuraev@sysmocom.de>2017-12-21 15:13:25 +0100
commit327e121a0f2b1e816cc59d1337e6f2034553f2b8 (patch)
tree23397c42a3d47ce86f1cfacb2e8feddaebc440a8 /src
parent1714aeaa675e129736d53fecf8ff91f54c87446a (diff)
Add function to get max supported MS class
It's useful for allocation tests. Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Related: OS#2282
Diffstat (limited to 'src')
-rw-r--r--src/mslot_class.c5
-rw-r--r--src/mslot_class.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mslot_class.c b/src/mslot_class.c
index 6d7c09d6..19fea3ed 100644
--- a/src/mslot_class.c
+++ b/src/mslot_class.c
@@ -82,6 +82,11 @@ static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_c
return &gprs_ms_multislot_class[index];
}
+uint8_t mslot_class_max()
+{
+ return ARRAY_SIZE(gprs_ms_multislot_class);
+}
+
uint8_t mslot_class_get_ta(uint8_t ms_cl)
{
return get_mslot_table(ms_cl)->ta;
diff --git a/src/mslot_class.h b/src/mslot_class.h
index f26bd647..9e9dfba5 100644
--- a/src/mslot_class.h
+++ b/src/mslot_class.h
@@ -28,7 +28,7 @@
/* 3GPP TS 05.02 Annex B.1 */
-#define MS_NA 255 /* N/A *///
+#define MS_NA 255 /* N/A */
#define MS_A 254 /* 1 with hopping, 0 without */
#define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/
#define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/
@@ -44,3 +44,4 @@ uint8_t mslot_class_get_tx(uint8_t ms_cl);
uint8_t mslot_class_get_rx(uint8_t ms_cl);
uint8_t mslot_class_get_sum(uint8_t ms_cl);
uint8_t mslot_class_get_type(uint8_t ms_cl);
+uint8_t mslot_class_max();