From dbb1d883594ba8796acbc7831d4ad042c7070d12 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 30 Nov 2009 19:16:47 +0100 Subject: [PATCH] [handover] export measurement reports via signal This patch introduces the S_LCHAN_MEAS_REP signal which is used to export measurement reports as input to the yet-to-be-written handover algorithm. --- openbsc/include/openbsc/meas_rep.h | 2 ++ openbsc/include/openbsc/signal.h | 1 + openbsc/src/abis_rsl.c | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openbsc/include/openbsc/meas_rep.h b/openbsc/include/openbsc/meas_rep.h index 0c2bdabde..b1ad2daa8 100644 --- a/openbsc/include/openbsc/meas_rep.h +++ b/openbsc/include/openbsc/meas_rep.h @@ -30,6 +30,8 @@ struct gsm_meas_rep_unidir { /* parsed uplink and downlink measurement result */ struct gsm_meas_rep { + struct gsm_lchan *lchan; + u_int8_t nr; unsigned int flags; diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h index fbd61ae9e..5156fcb79 100644 --- a/openbsc/include/openbsc/signal.h +++ b/openbsc/include/openbsc/signal.h @@ -83,6 +83,7 @@ enum signal_lchan { S_LCHAN_HANDOVER_COMPL, /* 04.08 Handover Completed */ S_LCHAN_HANDOVER_FAIL, /* 04.08 Handover Failed */ S_LCHAN_HANDOVER_DETECT, /* 08.58 Handover Detect */ + S_LCHAN_MEAS_REP, /* 08.58 Measurement Report */ }; /* SS_SUBSCR signals */ diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c index 8033a3c74..b049c3c8a 100644 --- a/openbsc/src/abis_rsl.c +++ b/openbsc/src/abis_rsl.c @@ -1005,6 +1005,8 @@ static int rsl_rx_meas_res(struct msgb *msg) memset(&mr, 0, sizeof(mr)); + mr.lchan = msg->lchan; + rsl_tlv_parse(&tp, dh->data, msgb_l2len(msg)-sizeof(*dh)); if (!TLVP_PRESENT(&tp, RSL_IE_MEAS_RES_NR) || @@ -1048,9 +1050,10 @@ static int rsl_rx_meas_res(struct msgb *msg) return rc; } - /* FIXME: do something with the actual result*/ print_meas_rep(&mr); + dispatch_signal(SS_LCHAN, S_LCHAN_MEAS_REP, &mr); + return 0; }