fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/27508 )
Change subject: gsm48_make_ho_cmd(): optionally add Synchronization Indication IE
......................................................................
gsm48_make_ho_cmd(): optionally add Synchronization Indication IE
Change-Id: I4e5b1163a71443d706f14ce4bfd5c2294c320432
Related: SYS#5838
---
M include/osmocom/bsc/gsm_04_08_rr.h
M src/osmo-bsc/gsm_04_08_rr.c
M src/osmo-bsc/handover_fsm.c
3 files changed, 16 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/08/27508/1
diff --git a/include/osmocom/bsc/gsm_04_08_rr.h b/include/osmocom/bsc/gsm_04_08_rr.h
index 75307d6..7d68fc8 100644
--- a/include/osmocom/bsc/gsm_04_08_rr.h
+++ b/include/osmocom/bsc/gsm_04_08_rr.h
@@ -27,7 +27,7 @@
const struct gsm48_multi_rate_conf *mr_conf,
const struct amr_mode *modes, unsigned int num_modes);
struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan,
- enum handover_scope ho_scope,
+ enum handover_scope ho_scope, bool async,
uint8_t power_command, uint8_t ho_ref);
int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t
power_command);
int gsm48_send_rr_app_info(struct gsm_lchan *lchan, uint8_t apdu_id, uint8_t apdu_flags,
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index cf74118..560eb16 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -534,7 +534,7 @@
/* Chapter 9.1.15: Handover Command */
struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan,
- enum handover_scope ho_scope,
+ enum handover_scope ho_scope, bool async,
uint8_t power_command, uint8_t ho_ref)
{
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 HO CMD");
@@ -555,6 +555,19 @@
ho->ho_ref = ho_ref;
ho->power_command = power_command;
+ /* Synchronization Indication, TV (see 3GPP TS 44.018, 9.1.15.1).
+ * In the case of inter-RAT handover, always include this IE for the sake of
+ * explicitness. In the case of intra-RAT handover, include this IE only for
+ * the synchronized handover. If omitted, non-synchronized handover is assumed. */
+ if (!async || ho_scope & HO_INTER_BSC_IN) {
+ /* Only the SI field (Non-synchronized/Synchronized) is present.
+ * TODO: ROT (Report Observed Time Difference), currently 0.
+ * TODO: NCI (Normal cell indication), currently 0. */
+ const uint8_t sync_ind = async ? 0x00 : 0x01;
+ /* T (4 bit) + V (4 bit), see 3GPP TS 44.018, 10.5.2.39 */
+ msgb_v_put(msg, GSM48_IE_SYNC_IND | (sync_ind & 0x0f));
+ }
+
if (new_lchan->ts->hopping.enabled) {
struct gsm48_system_information_type_1 *si1;
@@ -564,7 +577,6 @@
GSM48_HOCMD_CCHDESC_LEN,
si1->cell_channel_description);
}
- /* FIXME: optional bits for type of synchronization? */
msgb_tv_put(msg, GSM48_IE_CHANMODE_1, new_lchan->current_ch_mode_rate.chan_mode);
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index b3f78c0..5ae3787 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -1216,7 +1216,7 @@
struct handover *ho = &conn->ho;
struct msgb *rr_ho_cmd = gsm48_make_ho_cmd(ho->new_lchan,
- ho->scope,
+ ho->async, ho->scope,
ho->new_lchan->ms_power,
ho->ho_ref);
if (!rr_ho_cmd) {
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27508
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4e5b1163a71443d706f14ce4bfd5c2294c320432
Gerrit-Change-Number: 27508
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange