Change in osmo-bts[master]: [VAMOS] gsm_pchan2chan_nr(): use ABIS_RSL_CHAN_NR_CBITS_* macros

laforge gerrit-no-reply at lists.osmocom.org
Fri Jun 4 20:04:16 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24436 )

Change subject: [VAMOS] gsm_pchan2chan_nr(): use ABIS_RSL_CHAN_NR_CBITS_* macros
......................................................................

[VAMOS] gsm_pchan2chan_nr(): use ABIS_RSL_CHAN_NR_CBITS_* macros

Change-Id: I2b1480d3c330951cccc15333450cf7243b9505fc
Related: SYS#4895, OS#4941
---
M src/common/gsm_data.c
1 file changed, 7 insertions(+), 10 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c
index d0fe479..9a54912 100644
--- a/src/common/gsm_data.c
+++ b/src/common/gsm_data.c
@@ -187,16 +187,15 @@
 	switch (pchan) {
 	case GSM_PCHAN_TCH_F:
 		OSMO_ASSERT(lchan_nr == 0);
-		cbits = 0x01;
+		cbits = ABIS_RSL_CHAN_NR_CBITS_Bm_ACCHs;
 		break;
 	case GSM_PCHAN_PDCH:
 		OSMO_ASSERT(lchan_nr == 0);
-		cbits = RSL_CHAN_OSMO_PDCH >> 3;
+		cbits = ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH;
 		break;
 	case GSM_PCHAN_TCH_H:
 		OSMO_ASSERT(lchan_nr < 2);
-		cbits = 0x02;
-		cbits += lchan_nr;
+		cbits = ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(lchan_nr);
 		break;
 	case GSM_PCHAN_CCCH_SDCCH4:
 	case GSM_PCHAN_CCCH_SDCCH4_CBCH:
@@ -206,21 +205,19 @@
 		 * See osmo-bts-xxx/oml.c:opstart_compl().
 		 */
 		if (lchan_nr == CCCH_LCHAN)
-			cbits = 0x10; /* BCCH */
+			cbits = ABIS_RSL_CHAN_NR_CBITS_BCCH;
 		else {
 			OSMO_ASSERT(lchan_nr < 4);
-			cbits = 0x04;
-			cbits += lchan_nr;
+			cbits = ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(lchan_nr);
 		}
 		break;
 	case GSM_PCHAN_SDCCH8_SACCH8C:
 	case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
 		OSMO_ASSERT(lchan_nr < 8);
-		cbits = 0x08;
-		cbits += lchan_nr;
+		cbits = ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(lchan_nr);
 		break;
 	case GSM_PCHAN_CCCH:
-		cbits = 0x10;
+		cbits = ABIS_RSL_CHAN_NR_CBITS_BCCH;
 		break;
 	case GSM_PCHAN_NONE:
 		LOGP(DRSL, LOGL_ERROR, "Physical channel %s not expected!\n",

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24436
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2b1480d3c330951cccc15333450cf7243b9505fc
Gerrit-Change-Number: 24436
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210604/308b320e/attachment.htm>


More information about the gerrit-log mailing list