diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-25 18:32:16 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-25 19:14:44 +0200 |
commit | 6321c72522897b2e8df787a73441f699b5af28d9 (patch) | |
tree | 6febed4d7dc06a3576a963d102f572c866b4080d /src | |
parent | e851e134134b37113adc82d052bb5ba7e227797d (diff) |
rsl/pcu: Do not send a CHAN ACT to the BSC on PCU usage
The PCU is forcing the activation of a PDCH. Currently the BSC
will receive a channel act ack for a channel that was not
activated at all. Use the "release_reason" flag of the lchan
to see if we have requested a normal activation or a silent
one.
It feels a bit odd to do it in the TX function but it is the
most easy solution right now. I have added logging so it will
not be totally silent.
Diffstat (limited to 'src')
-rw-r--r-- | src/common/pcu_sock.c | 1 | ||||
-rw-r--r-- | src/common/rsl.c | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index a90caacf..3fef9b12 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -538,6 +538,7 @@ static int pcu_rx_act_req(struct gsm_bts *bts, return -EINVAL; lchan = trx->ts[act_req->ts_nr].lchan; + lchan->rel_act_kind = LCHAN_REL_ACT_PCU; if (lchan->type != GSM_LCHAN_PDTCH) { LOGP(DPCU, LOGL_ERROR, "Lchan is not of type PDCH, but %d.\n", lchan->type); diff --git a/src/common/rsl.c b/src/common/rsl.c index 0bcb6202..ad3150cf 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -489,6 +489,12 @@ int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan) struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); + if (lchan->rel_act_kind != LCHAN_REL_ACT_RSL) { + LOGP(DRSL, LOGL_NOTICE, "%s not sending REL ACK\n", + gsm_lchan_name(lchan)); + return 0; + } + LOGP(DRSL, LOGL_NOTICE, "%s Tx RF CHAN REL ACK\n", gsm_lchan_name(lchan)); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); @@ -508,6 +514,12 @@ int rsl_tx_chan_act_ack(struct gsm_lchan *lchan, struct gsm_time *gtime) uint8_t chan_nr = gsm_lchan2chan_nr(lchan); uint8_t ie[2]; + if (lchan->rel_act_kind != LCHAN_REL_ACT_RSL) { + LOGP(DRSL, LOGL_NOTICE, "%s not sending CHAN ACT ACK\n", + gsm_lchan_name(lchan)); + return 0; + } + LOGP(DRSL, LOGL_NOTICE, "%s Tx CHAN ACT ACK\n", gsm_lchan_name(lchan)); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); @@ -531,6 +543,12 @@ int rsl_tx_chan_act_nack(struct gsm_lchan *lchan, uint8_t cause) struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); + if (lchan->rel_act_kind != LCHAN_REL_ACT_RSL) { + LOGP(DRSL, LOGL_DEBUG, "%s not sending CHAN ACT NACK.\n", + gsm_lchan_name(lchan)); + return 0; + } + LOGP(DRSL, LOGL_NOTICE, "%s Sending Channel Activated NACK: cause = 0x%02x\n", gsm_lchan_name(lchan), cause); @@ -763,6 +781,7 @@ static int rsl_rx_chan_activ(struct msgb *msg) dch->chan_nr, type, lchan->tch_mode); /* actually activate the channel in the BTS */ + lchan->rel_act_kind = LCHAN_REL_ACT_RSL; return bts_model_rsl_chan_act(msg->lchan, &tp); } @@ -778,6 +797,7 @@ static int rsl_rx_rf_chan_rel(struct gsm_lchan *lchan) msgb_queue_flush(&lchan->dl_tch_queue); } + lchan->rel_act_kind = LCHAN_REL_ACT_RSL; rc = bts_model_rsl_chan_rel(lchan); lapdm_channel_exit(&lchan->lapdm_ch); |