<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/15626">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trxcon/scheduler: fix handling of PTCCH logical channel<br><br>According to 3GPP TS 45.010, section 5.6.2, for packet-switched<br>channels the BTS shall monitor the delay of the Access Bursts<br>sent by the MS on PTCCH and respond with timing advance values<br>for all MS performing the procedure on that PDCH.<br><br>According to 3GPP TS 45.002, section 3.3.4.2, PTCCH (Packet Timing<br>advance control channel) is a packet dedicated channel, that is<br>used for continuous Timing Advance control (mentioned above).<br><br>There are two sub-types of that logical channel:<br><br>  - PTCCH/U (Uplink): used to transmit random Access Bursts<br>    to allow estimation of the Timing Advance for one MS in<br>    packet transfer mode.<br><br>  - PTCCH/D (Downlink): used by the network to transmit<br>    Timing Advance updates for several MS.<br><br>As per 3GPP TS 45.003, section 5.2, the coding scheme used for<br>PTCCH/U is the same as for PRACH as specified in subclause 5.3,<br>while the coding scheme used for PTCCH/D is the same as for<br>CS-1 as specified in subclause 5.1.1.<br><br>The way we used to handle both PTCCH/U and PTCCH/D is absolutely<br>wrong - it has nothing to do with xCCH coding. Instead, we need<br>to use rx_pdtch_fn() for Downlink and tx_rach_fn() for Uplink.<br><br>Also, since we only have a shared RSL channel number for PDCH<br>(Osmocom-specific RSL_CHAN_OSMO_PDCH), there should be a way<br>to distinguish both PDTCH and PTCCH logical channels. Let's<br>introduce TRX_CH_LID_PTCCH for that.<br><br>Change-Id: I2d1e9b8a66f027047f8d7bdc3f82ff9d8ebcc25e<br>---<br>M src/host/trxcon/sched_lchan_desc.c<br>M src/host/trxcon/sched_trx.h<br>2 files changed, 12 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/26/15626/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c</span><br><span>index 5b9d676..67f770c 100644</span><br><span>--- a/src/host/trxcon/sched_lchan_desc.c</span><br><span>+++ b/src/host/trxcon/sched_lchan_desc.c</span><br><span>@@ -516,12 +516,17 @@</span><br><span>              .name = "PTCCH", /* 3GPP TS 05.02, section 3.3.4.2 */</span><br><span>              .desc = "Packet Timing advance control channel",</span><br><span>           .chan_nr = RSL_CHAN_OSMO_PDCH,</span><br><span style="color: hsl(120, 100%, 40%);">+                .link_id = TRX_CH_LID_PTCCH,</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                /* Same as for TRXC_BCCH (xCCH), see above. */</span><br><span style="color: hsl(120, 100%, 40%);">+                /* On the Uplink, mobile stations transmit random Access Bursts</span><br><span style="color: hsl(120, 100%, 40%);">+                * to allow estimation of the timing advance for one MS in packet</span><br><span style="color: hsl(120, 100%, 40%);">+              * transfer mode. On Downlink, the network sends timing advance</span><br><span style="color: hsl(120, 100%, 40%);">+                * updates for several mobile stations. The coding scheme used</span><br><span style="color: hsl(120, 100%, 40%);">+                 * for PTCCH/D messages is the same as for PDTCH CS-1. */</span><br><span>            .burst_buf_size = 4 * GSM_BURST_PL_LEN,</span><br><span>              .flags = TRX_CH_FLAG_PDCH,</span><br><span style="color: hsl(0, 100%, 40%);">-              .rx_fn = rx_data_fn,</span><br><span style="color: hsl(0, 100%, 40%);">-            .tx_fn = tx_data_fn,</span><br><span style="color: hsl(120, 100%, 40%);">+          .rx_fn = rx_pdtch_fn,</span><br><span style="color: hsl(120, 100%, 40%);">+         .tx_fn = tx_rach_fn,</span><br><span>         },</span><br><span>   [TRXC_SDCCH4_CBCH] = {</span><br><span>               .name = "SDCCH/4(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */</span><br><span>diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h</span><br><span>index 6ef9ce4..0d42499 100644</span><br><span>--- a/src/host/trxcon/sched_trx.h</span><br><span>+++ b/src/host/trxcon/sched_trx.h</span><br><span>@@ -23,6 +23,10 @@</span><br><span> #define TRX_CH_LID_DEDIC 0x00</span><br><span> #define TRX_CH_LID_SACCH        0x40</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Osmocom-specific extension for PTCCH (see 3GPP TS 45.002, section 3.3.4.2).</span><br><span style="color: hsl(120, 100%, 40%);">+ * Shall be used to distinguish PTCCH and PDTCH channels on a PDCH time-slot. */</span><br><span style="color: hsl(120, 100%, 40%);">+#define TRX_CH_LID_PTCCH    0x80</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Is a channel related to PDCH (GPRS) */</span><br><span> #define TRX_CH_FLAG_PDCH (1 << 0)</span><br><span> /* Should a channel be activated automatically */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/15626">change 15626</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmocom-bb/+/15626"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2d1e9b8a66f027047f8d7bdc3f82ff9d8ebcc25e </div>
<div style="display:none"> Gerrit-Change-Number: 15626 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>