diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-06-27 02:53:10 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-06-27 03:09:38 +0200 |
commit | 10d0e67e2cb94ae9af8622992b1e5f2bc8dd4516 (patch) | |
tree | 8f6bf3aca9ecc5f81d4cddb37d2a3ec03e67a1e0 /openbsc/src/abis_rsl.c | |
parent | 6bfda782b9cc30b5c10ad0290949c6d25d4c83cf (diff) |
add new DMEAS debug category for measurement reporting
disable it by default
Diffstat (limited to 'openbsc/src/abis_rsl.c')
-rw-r--r-- | openbsc/src/abis_rsl.c | 27 |
1 files changed, 14 insertions, 13 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: |