diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2023-06-26 16:20:39 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2023-07-21 13:33:46 +0200 |
commit | b0712a9f228b2f6823be174ed2c88cf9e7c708ee (patch) | |
tree | 652c9129c4832d4a9ca7b41694c0d06e6d5671fd | |
parent | b620a1d99419b505a4902778ec77cb80a9a6f7a4 (diff) |
ASCI: Send release on VGCS/VBS channel via unit data
Channel release is sent to MS that is in dedicated mode on the main
DCCH. Additionally it is sent as unit data on a VGCS/VBS to notify all
listeners that the channel has been released. All listeners return to
IDLE mode.
Change-Id: Ib777fe98c8ce2342082d88d227b796167d92cfe1
Related: OS#4852
-rw-r--r-- | include/osmocom/bsc/gsm_04_08_rr.h | 2 | ||||
-rw-r--r-- | src/osmo-bsc/gsm_04_08_rr.c | 20 | ||||
-rw-r--r-- | src/osmo-bsc/lchan_fsm.c | 10 |
3 files changed, 25 insertions, 7 deletions
diff --git a/include/osmocom/bsc/gsm_04_08_rr.h b/include/osmocom/bsc/gsm_04_08_rr.h index 3106e7739..9a9956b95 100644 --- a/include/osmocom/bsc/gsm_04_08_rr.h +++ b/include/osmocom/bsc/gsm_04_08_rr.h @@ -18,7 +18,7 @@ struct gsm_subscriber_connection; void gsm_net_update_ctype(struct gsm_network *network); enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *network, uint8_t ra); int get_reason_by_chreq(uint8_t ra, int neci); -int gsm48_send_rr_release(struct gsm_lchan *lchan); +int gsm48_send_rr_release(struct gsm_lchan *lchan, bool ui); int send_siemens_mrpci(struct gsm_lchan *lchan, uint8_t *classmark2_lv); int gsm48_send_rr_classmark_enquiry(struct gsm_lchan *lchan); diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c index 78a4f4572..60ccb5ac9 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -308,12 +308,15 @@ static int generate_cell_sel_ind_after_rel(uint8_t *out, unsigned int out_len, c } } +#define REPEAT_RR_RELEASE_UI 3 + /* 7.1.7 and 9.1.7: RR CHANnel RELease */ -int gsm48_send_rr_release(struct gsm_lchan *lchan) +int gsm48_send_rr_release(struct gsm_lchan *lchan, bool ui) { - struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 RR REL"); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 RR REL"), *msgc; struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); uint8_t *cause; + int n; msg->lchan = lchan; gh->proto_discr = GSM48_PDISC_RR; @@ -338,8 +341,17 @@ int gsm48_send_rr_release(struct gsm_lchan *lchan) gsm_lchan_name(lchan), lchan->release.rr_cause, rr_cause_name(lchan->release.rr_cause)); - /* Send actual release request to MS */ - return gsm48_sendmsg(msg); + /* Send actual release request to MS (dedicated channel) */ + if (!ui) + return gsm48_sendmsg(msg); + + /* Send actual release request to MS (VGCS channel) */ + for (n = 1; n < REPEAT_RR_RELEASE_UI; n++) { + msgc = msgb_copy(msg, "CHAN RELEASE copy"); + msgc->lchan = lchan; + gsm48_sendmsg_unit(msgc); + } + return gsm48_sendmsg_unit(msg); } int send_siemens_mrpci(struct gsm_lchan *lchan, diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 70fb81161..26c188236 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -1421,8 +1421,14 @@ static bool should_sacch_deact(struct gsm_lchan *lchan) static void lchan_do_release(struct gsm_lchan *lchan) { - if (lchan->release.do_rr_release && lchan->sapis[0] != LCHAN_SAPI_UNUSED) - gsm48_send_rr_release(lchan); + if (lchan->release.do_rr_release) { + /* To main DCCH in dedicated and group transmit mode */ + if (lchan->sapis[0] != LCHAN_SAPI_UNUSED) + gsm48_send_rr_release(lchan, false); + /* As UI to all listeners in group receive mode */ + if (lchan_is_asci(lchan)) + gsm48_send_rr_release(lchan, true); + } if (lchan->fi_rtp) osmo_fsm_inst_dispatch(lchan->fi_rtp, LCHAN_RTP_EV_RELEASE, 0); |