CBSP: on RESET, also clear the etws_timer, and stop ETWS PN broadcast

Normally, each ETWS CMD instructing to broadcast triggers a five second
etws_timer to send a zero-payload ETWS CMD that stops broadcasting, five
seconds later. Before this patch, this lingered past an ETWS RESET instruction.

Instead, clear the etws_timer on ETWS RESET, and make sure that all ETWS PN
broadcast is stopped by sending a zero payload ETWS CMD to the BTSes
immediately.

This will cause all CBSP ttcn3 tests to fail unless
Ifee313369a433a6a638c5fffdedee5363b8e47c2 is merged to osmo-ttcn3-hacks at the
same time.

Related: Ifee313369a433a6a638c5fffdedee5363b8e47c2 (osmo-ttcn3-hacks)
Change-Id: I925a041936c6163483d70fe6d158af368ec8c444
This commit is contained in:
Neels Hofmeyr 2020-08-13 16:21:55 +00:00 committed by neels
parent eb1306d781
commit 13011f62d1
1 changed files with 4 additions and 0 deletions

View File

@ -664,6 +664,10 @@ static int bts_rx_reset(struct gsm_bts *bts, const struct osmo_cbsp_decoded *dec
llist_for_each_entry_safe(smscb, smscb2, &chan_state->messages, list)
bts_smscb_del(smscb, chan_state, "RESET");
osmo_timer_del(&bts->etws_timer);
/* Make sure that broadcast is disabled */
rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, NULL, 0);
return 0;
}