aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-07-14 19:48:33 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-07-15 16:11:19 +0200
commit7d37261be4071f7ba38b7be6a2a5a5ae3c0b7d8a (patch)
tree8db62c22be8b5f1b28892e53246f348990bde390
parentac63d39a5a53d00f55fc40ec40ffa6ca2f4e0752 (diff)
smscb: Tx Failure and Restart Ind using CGI as cellID
Let's use CGI instead of LAC+CI, which contains only a subset of the information. Furthermore, It was noted that some third party (non-osmocom, non open source) CBCs don't support/like receiving LAC+CI, and expect to receive CGI instead. Related: SYS#5910 Change-Id: I33a6216f89496484cbb3921609fcd3ab90761c69 (cherry picked from commit f3a4844f04906b38d521da150ed8aadedf8b917b)
-rw-r--r--src/osmo-bsc/smscb.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c
index 0e9049fc2..32f8f98a6 100644
--- a/src/osmo-bsc/smscb.c
+++ b/src/osmo-bsc/smscb.c
@@ -481,20 +481,15 @@ int cbsp_tx_restart_bts(struct bsc_cbc_link *cbc, bool is_emerg, struct gsm_bts
{
struct osmo_cbsp_decoded *cbsp = osmo_cbsp_decoded_alloc(cbc, CBSP_MSGT_RESTART);
struct osmo_cbsp_cell_ent cell_ent;
+ struct osmo_cell_global_id *cgi;
if (is_emerg)
cbsp->u.restart.bcast_msg_type = 0x01;
cbsp->u.restart.recovery_ind = 0x00; /* message data available */
- cbsp->u.restart.cell_list.id_discr = CELL_IDENT_LAC_AND_CI;
+ cbsp->u.restart.cell_list.id_discr = CELL_IDENT_WHOLE_GLOBAL;
- cell_ent = (struct osmo_cbsp_cell_ent){
- .cell_id = {
- .lac_and_ci = {
- .lac = bts->location_area_code,
- .ci = bts->cell_identity,
- }
- }
- };
+ cgi = bts_get_cgi(bts);
+ cell_ent.cell_id.global = *cgi;
llist_add(&cell_ent.list, &cbsp->u.restart.cell_list.list);
return cbsp_tx_decoded(cbc, cbsp);
@@ -505,20 +500,15 @@ int cbsp_tx_failure_bts(struct bsc_cbc_link *cbc, bool is_emerg, struct gsm_bts
{
struct osmo_cbsp_decoded *cbsp = osmo_cbsp_decoded_alloc(cbc, CBSP_MSGT_FAILURE);
struct osmo_cbsp_fail_ent fail_ent;
+ struct osmo_cell_global_id *cgi;
if (is_emerg)
cbsp->u.failure.bcast_msg_type = 0x01;
- fail_ent = (struct osmo_cbsp_fail_ent){
- .id_discr = CELL_IDENT_LAC_AND_CI,
- .cell_id = {
- .lac_and_ci = {
- .lac = bts->location_area_code,
- .ci = bts->cell_identity,
- }
- },
- .cause = OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL
- };
+ cgi = bts_get_cgi(bts);
+ fail_ent.id_discr = CELL_IDENT_WHOLE_GLOBAL;
+ fail_ent.cell_id.global = *cgi;
+ fail_ent.cause = OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL;
llist_add(&fail_ent.list, &cbsp->u.failure.fail_list);
return cbsp_tx_decoded(cbc, cbsp);