aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-17 12:22:40 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-17 13:40:03 +0100
commitd8cd756da48bcff9f9caf9e64fc0af047a165b60 (patch)
tree136d09901ae8420803500d92646944376ae21f59 /src/osmo-bts-litecell15
parent7c4a22dbc48f51eb199766bf1b29e061bf765cbd (diff)
Get rid of 'struct gsm_bts_role_bts'
gsm_bts_role_bts was introduced at a time when we still shared gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently needed a BTS-private structure. Since that sharing was abandoned quite some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away with the bts/btsb dualism in a lot of the code. Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
Diffstat (limited to 'src/osmo-bts-litecell15')
-rw-r--r--src/osmo-bts-litecell15/l1_if.c3
-rw-r--r--src/osmo-bts-litecell15/main.c4
-rw-r--r--src/osmo-bts-litecell15/oml.c3
-rw-r--r--src/osmo-bts-litecell15/utils.c3
4 files changed, 4 insertions, 9 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index ea652a1..e6cdfd4 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -994,14 +994,13 @@ static int handle_ph_ra_ind(struct lc15l1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind,
{
struct gsm_bts_trx *trx = lc15l1_hdl_trx(fl1);
struct gsm_bts *bts = trx->bts;
- struct gsm_bts_role_bts *btsb = bts->role;
struct gsm_lchan *lchan;
struct osmo_phsap_prim *l1sap;
int rc;
struct ph_rach_ind_param rach_ind_param;
/* FIXME: this should be deprecated/obsoleted as it bypasses rach.busy counting */
- if (ra_ind->measParam.fLinkQuality < btsb->min_qual_rach) {
+ if (ra_ind->measParam.fLinkQuality < bts->min_qual_rach) {
msgb_free(l1p_msg);
return 0;
}
diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c
index dcbd9f5..030c3ef 100644
--- a/src/osmo-bts-litecell15/main.c
+++ b/src/osmo-bts-litecell15/main.c
@@ -65,14 +65,12 @@ unsigned int dsp_trace = 0x00000000;
int bts_model_init(struct gsm_bts *bts)
{
struct gsm_bts_trx *trx;
- struct gsm_bts_role_bts *btsb;
struct stat st;
static struct osmo_fd accept_fd, read_fd;
int rc;
bts->variant = BTS_OSMO_LITECELL15;
- btsb = bts_role_bts(bts);
- btsb->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
+ bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
rc = oml_router_init(bts, OML_ROUTER_PATH, &accept_fd, &read_fd);
if (rc < 0) {
diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c
index 7b728f9..2c3002b 100644
--- a/src/osmo-bts-litecell15/oml.c
+++ b/src/osmo-bts-litecell15/oml.c
@@ -381,7 +381,6 @@ static const uint8_t trx_rqd_attr[] = { NM_ATT_RF_MAXPOWR_R };
static int trx_init(struct gsm_bts_trx *trx)
{
struct lc15l1_hdl *fl1h = trx_lc15l1_hdl(trx);
- struct gsm_bts_role_bts *btsb = bts_role_bts(trx->bts);
struct msgb *msg;
GsmL1_MphInitReq_t *mi_req;
GsmL1_DeviceParam_t *dev_par;
@@ -411,7 +410,7 @@ static int trx_init(struct gsm_bts_trx *trx)
dev_par->u16BcchArfcn = trx->bts->c0->arfcn;
dev_par->u8NbTsc = trx->bts->bsic & 7;
dev_par->fRxPowerLevel = trx_ms_pwr_ctrl_is_osmo(trx)
- ? 0.0 : btsb->ul_power_target;
+ ? 0.0 : trx->bts->ul_power_target;
dev_par->fTxPowerLevel = 0.0;
LOGP(DL1C, LOGL_NOTICE, "Init TRX (Band %d, ARFCN %u, TSC %u, RxPower % 2f dBm, "
diff --git a/src/osmo-bts-litecell15/utils.c b/src/osmo-bts-litecell15/utils.c
index 59a621b..8c3eb5a 100644
--- a/src/osmo-bts-litecell15/utils.c
+++ b/src/osmo-bts-litecell15/utils.c
@@ -82,9 +82,8 @@ int lc15bts_select_lc15_band(struct gsm_bts_trx *trx, uint16_t arfcn)
{
enum gsm_band band;
struct gsm_bts *bts = trx->bts;
- struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
- if (!btsb->auto_band)
+ if (!bts->auto_band)
return band_osmo2lc15(trx, bts->band);
/*