add new DMEAS debug category for measurement reporting
disable it by default
This commit is contained in:
parent
6bfda782b9
commit
10d0e67e2c
|
@ -13,6 +13,7 @@
|
|||
#define DMNCC 0x0080
|
||||
#define DSMS 0x0100
|
||||
#define DPAG 0x0200
|
||||
#define DMEAS 0x0400
|
||||
|
||||
#define DMI 0x1000
|
||||
#define DMIB 0x2000
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in New Issue