[MERGED] openbsc[master]: move ts_sublots() to gsm_data_shared.c, it will be used by o...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Aug 27 01:23:49 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: move ts_sublots() to gsm_data_shared.c, it will be used by osmo-bts
......................................................................


move ts_sublots() to gsm_data_shared.c, it will be used by osmo-bts

Change-Id: I8ba06d7dd6e0ceab3d8d18bb565354d6ed461f7e
---
M openbsc/include/openbsc/chan_alloc.h
M openbsc/include/openbsc/gsm_data_shared.h
M openbsc/src/libbsc/chan_alloc.c
M openbsc/src/libcommon/gsm_data_shared.c
4 files changed, 27 insertions(+), 27 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/openbsc/include/openbsc/chan_alloc.h b/openbsc/include/openbsc/chan_alloc.h
index 3e03b97..78242e5 100644
--- a/openbsc/include/openbsc/chan_alloc.h
+++ b/openbsc/include/openbsc/chan_alloc.h
@@ -51,6 +51,4 @@
 
 int trx_is_usable(struct gsm_bts_trx *trx);
 
-uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
-
 #endif /* _CHAN_ALLOC_H */
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 953bac6..ce2e9b7 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -853,4 +853,6 @@
 struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
 				   int *rc);
 
+uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
+
 #endif
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index 92a1358..7b0c3e6 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -72,31 +72,6 @@
 	return 1;
 }
 
-static const uint8_t subslots_per_pchan[] = {
-	[GSM_PCHAN_NONE] = 0,
-	[GSM_PCHAN_CCCH] = 0,
-	[GSM_PCHAN_CCCH_SDCCH4] = 4,
-	[GSM_PCHAN_TCH_F] = 1,
-	[GSM_PCHAN_TCH_H] = 2,
-	[GSM_PCHAN_SDCCH8_SACCH8C] = 8,
-	[GSM_PCHAN_TCH_F_PDCH] = 1,
-	[GSM_PCHAN_CCCH_SDCCH4_CBCH] = 4,
-	[GSM_PCHAN_SDCCH8_SACCH8C_CBCH] = 8,
-	/*
-	 * GSM_PCHAN_TCH_F_TCH_H_PDCH should not be part of this, those TS are
-	 * handled according to their ts->dyn state.
-	 */
-};
-
-/*! According to ts->pchan and possibly ts->dyn_pchan, return the number of
- * logical channels available in the timeslot. */
-uint8_t ts_subslots(struct gsm_bts_trx_ts *ts)
-{
-	if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH)
-		return subslots_per_pchan[ts->dyn.pchan_is];
-	return subslots_per_pchan[ts->pchan];
-}
-
 static struct gsm_lchan *
 _lc_find_trx(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan,
 	     enum gsm_phys_chan_config dyn_as_pchan)
diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c
index 2488c3a..c8c9e04 100644
--- a/openbsc/src/libcommon/gsm_data_shared.c
+++ b/openbsc/src/libcommon/gsm_data_shared.c
@@ -708,3 +708,28 @@
 
 	return &ts->lchan[lch_idx];
 }
+
+static const uint8_t subslots_per_pchan[] = {
+	[GSM_PCHAN_NONE] = 0,
+	[GSM_PCHAN_CCCH] = 0,
+	[GSM_PCHAN_CCCH_SDCCH4] = 4,
+	[GSM_PCHAN_TCH_F] = 1,
+	[GSM_PCHAN_TCH_H] = 2,
+	[GSM_PCHAN_SDCCH8_SACCH8C] = 8,
+	[GSM_PCHAN_TCH_F_PDCH] = 1,
+	[GSM_PCHAN_CCCH_SDCCH4_CBCH] = 4,
+	[GSM_PCHAN_SDCCH8_SACCH8C_CBCH] = 8,
+	/*
+	 * GSM_PCHAN_TCH_F_TCH_H_PDCH should not be part of this, those TS are
+	 * handled according to their ts->dyn state.
+	 */
+};
+
+/*! According to ts->pchan and possibly ts->dyn_pchan, return the number of
+ * logical channels available in the timeslot. */
+uint8_t ts_subslots(struct gsm_bts_trx_ts *ts)
+{
+	if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+		return subslots_per_pchan[ts->dyn.pchan_is];
+	return subslots_per_pchan[ts->pchan];
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ba06d7dd6e0ceab3d8d18bb565354d6ed461f7e
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>



More information about the gerrit-log mailing list