<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23827">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo-bts-trx: 'burst type' is actually modulation type<br><br>Burst type and modulation type are actually different things.<br><br>Change-Id: Ic06c96434ad32dd3770b88cb1fefcbefb2fc3928<br>Related: SYS#4895, OS#4941, OS#4006<br>---<br>M include/osmo-bts/scheduler.h<br>M src/osmo-bts-trx/sched_lchan_pdtch.c<br>M src/osmo-bts-trx/trx_if.c<br>3 files changed, 18 insertions(+), 18 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/23827/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h</span><br><span>index b1e4294..ad6e5c5 100644</span><br><span>--- a/include/osmo-bts/scheduler.h</span><br><span>+++ b/include/osmo-bts/scheduler.h</span><br><span>@@ -63,9 +63,9 @@</span><br><span> #define GPRS_BURST_LEN GSM_BURST_LEN</span><br><span> #define EGPRS_BURST_LEN 444</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-enum trx_burst_type {</span><br><span style="color: hsl(0, 100%, 40%);">- TRX_BURST_GMSK,</span><br><span style="color: hsl(0, 100%, 40%);">- TRX_BURST_8PSK,</span><br><span style="color: hsl(120, 100%, 40%);">+enum trx_mod_type {</span><br><span style="color: hsl(120, 100%, 40%);">+ TRX_MOD_T_GMSK,</span><br><span style="color: hsl(120, 100%, 40%);">+ TRX_MOD_T_8PSK,</span><br><span> };</span><br><span> </span><br><span> /* A set of measurements belonging to one Uplink burst */</span><br><span>@@ -85,7 +85,7 @@</span><br><span> /* scheduler */</span><br><span> bool active; /* Channel is active */</span><br><span> ubit_t *dl_bursts; /* burst buffer for TX */</span><br><span style="color: hsl(0, 100%, 40%);">- enum trx_burst_type dl_burst_type; /* GMSK or 8PSK burst type */</span><br><span style="color: hsl(120, 100%, 40%);">+ enum trx_mod_type dl_mod_type; /* Downlink modulation type */</span><br><span> sbit_t *ul_bursts; /* burst buffer for RX */</span><br><span> sbit_t *ul_bursts_prev;/* previous burst buffer for RX (repeated SACCH) */</span><br><span> uint32_t ul_first_fn; /* fn of first burst */</span><br><span>@@ -244,7 +244,7 @@</span><br><span> int8_t rssi; /*!< Received Signal Strength Indication */</span><br><span> </span><br><span> /* Optional fields (defined by flags) */</span><br><span style="color: hsl(0, 100%, 40%);">- enum trx_burst_type bt; /*!< Modulation type */</span><br><span style="color: hsl(120, 100%, 40%);">+ enum trx_mod_type mod; /*!< Modulation type */</span><br><span> uint8_t tsc_set; /*!< Training Sequence Set */</span><br><span> uint8_t tsc; /*!< Training Sequence Code */</span><br><span> int16_t ci_cb; /*!< Carrier-to-Interference ratio (in centiBels) */</span><br><span>diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c</span><br><span>index 5e61a1d..d936f75 100644</span><br><span>--- a/src/osmo-bts-trx/sched_lchan_pdtch.c</span><br><span>+++ b/src/osmo-bts-trx/sched_lchan_pdtch.c</span><br><span>@@ -156,7 +156,7 @@</span><br><span> struct gsm_bts_trx_ts *ts = &l1t->trx->ts[br->tn];</span><br><span> struct msgb *msg = NULL; /* make GCC happy */</span><br><span> ubit_t *burst, **bursts_p = &l1ts->chan_state[chan].dl_bursts;</span><br><span style="color: hsl(0, 100%, 40%);">- enum trx_burst_type *burst_type = &l1ts->chan_state[chan].dl_burst_type;</span><br><span style="color: hsl(120, 100%, 40%);">+ enum trx_mod_type *mod = &l1ts->chan_state[chan].dl_mod_type;</span><br><span> int rc = 0;</span><br><span> </span><br><span> /* send burst, if we already got a frame */</span><br><span>@@ -205,9 +205,9 @@</span><br><span> msgb_free(msg);</span><br><span> goto no_msg;</span><br><span> } else if (rc == GSM0503_EGPRS_BURSTS_NBITS) {</span><br><span style="color: hsl(0, 100%, 40%);">- *burst_type = TRX_BURST_8PSK;</span><br><span style="color: hsl(120, 100%, 40%);">+ *mod = TRX_MOD_T_8PSK;</span><br><span> } else {</span><br><span style="color: hsl(0, 100%, 40%);">- *burst_type = TRX_BURST_GMSK;</span><br><span style="color: hsl(120, 100%, 40%);">+ *mod = TRX_MOD_T_GMSK;</span><br><span> }</span><br><span> </span><br><span> /* free message */</span><br><span>@@ -215,7 +215,7 @@</span><br><span> </span><br><span> send_burst:</span><br><span> /* compose burst */</span><br><span style="color: hsl(0, 100%, 40%);">- if (*burst_type == TRX_BURST_8PSK) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (*mod == TRX_MOD_T_8PSK) {</span><br><span> burst = *bursts_p + bid * 348;</span><br><span> memset(br->burst, 1, 9);</span><br><span> memcpy(br->burst + 9, burst, 174);</span><br><span>diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c</span><br><span>index 905d3da..bfa1514 100644</span><br><span>--- a/src/osmo-bts-trx/trx_if.c</span><br><span>+++ b/src/osmo-bts-trx/trx_if.c</span><br><span>@@ -786,11 +786,11 @@</span><br><span> /* Modulation info and TSC set */</span><br><span> mts = (buf[0] >> 3) & 0b1111;</span><br><span> if ((mts & 0b1100) == 0x00) {</span><br><span style="color: hsl(0, 100%, 40%);">- bi->bt = TRX_BURST_GMSK;</span><br><span style="color: hsl(120, 100%, 40%);">+ bi->mod = TRX_MOD_T_GMSK;</span><br><span> bi->tsc_set = mts & 0b11;</span><br><span> bi->flags |= TRX_BI_F_MOD_TYPE;</span><br><span> } else if ((mts & 0b0100) == 0b0100) {</span><br><span style="color: hsl(0, 100%, 40%);">- bi->bt = TRX_BURST_8PSK;</span><br><span style="color: hsl(120, 100%, 40%);">+ bi->mod = TRX_MOD_T_8PSK;</span><br><span> bi->tsc_set = mts & 0b1;</span><br><span> bi->flags |= TRX_BI_F_MOD_TYPE;</span><br><span> } else {</span><br><span>@@ -854,15 +854,15 @@</span><br><span> {</span><br><span> /* Modulation types defined in 3GPP TS 45.002 */</span><br><span> static const size_t bl[] = {</span><br><span style="color: hsl(0, 100%, 40%);">- [TRX_BURST_GMSK] = 148, /* 1 bit per symbol */</span><br><span style="color: hsl(0, 100%, 40%);">- [TRX_BURST_8PSK] = 444, /* 3 bits per symbol */</span><br><span style="color: hsl(120, 100%, 40%);">+ [TRX_MOD_T_GMSK] = 148, /* 1 bit per symbol */</span><br><span style="color: hsl(120, 100%, 40%);">+ [TRX_MOD_T_8PSK] = 444, /* 3 bits per symbol */</span><br><span> };</span><br><span> </span><br><span> /* Verify burst length */</span><br><span style="color: hsl(0, 100%, 40%);">- if (bl[bi->bt] != buf_len) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (bl[bi->mod] != buf_len) {</span><br><span> LOGPPHI(l1h->phy_inst, DTRX, LOGL_NOTICE,</span><br><span> "Rx TRXD message with odd burst length %zu, "</span><br><span style="color: hsl(0, 100%, 40%);">- "expected %zu\n", buf_len, bl[bi->bt]);</span><br><span style="color: hsl(120, 100%, 40%);">+ "expected %zu\n", buf_len, bl[bi->mod]);</span><br><span> return -EINVAL;</span><br><span> }</span><br><span> </span><br><span>@@ -878,8 +878,8 @@</span><br><span> </span><br><span> /* Modulation types defined in 3GPP TS 45.002 */</span><br><span> static const char *mod_names[] = {</span><br><span style="color: hsl(0, 100%, 40%);">- [TRX_BURST_GMSK] = "GMSK",</span><br><span style="color: hsl(0, 100%, 40%);">- [TRX_BURST_8PSK] = "8-PSK",</span><br><span style="color: hsl(120, 100%, 40%);">+ [TRX_MOD_T_GMSK] = "GMSK",</span><br><span style="color: hsl(120, 100%, 40%);">+ [TRX_MOD_T_8PSK] = "8-PSK",</span><br><span> };</span><br><span> </span><br><span> /* Initialize the string buffer */</span><br><span>@@ -901,7 +901,7 @@</span><br><span> </span><br><span> /* Modulation and TSC set */</span><br><span> if (bi->flags & TRX_BI_F_MOD_TYPE)</span><br><span style="color: hsl(0, 100%, 40%);">- OSMO_STRBUF_PRINTF(sb, " mod=%s", mod_names[bi->bt]);</span><br><span style="color: hsl(120, 100%, 40%);">+ OSMO_STRBUF_PRINTF(sb, " mod=%s", mod_names[bi->mod]);</span><br><span> </span><br><span> /* Training Sequence Code */</span><br><span> if (bi->flags & TRX_BI_F_TS_INFO)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/23827">change 23827</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/osmo-bts/+/23827"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic06c96434ad32dd3770b88cb1fefcbefb2fc3928 </div>
<div style="display:none"> Gerrit-Change-Number: 23827 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>