aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts/gsm_data.h
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-08 16:23:57 +0200
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-18 18:56:57 +0200
commitd4efc3f9c5ea8b67ee9c34095dc8e593acfff3e0 (patch)
tree734f45e02efaa7bee70c2923ab019072c56aa03f /include/osmo-bts/gsm_data.h
parent64e1c1222e1331536fe45f1505229126e0b25fc9 (diff)
Report interference levels in RSL RF RESource INDication
This change implements general interference averaging logic for the higher layers. In l1sap_info_time_ind(), where we receive TDMA time updates from BTS model, call rsl_tx_rf_res() for each transceiver according to the interval defined by the Intave parameter received from the BSC. In rsl_tx_rf_res() perform the actual averaging for each inactive logical channel, and then send everything to the BSC over the A-bis/RSL. The BTS model specific code needs to report the measurements for each logical channel every 104 TDMA frames (SACCH period) by calling gsm_lchan_interf_meas_push(). Change-Id: Id80fdbef087de625149755165c025c0a9563dc85 Related: SYS#5313, OS#1569
Diffstat (limited to 'include/osmo-bts/gsm_data.h')
-rw-r--r--include/osmo-bts/gsm_data.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 6ce5c3b7..808b48a0 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -337,6 +337,9 @@ struct gsm_lchan {
/* standard deviation of toa256 value during measurement period */
uint16_t toa256_std_dev;
} ext;
+ /* Interference levels reported by PHY (in dBm) */
+ int16_t interf_meas_dbm[31]; /* Intave max is 31 */
+ uint8_t interf_meas_num;
} meas;
struct {
struct amr_multirate_conf amr_mr;
@@ -537,6 +540,9 @@ uint8_t gsm_lchan2chan_nr(const struct gsm_lchan *lchan);
uint8_t gsm_lchan_as_pchan2chan_nr(const struct gsm_lchan *lchan,
enum gsm_phys_chan_config as_pchan);
+void gsm_lchan_interf_meas_push(struct gsm_lchan *lchan, int dbm);
+int gsm_lchan_interf_meas_calc_band(struct gsm_lchan *lchan);
+
#define BSIC2BCC(bsic) ((bsic) & 0x07)
#define BTS_TSC(bts) BSIC2BCC((bts)->bsic)
@@ -558,4 +564,16 @@ int conf_lchans_as_pchan(struct gsm_bts_trx_ts *ts,
bool ts_is_pdch(const struct gsm_bts_trx_ts *ts);
+static inline bool lchan_is_dcch(const struct gsm_lchan *lchan)
+{
+ switch (lchan->type) {
+ case GSM_LCHAN_SDCCH:
+ case GSM_LCHAN_TCH_F:
+ case GSM_LCHAN_TCH_H:
+ return true;
+ default:
+ return false;
+ }
+}
+
#endif /* _GSM_DATA_H */