diff options
author | Pau Espin Pedrol <pespin@espeweb.net> | 2021-02-09 18:47:34 +0100 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2021-02-22 12:29:12 +0000 |
commit | fe8de457acedf3505f94e27d054a663b674929e2 (patch) | |
tree | 25062b78c9ff11be118b11ffc145d4e7224fafb7 /src/pcu_vty.c | |
parent | 4df26588849f2cf54325f9584893a5ec9b6b502e (diff) |
Use ALPHA value received in SI13 from PCUIF
The old VTY command is marked as deprecated and still overrides the use
in case it's used.
Related: SYS#5358
Depends: libosmocore.git Change-Id I74fb0a3afc1ac4aadbfc609b882d929401f790eb
Depends: osmo-bsc.git Change-Id I8b97ea11bad5fe05f2f634945b5703ee9abde81d
Change-Id: I46f2a955b157a409055fca7fb917dc4f75482426
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r-- | src/pcu_vty.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 92ff8eb4..c2de92c6 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -230,7 +230,8 @@ static int config_write_pcu(struct vty *vty) vty_out(vty, " alloc-algorithm dynamic%s", VTY_NEWLINE); if (the_pcu->vty.force_two_phase) vty_out(vty, " two-phase-access%s", VTY_NEWLINE); - vty_out(vty, " alpha %d%s", the_pcu->vty.alpha, VTY_NEWLINE); + if (the_pcu->vty.force_alpha != (uint8_t)-1) + vty_out(vty, " alpha %u%s", the_pcu->vty.force_alpha, VTY_NEWLINE); vty_out(vty, " gamma %d%s", the_pcu->vty.gamma * 2, VTY_NEWLINE); if (!the_pcu->vty.dl_tbf_preemptive_retransmission) vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE); @@ -735,13 +736,19 @@ DEFUN_ATTR(cfg_pcu_no_two_phase, DEFUN_ATTR(cfg_pcu_alpha, cfg_pcu_alpha_cmd, - "alpha <0-10>", + "alpha (si13|<0-10>)", "Alpha parameter for MS power control in units of 0.1 (see TS 05.08) " "NOTE: Be sure to set Alpha value at System information 13 too.\n" - "Alpha in units of 0.1\n", - CMD_ATTR_IMMEDIATE) + "Use value received from BSC in System Intormation 13 (default)\n" + "Force Alpha in units of 0.1\n", + CMD_ATTR_IMMEDIATE | CMD_ATTR_DEPRECATED) { - the_pcu->vty.alpha = atoi(argv[0]); + vty_out(vty, "%% 'alpha <0-10>' is now deprecated: use osmo-bsc's 'gprs power-control alpha <0-10>' instead%s", + VTY_NEWLINE); + if (strcmp(argv[0], "si13") == 0) + the_pcu->vty.force_alpha = (uint8_t) -1; + else + the_pcu->vty.force_alpha = atoi(argv[0]); return CMD_SUCCESS; } |