2020-07-03 15:27:01 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <osmo-bts/gsm_data.h>
|
|
|
|
|
2020-09-25 16:55:55 +00:00
|
|
|
struct gsm_bts_bb_trx {
|
|
|
|
struct gsm_abis_mo mo;
|
|
|
|
};
|
|
|
|
|
2020-07-03 15:27:01 +00:00
|
|
|
/* One TRX in a BTS */
|
|
|
|
struct gsm_bts_trx {
|
|
|
|
/* list header in bts->trx_list */
|
|
|
|
struct llist_head list;
|
|
|
|
|
|
|
|
struct gsm_bts *bts;
|
|
|
|
/* number of this TRX in the BTS */
|
|
|
|
uint8_t nr;
|
|
|
|
/* human readable name / description */
|
|
|
|
char *description;
|
|
|
|
/* how do we talk RSL with this TRX? */
|
|
|
|
uint8_t rsl_tei;
|
|
|
|
struct e1inp_sign_link *rsl_link;
|
|
|
|
|
2020-09-25 16:55:55 +00:00
|
|
|
/* NM Radio Carrier and Baseband Transciever */
|
2020-07-03 15:27:01 +00:00
|
|
|
struct gsm_abis_mo mo;
|
2020-09-25 16:55:55 +00:00
|
|
|
struct gsm_bts_bb_trx bb_transc;
|
2020-07-03 15:27:01 +00:00
|
|
|
|
|
|
|
uint16_t arfcn;
|
|
|
|
int nominal_power; /* in dBm */
|
|
|
|
unsigned int max_power_red; /* in actual dB */
|
|
|
|
uint8_t max_power_backoff_8psk; /* in actual dB OC-2G only */
|
|
|
|
uint8_t c0_idle_power_red; /* in actual dB OC-2G only */
|
|
|
|
|
2021-09-09 16:31:55 +00:00
|
|
|
uint8_t ta_ctrl_interval; /* 1 step is 2 SACCH periods */
|
2020-07-03 15:27:01 +00:00
|
|
|
|
|
|
|
struct trx_power_params power_params;
|
2020-12-24 14:01:50 +00:00
|
|
|
struct gsm_power_ctrl_params *bs_dpc_params; /* BS Dynamic Power Control */
|
|
|
|
struct gsm_power_ctrl_params *ms_dpc_params; /* MS Dynamic Power Control */
|
2020-07-03 15:27:01 +00:00
|
|
|
bool ms_pwr_ctl_soft; /* is power control loop done by osmocom software? */
|
|
|
|
|
2021-05-07 01:28:04 +00:00
|
|
|
/* The associated PHY instance */
|
|
|
|
struct phy_instance *pinst;
|
2020-07-03 15:27:01 +00:00
|
|
|
|
|
|
|
struct gsm_bts_trx_ts ts[TRX_NR_TS];
|
|
|
|
};
|
|
|
|
|
2020-09-25 16:55:55 +00:00
|
|
|
static inline struct gsm_bts_trx *gsm_bts_bb_trx_get_trx(struct gsm_bts_bb_trx *bb_transc) {
|
|
|
|
return (struct gsm_bts_trx *)container_of(bb_transc, struct gsm_bts_trx, bb_transc);
|
|
|
|
}
|
2020-07-03 15:27:01 +00:00
|
|
|
|
|
|
|
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
|
|
|
|
struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num);
|
2021-05-27 16:26:29 +00:00
|
|
|
void gsm_bts_trx_init_shadow_ts(struct gsm_bts_trx *trx);
|
2021-10-11 09:05:30 +00:00
|
|
|
void gsm_bts_trx_free_shadow_ts(struct gsm_bts_trx *trx);
|
2020-07-03 15:27:01 +00:00
|
|
|
char *gsm_trx_name(const struct gsm_bts_trx *trx);
|
|
|
|
const char *gsm_trx_unit_id(struct gsm_bts_trx *trx);
|
|
|
|
|
|
|
|
int trx_link_estab(struct gsm_bts_trx *trx);
|
2020-09-15 11:36:02 +00:00
|
|
|
void trx_operability_update(struct gsm_bts_trx *trx);
|
2020-07-03 15:27:01 +00:00
|
|
|
|
2021-05-08 00:34:36 +00:00
|
|
|
uint8_t num_agch(const struct gsm_bts_trx *trx, const char * arg);
|
2020-08-02 18:53:40 +00:00
|
|
|
bool trx_ms_pwr_ctrl_is_osmo(const struct gsm_bts_trx *trx);
|
2020-07-03 15:27:01 +00:00
|
|
|
|
|
|
|
#define LOGPTRX(trx, ss, lvl, fmt, args...) LOGP(ss, lvl, "%s " fmt, gsm_trx_name(trx), ## args)
|