diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-12-01 17:25:28 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-12-03 16:31:36 +0100 |
commit | 64c422858db9388e210875dc681f2d1952e0d0bb (patch) | |
tree | 85d8baa6526562e89c9912d3da76507e0ce4fba3 /src/osmo-bsc/pcu_sock.c | |
parent | 8c03bf3f3c58afa582ed000ba05e886b593256f9 (diff) |
Store GPRS MOs directly under BTS SiteMgr object
The only real 1-1 relationship between BTS NM objects is the one between
GPRS Cell and BTS (which is actually a BTS cell).
In our current osmo-bts implementation we don't care much since we only
handle 1-cell BTSses, but let's make the data structure organization
more generic.
Implementation notes:
The gsm_bts_sm is moved to its own file, APIs to allocate are added and
the new public object is hooked correctly in the allocation process of
osmo-bsc.
Change-Id: I06461b7784fa2a78de37383406e35beae85fbad8
Diffstat (limited to 'src/osmo-bsc/pcu_sock.c')
-rw-r--r-- | src/osmo-bsc/pcu_sock.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 541fc8493..329bab0f8 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -46,6 +46,7 @@ #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/gsm_04_08_rr.h> #include <osmocom/bsc/bts.h> +#include <osmocom/bsc/bts_sm.h> static int pcu_sock_send(struct gsm_bts *bts, struct msgb *msg); uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx); @@ -115,13 +116,17 @@ static int pcu_tx_info_ind(struct gsm_bts *bts) struct gsm_pcu_if *pcu_prim; struct gsm_pcu_if_info_ind *info_ind; struct gprs_rlc_cfg *rlcc; - struct gsm_bts_gprs_nsvc *nsvc; + struct gsm_bts_sm *bts_sm; + struct gsm_gprs_nsvc *nsvc; struct gsm_bts_trx *trx; struct gsm_bts_trx_ts *ts; int i, tn; OSMO_ASSERT(bts); OSMO_ASSERT(bts->network); + OSMO_ASSERT(bts->site_mgr); + + bts_sm = bts->site_mgr; LOGP(DPCU, LOGL_INFO, "Sending info for BTS %d\n",bts->nr); @@ -147,8 +152,8 @@ static int pcu_tx_info_ind(struct gsm_bts *bts) info_ind->rac = bts->gprs.rac; /* NSE */ - info_ind->nsei = bts->gprs.nse.nsei; - memcpy(info_ind->nse_timer, bts->gprs.nse.timer, 7); + info_ind->nsei = bts_sm->gprs.nse.nsei; + memcpy(info_ind->nse_timer, bts_sm->gprs.nse.timer, 7); memcpy(info_ind->cell_timer, bts->gprs.cell.timer, 11); /* cell attributes */ @@ -202,7 +207,7 @@ static int pcu_tx_info_ind(struct gsm_bts *bts) /* NSVC */ for (i = 0; i < ARRAY_SIZE(info_ind->nsvci); i++) { - nsvc = &bts->gprs.nsvc[i]; + nsvc = &bts->site_mgr->gprs.nsvc[i]; info_ind->nsvci[i] = nsvc->nsvci; info_ind->local_port[i] = nsvc->local_port; |