diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-06-12 19:53:34 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-01-21 15:54:24 +0100 |
commit | ca15a5413d006431b5514b42619b8b7df3c85319 (patch) | |
tree | 4ae4d433b9d9f3be9eca9cf5420cf9a5d337dfe9 | |
parent | f00132e92991b144e92052fd08cb2d29c6d2ec2a (diff) |
Include the lchan name and state in log messages, just stop the timer
* Add gsm_lchan_name to the log messages to know which channel is
used for those.
* Fix typos
* The RACH detection is not disabled after the first access burst.
This means that the following:
if (lchan->ho.phys_info_count >= btsb->ny1) {
/* HO Abort */
might never be triggered and the channel activation/handover is
just guarded by timers in the bsc.
-rw-r--r-- | src/common/handover.c | 34 | ||||
-rw-r--r-- | src/common/rsl.c | 3 |
2 files changed, 22 insertions, 15 deletions
diff --git a/src/common/handover.c b/src/common/handover.c index 3d0a5e98..ce0f0220 100644 --- a/src/common/handover.c +++ b/src/common/handover.c @@ -42,7 +42,9 @@ static int ho_tx_phys_info(struct gsm_lchan *lchan, uint8_t ta) if (!msg) return -ENOMEM; - LOGP(DHO, LOGL_INFO, "Sending PHYSICAL INFORMATION to MS.\n"); + LOGP(DHO, LOGL_INFO, + "%s Sending PHYSICAL INFORMATION to MS.\n", + gsm_lchan_name(lchan)); /* Build RSL UNITDATA REQUEST message with 04.08 PHYS INFO */ msg->l3h = msg->data; @@ -64,17 +66,20 @@ static void ho_t3105_cb(void *data) struct gsm_bts *bts = lchan->ts->trx->bts; struct gsm_bts_role_bts *btsb = bts->role; - LOGP(DHO, LOGL_INFO, "T3105 timeout (%d resends left)\n", - btsb->ny1 - lchan->ho.phys_info_count); + LOGP(DHO, LOGL_INFO, "%s T3105 timeout (%d resends left)\n", + gsm_lchan_name(lchan), btsb->ny1 - lchan->ho.phys_info_count); if (lchan->state != LCHAN_S_ACTIVE) { - LOGP(DHO, LOGL_NOTICE, "NY1 reached, sending CONNection " - "FAILure to BSC.\n"); + LOGP(DHO, LOGL_NOTICE, + "%s is in not active. It is in state %s. Ignoring\n", + gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); return; } if (lchan->ho.phys_info_count >= btsb->ny1) { /* HO Abort */ + LOGP(DHO, LOGL_NOTICE, "%s NY1 reached, sending CONNection " + "FAILure to BSC.\n", gsm_lchan_name(lchan)); rsl_tx_conn_fail(lchan, RSL_ERR_HANDOVER_ACC_FAIL); return; } @@ -93,14 +98,15 @@ void handover_rach(struct gsm_bts_trx *trx, uint8_t chan_nr, /* Ignore invalid handover ref */ if (lchan->ho.ref != ra) { - LOGP(DHO, LOGL_INFO, "RACH on decicated channel received, but " + LOGP(DHO, LOGL_INFO, "%s RACH on dedicated channel received, but " "ra=0x%02x != expected ref=0x%02x. (This is no bug)\n", - ra, lchan->ho.ref); + gsm_lchan_name(lchan), ra, lchan->ho.ref); return; } - LOGP(DHO, LOGL_NOTICE, "RACH on decicated channel received with " - "TA=%u\n", acc_delay); + LOGP(DHO, LOGL_NOTICE, + "%s RACH on dedicated channel received with TA=%u\n", + gsm_lchan_name(lchan), acc_delay); /* Set timing advance */ lchan->rqd_ta = acc_delay; @@ -117,7 +123,9 @@ void handover_rach(struct gsm_bts_trx *trx, uint8_t chan_nr, ho_tx_phys_info(lchan, acc_delay); /* Start T3105 */ - LOGP(DHO, LOGL_DEBUG, "Starting T3105 with %u ms\n", btsb->t3105_ms); + LOGP(DHO, LOGL_DEBUG, + "%s Starting T3105 with %u ms\n", + gsm_lchan_name(lchan), btsb->t3105_ms); lchan->ho.t3105.cb = ho_t3105_cb; lchan->ho.t3105.data = lchan; osmo_timer_schedule(&lchan->ho.t3105, 0, btsb->t3105_ms * 1000); @@ -126,11 +134,11 @@ void handover_rach(struct gsm_bts_trx *trx, uint8_t chan_nr, /* received frist valid data frame on dedicated channel */ void handover_frame(struct gsm_lchan *lchan) { - LOGP(DHO, LOGL_INFO, "First valid frame detected\n"); + LOGP(DHO, LOGL_INFO, + "%s First valid frame detected\n", gsm_lchan_name(lchan)); /* Stop T3105 */ - if (osmo_timer_pending(&lchan->ho.t3105)) - osmo_timer_del(&lchan->ho.t3105); + osmo_timer_del(&lchan->ho.t3105); /* Handover process is done */ lchan->ho.active = 0; diff --git a/src/common/rsl.c b/src/common/rsl.c index 3d9c8f36..87db2984 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -838,8 +838,7 @@ static int rsl_rx_rf_chan_rel(struct gsm_lchan *lchan, uint8_t chan_nr) /* deactivate handover RACH detection and timer */ lchan->ho.active = 0; - if (osmo_timer_pending(&lchan->ho.t3105)) - osmo_timer_del(&lchan->ho.t3105); + osmo_timer_del(&lchan->ho.t3105); l1sap_chan_rel(lchan->ts->trx, chan_nr); |