Change in osmocom-bb[master]: (WIP) misc/cbch_sacn: indicate CBCH cbits to L1/PHY

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/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Fri Oct 26 22:57:10 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/11478


Change subject: (WIP) misc/cbch_sacn: indicate CBCH cbits to L1/PHY
......................................................................

(WIP) misc/cbch_sacn: indicate CBCH cbits to L1/PHY

Change-Id: If19f2b2ed645c0f6f5baf7ed853b41011603f1a0
---
M src/host/layer23/src/misc/app_cbch_sniff.c
1 file changed, 8 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/78/11478/1

diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c b/src/host/layer23/src/misc/app_cbch_sniff.c
index 8256eaf..4d50c15 100644
--- a/src/host/layer23/src/misc/app_cbch_sniff.c
+++ b/src/host/layer23/src/misc/app_cbch_sniff.c
@@ -48,6 +48,12 @@
 		return 0;
 	}
 
+#define L1SAP_CHAN_IS_SDCCH4(chan_nr) ((chan_nr >> 3) & 3)
+#define L1SAP_CHAN_IS_SDCCH8(chan_nr) ((chan_nr >> 3) & 7)
+#define L1SAP_SDCCH_TO_CBCH(chan_nr) \
+	(L1SAP_CHAN_IS_SDCCH4(chan_nr) ? ((0x18 << 3) | (chan_nr & 0x07)) \
+		: L1SAP_CHAN_IS_SDCCH8(chan_nr) ? ((0x19 << 3) | (chan_nr & 0x07)) : 0x00)
+
 	if (s->h) {
 		LOGP(DRR, LOGL_INFO, "chan_nr = 0x%02x TSC = %d  MAIO = %d  "
 			"HSN = %d  hseq (%d): %s\n",
@@ -56,13 +62,13 @@
 			osmo_hexdump((unsigned char *) s->hopping, s->hopp_len * 2));
 		return l1ctl_tx_dm_est_req_h1(ms,
 			s->maio, s->hsn, s->hopping, s->hopp_len,
-			s->chan_nr, s->tsc,
+			L1SAP_SDCCH_TO_CBCH(s->chan_nr), s->tsc,
 			GSM48_CMODE_SIGN, 0);
 	} else {
 		LOGP(DRR, LOGL_INFO, "chan_nr = 0x%02x TSC = %d  ARFCN = %d\n",
 			s->chan_nr, s->tsc, s->arfcn);
 		return l1ctl_tx_dm_est_req_h0(ms, s->arfcn,
-			s->chan_nr, s->tsc, GSM48_CMODE_SIGN, 0);
+			L1SAP_SDCCH_TO_CBCH(s->chan_nr), s->tsc, GSM48_CMODE_SIGN, 0);
 	}
 }
 

-- 
To view, visit https://gerrit.osmocom.org/11478
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If19f2b2ed645c0f6f5baf7ed853b41011603f1a0
Gerrit-Change-Number: 11478
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181026/c7935e6a/attachment.htm>


More information about the gerrit-log mailing list