summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-06-27 02:53:10 +0200
committerHarald Welte <laforge@gnumonks.org>2009-06-27 03:09:38 +0200
commit10d0e67e2cb94ae9af8622992b1e5f2bc8dd4516 (patch)
tree8f6bf3aca9ecc5f81d4cddb37d2a3ec03e67a1e0 /openbsc/src
parent6bfda782b9cc30b5c10ad0290949c6d25d4c83cf (diff)
add new DMEAS debug category for measurement reporting
disable it by default
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/abis_rsl.c27
-rw-r--r--openbsc/src/debug.c3
-rw-r--r--openbsc/src/gsm_04_08.c12
3 files changed, 22 insertions, 20 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 0488b9dfe..397d793c7 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -823,42 +823,42 @@ static int rsl_rx_meas_res(struct msgb *msg)
struct abis_rsl_dchan_hdr *dh = msgb_l2(msg);
struct tlv_parsed tp;
- DEBUGPC(DRSL, "MEASUREMENT RESULT ");
+ DEBUGPC(DMEAS, "MEASUREMENT RESULT ");
rsl_tlv_parse(&tp, dh->data, msgb_l2len(msg)-sizeof(*dh));
if (TLVP_PRESENT(&tp, RSL_IE_MEAS_RES_NR))
- DEBUGPC(DRSL, "NR=%d ", *TLVP_VAL(&tp, RSL_IE_MEAS_RES_NR));
+ DEBUGPC(DMEAS, "NR=%d ", *TLVP_VAL(&tp, RSL_IE_MEAS_RES_NR));
if (TLVP_PRESENT(&tp, RSL_IE_UPLINK_MEAS)) {
u_int8_t len = TLVP_LEN(&tp, RSL_IE_UPLINK_MEAS);
const u_int8_t *val = TLVP_VAL(&tp, RSL_IE_UPLINK_MEAS);
if (len >= 3) {
if (val[0] & 0x40)
- DEBUGPC(DRSL, "DTXd ");
- DEBUGPC(DRSL, "RXL-FULL-up=%d RXL-SUB-up=%d ",
+ DEBUGPC(DMEAS, "DTXd ");
+ DEBUGPC(DMEAS, "RXL-FULL-up=%d RXL-SUB-up=%d ",
val[0] & 0x3f, val[1] & 0x3f);
- DEBUGPC(DRSL, "RXQ-FULL-up=%d RXQ-SUB-up=%d ",
+ DEBUGPC(DMEAS, "RXQ-FULL-up=%d RXQ-SUB-up=%d ",
val[2]>>3 & 0x7, val[2] & 0x7);
}
}
if (TLVP_PRESENT(&tp, RSL_IE_BS_POWER))
- DEBUGPC(DRSL, "BS_POWER=%d ", *TLVP_VAL(&tp, RSL_IE_BS_POWER));
+ DEBUGPC(DMEAS, "BS_POWER=%d ", *TLVP_VAL(&tp, RSL_IE_BS_POWER));
if (TLVP_PRESENT(&tp, RSL_IE_MS_TIMING_OFFSET))
- DEBUGPC(DRSL, "MS_TO=%d ",
+ DEBUGPC(DMEAS, "MS_TO=%d ",
*TLVP_VAL(&tp, RSL_IE_MS_TIMING_OFFSET));
if (TLVP_PRESENT(&tp, RSL_IE_L1_INFO)) {
u_int8_t *val = TLVP_VAL(&tp, RSL_IE_L1_INFO);
u_int8_t pwr_lvl = val[0] >> 3;
- DEBUGPC(DRSL, "L1_MS_PWR=%ddBm ",
+ DEBUGPC(DMEAS, "L1_MS_PWR=%ddBm ",
ms_pwr_dbm(msg->trx->bts->band, pwr_lvl));
- DEBUGPC(DRSL, "L1_FPC=%u ", val[0] & 0x04 ? 1 : 0);
- DEBUGPC(DRSL, "L1_TA=%u ", val[1]);
+ DEBUGPC(DMEAS, "L1_FPC=%u ", val[0] & 0x04 ? 1 : 0);
+ DEBUGPC(DMEAS, "L1_TA=%u ", val[1]);
}
if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) {
- DEBUGPC(DRSL, "L3\n");
+ DEBUGPC(DMEAS, "L3\n");
msg->l3h = TLVP_VAL(&tp, RSL_IE_L3_INFO);
return gsm0408_rcvmsg(msg);
} else
- DEBUGPC(DRSL, "\n");
+ DEBUGPC(DMEAS, "\n");
return 0;
}
@@ -872,7 +872,8 @@ static int abis_rsl_rx_dchan(struct msgb *msg)
msg->lchan = lchan_lookup(msg->trx, rslh->chan_nr);
ts_name = gsm_ts_name(msg->lchan->ts);
- DEBUGP(DRSL, "channel=%s chan_nr=0x%02x ", ts_name, rslh->chan_nr);
+ if (rslh->c.msg_type != RSL_MT_MEAS_RES)
+ DEBUGP(DRSL, "channel=%s chan_nr=0x%02x ", ts_name, rslh->chan_nr);
switch (rslh->c.msg_type) {
case RSL_MT_CHAN_ACTIV_ACK:
diff --git a/openbsc/src/debug.c b/openbsc/src/debug.c
index aeb993097..6483710af 100644
--- a/openbsc/src/debug.c
+++ b/openbsc/src/debug.c
@@ -28,7 +28,7 @@
#include <openbsc/debug.h>
-unsigned int debug_mask = 0xffffffff & ~(DMI|DMIB);
+unsigned int debug_mask = 0xffffffff & ~(DMI|DMIB|DMEAS);
struct debug_info {
const char *name;
@@ -56,6 +56,7 @@ static const struct debug_info debug_info[] = {
DEBUG_CATEGORY(DMI, "DMI", "", "")
DEBUG_CATEGORY(DMIB, "DMIB", "", "")
DEBUG_CATEGORY(DMUX, "DMUX", "", "")
+ DEBUG_CATEGORY(DMEAS, "DMEAS", "", "")
};
static int use_color = 1;
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 6d8530bcb..56d3a1ccb 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1697,20 +1697,20 @@ static int gsm48_rx_rr_meas_rep(struct msgb *msg)
unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
static struct gsm_meas_rep meas_rep;
- DEBUGP(DRR, "MEASUREMENT REPORT ");
+ DEBUGP(DMEAS, "MEASUREMENT REPORT ");
parse_meas_rep(&meas_rep, gh->data, payload_len);
if (meas_rep.flags & MEAS_REP_F_DTX)
- DEBUGPC(DRR, "DTX ");
+ DEBUGPC(DMEAS, "DTX ");
if (meas_rep.flags & MEAS_REP_F_BA1)
- DEBUGPC(DRR, "BA1 ");
+ DEBUGPC(DMEAS, "BA1 ");
if (!(meas_rep.flags & MEAS_REP_F_VALID))
- DEBUGPC(DRR, "NOT VALID ");
+ DEBUGPC(DMEAS, "NOT VALID ");
else
- DEBUGPC(DRR, "FULL(lev=%u, qual=%u) SUB(lev=%u, qual=%u) ",
+ DEBUGPC(DMEAS, "FULL(lev=%u, qual=%u) SUB(lev=%u, qual=%u) ",
meas_rep.rxlev_full, meas_rep.rxqual_full, meas_rep.rxlev_sub,
meas_rep.rxqual_sub);
- DEBUGPC(DRR, "NUM_NEIGH=%u\n", meas_rep.num_cell);
+ DEBUGPC(DMEAS, "NUM_NEIGH=%u\n", meas_rep.num_cell);
/* FIXME: put the results somwhere */