Change in osmo-pcu[master]: bts: add send_gsmtap_rach(), also send PTCCH/U over GSMTAP

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

fixeria gerrit-no-reply at lists.osmocom.org
Thu Jun 25 09:38:06 UTC 2020


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17708 )

Change subject: bts: add send_gsmtap_rach(), also send PTCCH/U over GSMTAP
......................................................................

bts: add send_gsmtap_rach(), also send PTCCH/U over GSMTAP

Change-Id: I5cc4c3d2522215a31924121f83fcc2ac9ac6fe9c
---
M src/bts.cpp
M src/bts.h
M src/pcu_vty.c
3 files changed, 18 insertions(+), 3 deletions(-)

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



diff --git a/src/bts.cpp b/src/bts.cpp
index 26cb258..0482168 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -430,6 +430,16 @@
 	return 0;
 }
 
+void BTS::send_gsmtap_rach(enum pcu_gsmtap_category categ, uint8_t channel,
+			   const struct rach_ind_params *rip)
+{
+	struct pcu_l1_meas meas;
+	send_gsmtap_meas(categ, true, rip->trx_nr, rip->ts_nr, channel,
+			 rfn_to_fn(rip->rfn), (uint8_t *) &rip->ra,
+			 /* TODO: properly pack 11 bit RA */
+			 rip->is_11bit ? 2 : 1, &meas);
+}
+
 void BTS::send_gsmtap(enum pcu_gsmtap_category categ, bool uplink, uint8_t trx_no,
 		      uint8_t ts_no, uint8_t channel, uint32_t fn,
 		      const uint8_t *data, unsigned int len)
@@ -801,9 +811,7 @@
 	uint32_t Fn = rfn_to_fn(rip->rfn);
 	uint8_t ta = qta2ta(rip->qta);
 
-	send_gsmtap(PCU_GSMTAP_C_UL_RACH, true, rip->trx_nr, rip->ts_nr,
-		    GSMTAP_CHANNEL_RACH, Fn, (uint8_t *) &rip->ra,
-		    rip->is_11bit ? 2 : 1);
+	send_gsmtap_rach(PCU_GSMTAP_C_UL_RACH, GSMTAP_CHANNEL_RACH, rip);
 
 	LOGP(DRLCMAC, LOGL_DEBUG, "MS requests Uplink resource on CCCH/RACH: "
 	     "ra=0x%02x (%d bit) Fn=%u qta=%d\n", rip->ra,
@@ -908,6 +916,8 @@
 	struct gprs_rlcmac_pdch *pdch;
 	uint8_t ss;
 
+	send_gsmtap_rach(PCU_GSMTAP_C_UL_PTCCH, GSMTAP_CHANNEL_PTCCH, rip);
+
 	/* Prevent buffer overflow */
 	if (rip->trx_nr >= ARRAY_SIZE(bts->trx) || rip->ts_nr >= 8) {
 		LOGP(DRLCMAC, LOGL_ERROR, "(TRX=%u TS=%u RFN=%u) Rx malformed "
diff --git a/src/bts.h b/src/bts.h
index e6b7aa3..edccc28 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -67,6 +67,7 @@
 	PCU_GSMTAP_C_UL_DATA_GPRS	= 18,	/* uplink GPRS data blocks */
 	PCU_GSMTAP_C_UL_DATA_EGPRS	= 19,	/* uplink EGPRS data blocks */
 	PCU_GSMTAP_C_UL_RACH		= 20,	/* uplink RACH bursts */
+	PCU_GSMTAP_C_UL_PTCCH		= 21,	/* uplink PTCCH bursts */
 };
 
 struct BTS;
@@ -336,6 +337,8 @@
 	void send_gsmtap_meas(enum pcu_gsmtap_category categ, bool uplink, uint8_t trx_no,
 			      uint8_t ts_no, uint8_t channel, uint32_t fn,
 			      const uint8_t *data, unsigned int len, struct pcu_l1_meas *meas);
+	void send_gsmtap_rach(enum pcu_gsmtap_category categ, uint8_t channel,
+			      const struct rach_ind_params *rip);
 
 	/*
 	 * Below for C interface for the VTY
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 9cae777..99c92b7 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -38,6 +38,7 @@
 	{ PCU_GSMTAP_C_UL_DATA_GPRS,	"ul-data-gprs" },
 	{ PCU_GSMTAP_C_UL_DATA_EGPRS,	"ul-data-egprs" },
 	{ PCU_GSMTAP_C_UL_RACH,		"ul-rach" },
+	{ PCU_GSMTAP_C_UL_PTCCH,	"ul-ptcch" },
 
 	{ 0, NULL }
 };
@@ -58,6 +59,7 @@
 	{ PCU_GSMTAP_C_UL_DATA_GPRS,	"Uplink Data Blocks (GPRS)" },
 	{ PCU_GSMTAP_C_UL_DATA_EGPRS,	"Uplink Data Blocks (EGPRS)" },
 	{ PCU_GSMTAP_C_UL_RACH,		"Uplink RACH Bursts" },
+	{ PCU_GSMTAP_C_UL_PTCCH,	"Uplink PTCCH Bursts" },
 
 	{ 0, NULL }
 };

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5cc4c3d2522215a31924121f83fcc2ac9ac6fe9c
Gerrit-Change-Number: 17708
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
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/20200625/b626b89c/attachment.htm>


More information about the gerrit-log mailing list