summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-09-30 20:43:11 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-09-30 20:50:28 +0700
commit5516b423365cc4ad9a6f37e3676126f149591490 (patch)
treedd3642a1ecdfaea36b52d7934001b714c08fb66c
parenta2ac6d67242ca96593b4f0c4aebd49b4c34eff44 (diff)
trxcon/scheduler: fix handling of PTCCH logical channel
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 - it has nothing to do with xCCH coding. Instead, we need to use rx_pdtch_fn() for Downlink and tx_rach_fn() for Uplink. Also, since we only have a shared RSL channel number for PDCH (Osmocom-specific RSL_CHAN_OSMO_PDCH), there should be a way to distinguish both PDTCH and PTCCH logical channels. Let's introduce TRX_CH_LID_PTCCH for that. Change-Id: I2d1e9b8a66f027047f8d7bdc3f82ff9d8ebcc25e
-rw-r--r--src/host/trxcon/sched_lchan_desc.c11
-rw-r--r--src/host/trxcon/sched_trx.h4
2 files changed, 12 insertions, 3 deletions
diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c
index 5b9d6760..67f770c5 100644
--- a/src/host/trxcon/sched_lchan_desc.c
+++ b/src/host/trxcon/sched_lchan_desc.c
@@ -516,12 +516,17 @@ const struct trx_lchan_desc trx_lchan_desc[_TRX_CHAN_MAX] = {
.name = "PTCCH", /* 3GPP TS 05.02, section 3.3.4.2 */
.desc = "Packet Timing advance control channel",
.chan_nr = RSL_CHAN_OSMO_PDCH,
+ .link_id = TRX_CH_LID_PTCCH,
- /* 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. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_PDCH,
- .rx_fn = rx_data_fn,
- .tx_fn = tx_data_fn,
+ .rx_fn = rx_pdtch_fn,
+ .tx_fn = tx_rach_fn,
},
[TRXC_SDCCH4_CBCH] = {
.name = "SDCCH/4(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */
diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h
index 6ef9ce47..0d424999 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -23,6 +23,10 @@
#define TRX_CH_LID_DEDIC 0x00
#define TRX_CH_LID_SACCH 0x40
+/* Osmocom-specific extension for PTCCH (see 3GPP TS 45.002, section 3.3.4.2).
+ * Shall be used to distinguish PTCCH and PDTCH channels on a PDCH time-slot. */
+#define TRX_CH_LID_PTCCH 0x80
+
/* Is a channel related to PDCH (GPRS) */
#define TRX_CH_FLAG_PDCH (1 << 0)
/* Should a channel be activated automatically */