Change in ...osmo-bts[master]: scheduler: fix handling of PTCCH/U and PTCCH/D logical channels

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

laforge gerrit-no-reply at lists.osmocom.org
Fri Oct 4 15:53:54 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-bts/+/15656 )

Change subject: scheduler: fix handling of PTCCH/U and PTCCH/D logical channels
......................................................................

scheduler: fix handling of PTCCH/U and PTCCH/D logical channels

According to 3GPP TS 45.010, section 5.6.2, for packet-switched
channels the BTS shall monitor the delay of the Access Bursts
sent by the MS on PTCCH and respond with timing advance values
for all MS performing the procedure on that PDCH.

According to 3GPP TS 45.002, section 3.3.4.2, PTCCH (Packet Timing
advance control channel) is a packet dedicated channel, that is
used for continuous Timing Advance control (mentioned above).

There are two sub-types of that logical channel:

  - PTCCH/U (Uplink): used to transmit random Access Bursts
    to allow estimation of the Timing Advance for one MS in
    packet transfer mode.

  - PTCCH/D (Downlink): used by the network to transmit
    Timing Advance updates for several MS.

As per 3GPP TS 45.003, section 5.2, the coding scheme used for
PTCCH/U is the same as for PRACH as specified in subclause 5.3,
while the coding scheme used for PTCCH/D is the same as for
CS-1 as specified in subclause 5.1.1.

The way we used to handle both PTCCH/U and PTCCH/D is absolutely
wrong - they have nothing to do with xCCH coding. Instead, we
need to use tx_pdtch_fn() for Downlink and rx_rach_fn() for Uplink.

In l1sap_ph_rach_ind() we need to check if an Access Burst was
received on PTCCH/U and forward it to OsmoPCU with proper SAPI
value (PCU_IF_SAPI_PTCCH). To be able to specify a SAPI, a new
parameter is introduced to pcu_tx_rach_ind().

Change-Id: I232e5f514fbad2c51daaa59ff516004aba97c8a3
Related: OS#4102
---
M include/osmo-bts/pcu_if.h
M src/common/l1sap.c
M src/common/pcu_sock.c
M src/common/scheduler.c
4 files changed, 26 insertions(+), 8 deletions(-)

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



diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index 114f87d..f34e0cd 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -12,7 +12,7 @@
 	uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
 		    int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual);
 int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
-	uint8_t is_11bit, enum ph_burst_type burst_type);
+	uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi);
 int pcu_tx_time_ind(uint32_t fn);
 int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
 int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len);
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index a77b53a..2874c81 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1313,6 +1313,20 @@
 
 	DEBUGPFN(DL1P, rach_ind->fn, "Rx PH-RA.ind\n");
 
+	/* PTCCH/UL (Packet Timing Advance Control Channel) */
+	if (L1SAP_IS_CHAN_PDCH(rach_ind->chan_nr) && L1SAP_IS_PTCCH(rach_ind->fn)) {
+		LOGPFN(DL1P, LOGL_DEBUG, rach_ind->fn,
+		       /* TODO: calculate and print Timing Advance Index */
+		       "Access Burst for continuous Timing Advance control (toa256=%d)\n",
+		       rach_ind->acc_delay_256bits);
+
+		/* QTA: Timing Advance in units of 1/4 of a symbol */
+		pcu_tx_rach_ind(bts, rach_ind->acc_delay_256bits >> 6,
+				rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
+				rach_ind->burst_type, PCU_IF_SAPI_PTCCH);
+		return 0;
+	}
+
 	/* check for handover access burst on dedicated channels */
 	if (!L1SAP_IS_CHAN_RACH(rach_ind->chan_nr)) {
 		rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_HO);
@@ -1349,8 +1363,8 @@
 			rach_ind->acc_delay, rach_ind->ra);
 
 		pcu_tx_rach_ind(bts, rach_ind->acc_delay << 2,
-			rach_ind->ra, rach_ind->fn,
-			rach_ind->is_11bit, rach_ind->burst_type);
+			rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
+			rach_ind->burst_type, PCU_IF_SAPI_RACH);
 		return 0;
 	}
 
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index ba9e172..51f72d8 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -380,7 +380,7 @@
 }
 
 int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
-	uint8_t is_11bit, enum ph_burst_type burst_type)
+	uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi)
 {
 	struct msgb *msg;
 	struct gsm_pcu_if *pcu_prim;
@@ -395,7 +395,7 @@
 	pcu_prim = (struct gsm_pcu_if *) msg->data;
 	rach_ind = &pcu_prim->u.rach_ind;
 
-	rach_ind->sapi = PCU_IF_SAPI_RACH;
+	rach_ind->sapi = sapi;
 	rach_ind->ra = ra;
 	rach_ind->qta = qta;
 	rach_ind->fn = fn;
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 40e0a54..19fec32 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -539,11 +539,15 @@
 		.desc = "Packet Timing advance control channel",
 		.chan_nr = RSL_CHAN_OSMO_PDCH,
 
-		/* Same as for TRXC_BCCH (xCCH), see above. */
+		/* On the Uplink, mobile stations transmit random Access Bursts
+		 * to allow estimation of the timing advance for one MS in packet
+		 * transfer mode. On Downlink, the network sends timing advance
+		 * updates for several mobile stations. The coding scheme used
+		 * for PTCCH/D messages is the same as for PDTCH CS-1. */
 		.flags = TRX_CHAN_FLAG_PDCH,
 		.rts_fn = rts_data_fn,
-		.dl_fn = tx_data_fn,
-		.ul_fn = rx_data_fn,
+		.dl_fn = tx_pdtch_fn,
+		.ul_fn = rx_rach_fn,
 	},
 	[TRXC_CBCH] = {
 		/* TODO: distinguish CBCH on SDCCH/4 and SDCCH/8 */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I232e5f514fbad2c51daaa59ff516004aba97c8a3
Gerrit-Change-Number: 15656
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
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/20191004/7eefe0e4/attachment.htm>


More information about the gerrit-log mailing list