diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-07-06 03:36:03 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2021-07-11 20:28:02 +0200 |
commit | e5a761c6b86a5d5e1422bd491fb38bf30cf43bc6 (patch) | |
tree | e54050c5491269190795c5b13e4dda07890db135 /src/osmo-bsc/bsc_vty.c | |
parent | 9de09c974fc1916023f17996822a29b41bcefb61 (diff) |
RES IND: parse msg and store interference levels in lchans
Also show the current interference levels of unused lchans in the vty.
Related: SYS#5313
Change-Id: Iccc1391e8419604bb09e464db8455e053dfbc982
Diffstat (limited to 'src/osmo-bsc/bsc_vty.c')
-rw-r--r-- | src/osmo-bsc/bsc_vty.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 070b66081..07c8a9c9e 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1682,6 +1682,14 @@ static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan) - lchan->bs_power_db, ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power), VTY_NEWLINE); + + vty_out(vty, " Interference Level: "); + if (lchan->interf_dbm == INTERF_DBM_UNKNOWN) + vty_out(vty, "unknown"); + else + vty_out(vty, "%d dBm (%u)", lchan->interf_dbm, lchan->interf_band); + vty_out(vty, "%s", VTY_NEWLINE); + vty_out(vty, " Channel Mode / Codec: %s%s", gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), VTY_NEWLINE); @@ -1733,8 +1741,21 @@ static void lchan_dump_short_vty(struct vty *vty, struct gsm_lchan *lchan) lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, gsm_pchan_name(lchan->ts->pchan_on_init)); vty_out_dyn_ts_status(vty, lchan->ts); - vty_out(vty, ", Lchan %u, Type %s%s TSC-s%dc%u, State %s - L1 MS Power: %u dBm RXL-FULL-dl: %4d dBm RXL-FULL-ul: %4d dBm%s", - lchan->nr, + vty_out(vty, ", Lchan %u", lchan->nr); + + if (lchan_state_is(lchan, LCHAN_ST_UNUSED)) { + vty_out(vty, ", Type %s, State %s - Interference Level: ", + gsm_pchan_name(lchan->ts->pchan_is), + lchan_state_name(lchan)); + if (lchan->interf_dbm == INTERF_DBM_UNKNOWN) + vty_out(vty, "unknown"); + else + vty_out(vty, "%d dBm (%u)", lchan->interf_dbm, lchan->interf_band); + vty_out(vty, "%s", VTY_NEWLINE); + return; + } + + vty_out(vty, ", Type %s%s TSC-s%dc%u, State %s - L1 MS Power: %u dBm RXL-FULL-dl: %4d dBm RXL-FULL-ul: %4d dBm%s", gsm_lchant_name(lchan->type), lchan->vamos.enabled ? " (VAMOS)" : "", lchan->tsc_set > 0 ? lchan->tsc_set : 1, |