<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/19944">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm_04_08_rr: fix hopping parameters in RR Assignment Command<br><br>A similar problem has already been fixed in [1]:<br><br>  - include GSM48_IE_MA_AFTER instead of GSM48_IE_MA_BEFORE,<br>  - fix position of the Mobile Allocation (after time) IE.<br><br>This problem was uncovered by (not yet merged) TTCN-3 test case<br>verifying handling of the hopping parameters [2].  This change<br>makes it pass.<br><br>[1] I43ef66c109b107ebcaa1cb6197637701b13b3787<br>[2] BSC_Tests.TC_fh_params_handover_cmd<br><br>Change-Id: I7569eead9760b6fd4bb91fc2d8d0b8200bebe374<br>Related: SYS#4868, OS#4545<br>---<br>M src/osmo-bsc/gsm_04_08_rr.c<br>1 file changed, 10 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/19944/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c</span><br><span>index 69ec4d3..be114f0 100644</span><br><span>--- a/src/osmo-bsc/gsm_04_08_rr.c</span><br><span>+++ b/src/osmo-bsc/gsm_04_08_rr.c</span><br><span>@@ -523,23 +523,24 @@</span><br><span>     if (new_lchan->ts->hopping.enabled) {</span><br><span>          struct gsm_bts *bts = new_lchan->ts->trx->bts;</span><br><span>              struct gsm48_system_information_type_1 *si1;</span><br><span style="color: hsl(0, 100%, 40%);">-            uint8_t *cur;</span><br><span> </span><br><span>            si1 = GSM_BTS_SI(bts, SYSINFO_TYPE_1);</span><br><span>               /* Copy the Cell Chan Desc (ARFCNS in this cell) */</span><br><span style="color: hsl(0, 100%, 40%);">-             msgb_put_u8(msg, GSM48_IE_CELL_CH_DESC);</span><br><span style="color: hsl(0, 100%, 40%);">-                cur = msgb_put(msg, GSM48_HOCMD_CCHDESC_LEN);</span><br><span style="color: hsl(0, 100%, 40%);">-           memcpy(cur, si1->cell_channel_description,</span><br><span style="color: hsl(0, 100%, 40%);">-                   GSM48_HOCMD_CCHDESC_LEN);</span><br><span style="color: hsl(0, 100%, 40%);">-               /* Copy the Mobile Allocation */</span><br><span style="color: hsl(0, 100%, 40%);">-                msgb_tlv_put(msg, GSM48_IE_MA_BEFORE,</span><br><span style="color: hsl(0, 100%, 40%);">-                        new_lchan->ts->hopping.ma_len,</span><br><span style="color: hsl(0, 100%, 40%);">-                            new_lchan->ts->hopping.ma_data);</span><br><span style="color: hsl(120, 100%, 40%);">+           msgb_tv_fixed_put(msg, GSM48_IE_CELL_CH_DESC,</span><br><span style="color: hsl(120, 100%, 40%);">+                           GSM48_HOCMD_CCHDESC_LEN,</span><br><span style="color: hsl(120, 100%, 40%);">+                              si1->cell_channel_description);</span><br><span>         }</span><br><span>    /* FIXME: optional bits for type of synchronization? */</span><br><span> </span><br><span>  msgb_tv_put(msg, GSM48_IE_CHANMODE_1, new_lchan->tch_mode);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+    /* Mobile Allocation (after time), TLV (see 3GPP TS 44.018, 10.5.2.21) */</span><br><span style="color: hsl(120, 100%, 40%);">+     if (new_lchan->ts->hopping.enabled) {</span><br><span style="color: hsl(120, 100%, 40%);">+           msgb_tlv_put(msg, GSM48_IE_MA_AFTER,</span><br><span style="color: hsl(120, 100%, 40%);">+                       new_lchan->ts->hopping.ma_len,</span><br><span style="color: hsl(120, 100%, 40%);">+                          new_lchan->ts->hopping.ma_data);</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* in case of multi rate we need to attach a config */</span><br><span>       if (new_lchan->tch_mode == GSM48_CMODE_SPEECH_AMR)</span><br><span>                msgb_tlv_put(msg, GSM48_IE_MUL_RATE_CFG, new_lchan->mr_ms_lv[0],</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/19944">change 19944</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-bsc/+/19944"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7569eead9760b6fd4bb91fc2d8d0b8200bebe374 </div>
<div style="display:none"> Gerrit-Change-Number: 19944 </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>