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.
This commit is contained in:
Harald Welte 2009-07-19 18:36:49 +02:00
parent 7543eb72d0
commit ae0f2362bb
3 changed files with 25 additions and 1 deletions

View File

@ -477,6 +477,7 @@ u_int8_t lchan2chan_nr(struct gsm_lchan *lchan);
/* to be provided by external code */
int abis_rsl_sendmsg(struct msgb *msg);
int rsl_deact_sacch(struct gsm_lchan *lchan);
int rsl_chan_release(struct gsm_lchan *lchan);
/* BCCH related code */

View File

@ -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)
{

View File

@ -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 */