summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-19 18:36:49 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-19 18:36:49 +0200
commitae0f2362bb5a02ade62a02b73c4754922553d831 (patch)
treef89e998df60326c8b2510894cd40de21bc28269e /openbsc/src
parent7543eb72d0ba91d17fe7c9a6cd7d630beab1b19f (diff)
send DEACTIVATE SACCH when sending RR CHANEL RELEASE
As per specification, we first send the RR CHANNEL RELEASE to the MS, and then tell the BTS to disable the SACCH on that channel.
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/abis_rsl.c19
-rw-r--r--openbsc/src/gsm_04_08.c6
2 files changed, 24 insertions, 1 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index df95e7979..cc4a22934 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -652,6 +652,25 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
return abis_rsl_sendmsg(msg);
}
+/* Chapter 8.4.5 */
+int rsl_deact_sacch(struct gsm_lchan *lchan)
+{
+ struct abis_rsl_dchan_hdr *dh;
+ struct msgb *msg = rsl_msgb_alloc();
+
+ dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
+ init_dchan_hdr(dh, RSL_MT_DEACTIVATE_SACCH);
+ dh->chan_nr = lchan2chan_nr(lchan);
+
+ msg->lchan = lchan;
+ msg->trx = lchan->ts->trx;
+
+ DEBUGP(DRSL, "DEACTivate SACCH CMD channel=%s chan_nr=0x%02x\n",
+ gsm_ts_name(lchan->ts), dh->chan_nr);
+
+ return abis_rsl_sendmsg(msg);
+}
+
/* Chapter 9.1.7 of 04.08 */
int rsl_chan_release(struct gsm_lchan *lchan)
{
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 9fb53a723..df4d3c668 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1769,7 +1769,11 @@ int gsm48_send_rr_release(struct gsm_lchan *lchan)
DEBUGP(DRR, "Sending Channel Release: Chan: Number: %d Type: %d\n",
lchan->nr, lchan->type);
- return gsm48_sendmsg(msg);
+ /* Send actual release request to MS */
+ gsm48_sendmsg(msg);
+
+ /* Deactivate the SACCH on the BTS side */
+ return rsl_deact_sacch(lchan);
}
/* Call Control */