fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/27528 )
Change subject: System Information Type 3: allow updating T3212 at run-time
......................................................................
System Information Type 3: allow updating T3212 at run-time
The value in bts->si_common.chan_desc may get out of sync with the
actual value in net->T_defs (e.g. after changing it via the VTY),
so we need to sync it in generate_si3().
Change-Id: Iee291623c2825505eeb5175adcedadfe35375b9e
Related: SYS#5888
---
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/system_information.c
2 files changed, 20 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/28/27528/1
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index c1a6e44..5976721 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -2333,13 +2333,14 @@
return CMD_SUCCESS;
}
-/* FIXME: changing this value would not affect generated System Information */
-DEFUN(cfg_net_per_loc_upd, cfg_net_per_loc_upd_cmd,
- "periodic location update <6-1530>",
- "Periodic Location Updating Interval\n"
- "Periodic Location Updating Interval\n"
- "Periodic Location Updating Interval\n"
- "Periodic Location Updating Interval in Minutes\n")
+DEFUN_USRATTR(cfg_net_per_loc_upd,
+ cfg_net_per_loc_upd_cmd,
+ BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+ "periodic location update <6-1530>",
+ "Periodic Location Updating Interval\n"
+ "Periodic Location Updating Interval\n"
+ "Periodic Location Updating Interval\n"
+ "Periodic Location Updating Interval in Minutes\n")
{
struct gsm_network *net = vty->index;
struct osmo_tdef *d = osmo_tdef_get_entry(net->T_defs, 3212);
@@ -2350,13 +2351,14 @@
return CMD_SUCCESS;
}
-/* FIXME: changing this value would not affect generated System Information */
-DEFUN(cfg_net_no_per_loc_upd, cfg_net_no_per_loc_upd_cmd,
- "no periodic location update",
- NO_STR
- "Periodic Location Updating Interval\n"
- "Periodic Location Updating Interval\n"
- "Periodic Location Updating Interval\n")
+DEFUN_USRATTR(cfg_net_no_per_loc_upd,
+ cfg_net_no_per_loc_upd_cmd,
+ BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+ "no periodic location update",
+ NO_STR
+ "Periodic Location Updating Interval\n"
+ "Periodic Location Updating Interval\n"
+ "Periodic Location Updating Interval\n")
{
struct gsm_network *net = vty->index;
struct osmo_tdef *d = osmo_tdef_get_entry(net->T_defs, 3212);
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 27c60a0..5541d7b 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -963,6 +963,10 @@
si3->header.skip_indicator = 0;
si3->header.system_information = GSM48_MT_RR_SYSINFO_3;
+ /* The value in bts->si_common.chan_desc may get out of sync with the actual value
+ * in net->T_defs (e.g. after changing it via the VTY), so we need to sync it here.
*/
+ bts->si_common.chan_desc.t3212 = osmo_tdef_get(bts->network->T_defs, 3212,
OSMO_TDEF_CUSTOM, 0);
+
si3->cell_identity = htons(bts->cell_identity);
gsm48_generate_lai2(&si3->lai, bts_lai(bts));
si3->control_channel_desc = bts->si_common.chan_desc;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27528
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iee291623c2825505eeb5175adcedadfe35375b9e
Gerrit-Change-Number: 27528
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange