From e5a761c6b86a5d5e1422bd491fb38bf30cf43bc6 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 6 Jul 2021 03:36:03 +0200 Subject: 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 --- include/osmocom/bsc/gsm_data.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/osmocom/bsc') diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index b07345de0..063294432 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -646,6 +646,9 @@ struct lchan_modify_info { bool vamos; }; +#define INTERF_DBM_UNKNOWN 0 +#define INTERF_BAND_UNKNOWN 0xff + struct gsm_lchan { /* The TS that we're part of */ struct gsm_bts_trx_ts *ts; @@ -781,6 +784,14 @@ struct gsm_lchan { /* Whether this lchan is activated/modified into a mode that allows VAMOS multiplexing at this moment */ bool enabled; } vamos; + + /* dBm value of interference level as reported in the most recent Resource Indication, if any for this lchan. Or + * INTERF_DBM_UNKNOWN if this lchan was not included in the most recent Resource Indication. + * The range is typically -115 to -85 dBm, here stored 1:1 as a signed integer, to ease comparison. */ + int16_t interf_dbm; + /* Actual reported interference band index, or INTERF_BAND_UNKNOWN if this lchan was not included in the most + * recent Resource Indication. */ + uint8_t interf_band; }; /* One Timeslot in a TRX */ -- cgit v1.2.3