aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-06-12 19:53:34 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-01-22 17:25:05 +0100
commit58e982c197634608307f98f9922e14ecdc82151a (patch)
treec8167a40c6d72a44bd7bd1c23f6541997418b114
parentdae775d76a4489d3acc7fe623df08a2dbda1c676 (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. Conflicts: src/common/rsl.c
-rw-r--r--src/common/handover.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/common/handover.c b/src/common/handover.c
index 8ac24166..e02c128f 100644
--- a/src/common/handover.c
+++ b/src/common/handover.c
@@ -41,7 +41,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;
@@ -63,17 +65,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;
}
@@ -92,14 +97,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;
@@ -116,7 +122,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);
@@ -125,11 +133,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;