<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10816">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">common/l1ctl.c: fix: use signed type for TA in l1ctl_tx_param_req()<br><br>Despite the correct range of Timing Advance value is [0..63],<br>there is a special feature in OsmocomBB which allows one to<br>simulate the distance between both MS and a BTS by playing<br>with the signal delay.<br><br>It was discovered that l1ctl_tx_param_req() is using an unsigned<br>'uint8_t' type for Timing Advance value, while other code and<br>L1CTL protocol is using signed 'int8_t'. This may result in<br>distortion of negative values, so let's fix this!<br><br>Change-Id: I6ee42b5fa2ca9ebe187f0b933465c49f840a55c2<br>---<br>M src/host/layer23/include/osmocom/bb/common/l1ctl.h<br>M src/host/layer23/src/common/l1ctl.c<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h b/src/host/layer23/include/osmocom/bb/common/l1ctl.h</span><br><span>index 824b1b0..e4dbded 100644</span><br><span>--- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h</span><br><span>+++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h</span><br><span>@@ -14,7 +14,7 @@</span><br><span>   uint8_t link_id);</span><br><span> </span><br><span> /* Transmit L1CTL_PARAM_REQ */</span><br><span style="color: hsl(0, 100%, 40%);">-int l1ctl_tx_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power);</span><br><span style="color: hsl(120, 100%, 40%);">+int l1ctl_tx_param_req(struct osmocom_ms *ms, int8_t ta, uint8_t tx_power);</span><br><span> </span><br><span> int l1ctl_tx_crypto_req(struct osmocom_ms *ms, uint8_t chan_nr,</span><br><span>      uint8_t algo, uint8_t *key, uint8_t len);</span><br><span>diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c</span><br><span>index f4c214d..3c57042 100644</span><br><span>--- a/src/host/layer23/src/common/l1ctl.c</span><br><span>+++ b/src/host/layer23/src/common/l1ctl.c</span><br><span>@@ -388,7 +388,7 @@</span><br><span> }</span><br><span> </span><br><span> /* Transmit L1CTL_PARAM_REQ */</span><br><span style="color: hsl(0, 100%, 40%);">-int l1ctl_tx_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power)</span><br><span style="color: hsl(120, 100%, 40%);">+int l1ctl_tx_param_req(struct osmocom_ms *ms, int8_t ta, uint8_t tx_power)</span><br><span> {</span><br><span>      struct msgb *msg;</span><br><span>    struct l1ctl_info_ul *ul;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10816">change 10816</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/10816"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I6ee42b5fa2ca9ebe187f0b933465c49f840a55c2 </div>
<div style="display:none"> Gerrit-Change-Number: 10816 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>