Max has submitted this change and it was merged.

Change subject: Add function to get max supported MS class
......................................................................


Add function to get max supported MS class

It's useful for allocation tests.

Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8
Related: OS#2282
---
M src/mslot_class.c
M src/mslot_class.h
2 files changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/mslot_class.c b/src/mslot_class.c
index 6d7c09d..19fea3e 100644
--- a/src/mslot_class.c
+++ b/src/mslot_class.c
@@ -82,6 +82,11 @@
        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 f26bd64..9e9dfba 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_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();

-- 
To view, visit https://gerrit.osmocom.org/4955
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8
Gerrit-PatchSet: 3
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>

Reply via email to