jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33617 )
Change subject: ASCI: Send release on VGCS/VBS channel via unit data ......................................................................
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 --- M include/osmocom/bsc/gsm_04_08_rr.h M src/osmo-bsc/gsm_04_08_rr.c M src/osmo-bsc/lchan_fsm.c 3 files changed, 40 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/17/33617/1
diff --git a/include/osmocom/bsc/gsm_04_08_rr.h b/include/osmocom/bsc/gsm_04_08_rr.h index 3106e77..9a9956b 100644 --- a/include/osmocom/bsc/gsm_04_08_rr.h +++ b/include/osmocom/bsc/gsm_04_08_rr.h @@ -18,7 +18,7 @@ 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 78a4f45..60ccb5a 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -308,12 +308,15 @@ } }
+#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 @@ 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 99bdaf2..cdeecd8 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -1417,8 +1417,14 @@
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 mdoe */ + 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);