gsm48_make_ho_cmd(): optionally add Synchronization Indication IE
Change-Id: I4e5b1163a71443d706f14ce4bfd5c2294c320432 Related: SYS#5838
This commit is contained in:
parent
2902d91d69
commit
53d05951a5
|
@ -27,7 +27,7 @@ int gsm48_multirate_config(struct msgb *msg,
|
||||||
const struct gsm48_multi_rate_conf *mr_conf,
|
const struct gsm48_multi_rate_conf *mr_conf,
|
||||||
const struct amr_mode *modes, unsigned int num_modes);
|
const struct amr_mode *modes, unsigned int num_modes);
|
||||||
struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan,
|
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);
|
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_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,
|
int gsm48_send_rr_app_info(struct gsm_lchan *lchan, uint8_t apdu_id, uint8_t apdu_flags,
|
||||||
|
|
|
@ -534,7 +534,7 @@ return_msg:
|
||||||
|
|
||||||
/* Chapter 9.1.15: Handover Command */
|
/* Chapter 9.1.15: Handover Command */
|
||||||
struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan,
|
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)
|
uint8_t power_command, uint8_t ho_ref)
|
||||||
{
|
{
|
||||||
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 HO CMD");
|
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 HO CMD");
|
||||||
|
@ -555,6 +555,19 @@ struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan,
|
||||||
ho->ho_ref = ho_ref;
|
ho->ho_ref = ho_ref;
|
||||||
ho->power_command = power_command;
|
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) {
|
if (new_lchan->ts->hopping.enabled) {
|
||||||
struct gsm48_system_information_type_1 *si1;
|
struct gsm48_system_information_type_1 *si1;
|
||||||
|
|
||||||
|
@ -564,7 +577,6 @@ struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan,
|
||||||
GSM48_HOCMD_CCHDESC_LEN,
|
GSM48_HOCMD_CCHDESC_LEN,
|
||||||
si1->cell_channel_description);
|
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);
|
msgb_tv_put(msg, GSM48_IE_CHANMODE_1, new_lchan->current_ch_mode_rate.chan_mode);
|
||||||
|
|
||||||
|
|
|
@ -1216,7 +1216,7 @@ static void ho_fsm_wait_rr_ho_detect_onenter(struct osmo_fsm_inst *fi, uint32_t
|
||||||
struct handover *ho = &conn->ho;
|
struct handover *ho = &conn->ho;
|
||||||
|
|
||||||
struct msgb *rr_ho_cmd = gsm48_make_ho_cmd(ho->new_lchan,
|
struct msgb *rr_ho_cmd = gsm48_make_ho_cmd(ho->new_lchan,
|
||||||
ho->scope,
|
ho->async, ho->scope,
|
||||||
ho->new_lchan->ms_power,
|
ho->new_lchan->ms_power,
|
||||||
ho->ho_ref);
|
ho->ho_ref);
|
||||||
if (!rr_ho_cmd) {
|
if (!rr_ho_cmd) {
|
||||||
|
|
Loading…
Reference in New Issue