diff options
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h | 1 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/gsm48_rr.c | 15 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h index 9a96a848..830c8cf5 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h @@ -192,5 +192,6 @@ int gsm48_rr_rach_conf(struct osmocom_ms *ms, uint32_t fn); extern const char *gsm48_rr_state_names[]; int gsm48_rr_start_monitor(struct osmocom_ms *ms); int gsm48_rr_stop_monitor(struct osmocom_ms *ms); +int gsm48_rr_alter_delay(struct osmocom_ms *ms); #endif /* _GSM48_RR_H */ diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index e1d37c08..e44f3f77 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -353,6 +353,21 @@ static uint8_t gsm48_rr_check_mode(struct osmocom_ms *ms, uint8_t chan_nr, return 0; } +/* apply new "alter_delay" in dedicated mode */ +int gsm48_rr_alter_delay(struct osmocom_ms *ms) +{ + struct gsm48_rrlayer *rr = &ms->rrlayer; + struct gsm_settings *set = &rr->ms->settings; + + if (rr->state != GSM48_RR_ST_DEDICATED) + return -EINVAL; + l1ctl_tx_param_req(ms, rr->cd_now.ind_ta - set->alter_delay, + (set->alter_tx_power) ? set->alter_tx_power_value + : rr->cd_now.ind_tx_power); + + return 0; +} + /* * state transition */ diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 8c3ec026..66afce28 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1123,6 +1123,7 @@ DEFUN(cfg_ms_sim_delay, cfg_ms_sim_delay_cmd, "simulated-delay <-128-127>", struct osmocom_ms *ms = vty->index; ms->settings.alter_delay = atoi(argv[0]); + gsm48_rr_alter_delay(ms); return CMD_SUCCESS; } @@ -1133,6 +1134,7 @@ DEFUN(cfg_ms_no_sim_delay, cfg_ms_no_sim_delay_cmd, "no simulated-delay", struct osmocom_ms *ms = vty->index; ms->settings.alter_delay = 0; + gsm48_rr_alter_delay(ms); return CMD_SUCCESS; } |