parent
6cf8c691e2
commit
9e6f8c3ad4
|
@ -14,6 +14,12 @@
|
|||
* handles CCHAN and TRXMGMT, which is always done on the primary TRX's RSL link. */
|
||||
#define TRX_PRIMARY(TRX) ((TRX)->vamos.primary_trx ? : (TRX))
|
||||
|
||||
/* Return true if TRX is a plain primary TRX (with or without VAMOS operation). */
|
||||
#define TRX_IS_PRIMARY(TRX) ((TRX)->vamos.primary_trx == NULL)
|
||||
|
||||
/* Return true if TRX is a VAMOS shadow TRX. */
|
||||
#define TRX_IS_SHADOW(TRX) ((TRX)->vamos.primary_trx != NULL)
|
||||
|
||||
struct gsm_bts_bb_trx {
|
||||
struct gsm_abis_mo mo;
|
||||
};
|
||||
|
|
|
@ -414,6 +414,7 @@ int bts_init(struct gsm_bts *bts)
|
|||
int bts_link_estab(struct gsm_bts *bts)
|
||||
{
|
||||
int i, j;
|
||||
bool has_vamos = osmo_bts_has_feature(bts->features, BTS_FEAT_VAMOS);
|
||||
|
||||
LOGP(DSUM, LOGL_INFO, "Main link established, sending NM Status.\n");
|
||||
|
||||
|
@ -431,6 +432,18 @@ int bts_link_estab(struct gsm_bts *bts)
|
|||
for (i = 0; i < bts->num_trx; i++) {
|
||||
struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, i);
|
||||
|
||||
/* For VAMOS shadow TRXs, skip all initial status reports. The existence of shadow TRXes is indicated by
|
||||
* BTS_FEAT_VAMOS. (If osmo-bts sent status reports for shadow TRXes, these would appear as full primary
|
||||
* TRXes to non-Osmocom BSCs.) */
|
||||
if (has_vamos && TRX_IS_SHADOW(trx)) {
|
||||
LOGP(DLGLOBAL, LOGL_ERROR, "Skipping TRX %d\n", trx->nr);
|
||||
printf("Skipping TRX %d\n", trx->nr);
|
||||
continue;
|
||||
} else {
|
||||
LOGP(DLGLOBAL, LOGL_ERROR, "NOT Skipping TRX %d\n", trx->nr);
|
||||
printf("NOT Skipping TRX %d\n", trx->nr);
|
||||
}
|
||||
|
||||
oml_tx_state_changed(&trx->mo);
|
||||
oml_tx_state_changed(&trx->bb_transc.mo);
|
||||
|
||||
|
|
|
@ -60,7 +60,12 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event
|
|||
|
||||
switch (event) {
|
||||
case NM_EV_SW_ACT:
|
||||
oml_mo_tx_sw_act_rep(&bb_transc->mo);
|
||||
/* For VAMOS shadow TRXs, do not send the initial Software Activated Report. The primary TRX's Software
|
||||
* Activated Report implies the shadow TRX. (The main reason is to not confuse non-osmocom BSCs into
|
||||
* thinking a shadow TRX were an independent primary TRX.) */
|
||||
if (!osmo_bts_has_feature(trx->bts->features, BTS_FEAT_VAMOS)
|
||||
|| TRX_PRIMARY(trx) == trx)
|
||||
oml_mo_tx_sw_act_rep(&bb_transc->mo);
|
||||
nm_bb_transc_fsm_state_chg(fi, NM_BBTRANSC_ST_OP_DISABLED_OFFLINE);
|
||||
for (i = 0; i < TRX_NR_TS; i++) {
|
||||
struct gsm_bts_trx_ts *ts = &trx->ts[i];
|
||||
|
|
|
@ -406,6 +406,10 @@ int oml_mo_statechg_ack(const struct gsm_abis_mo *mo)
|
|||
return rc;
|
||||
|
||||
/* Emulate behaviour of ipaccess nanobts: Send a 'State Changed Event Report' as well. */
|
||||
LOGP(DLGLOBAL, LOGL_ERROR, "XXX oml_mo_statechg_ack() oml_tx_state_changed(%u %u %u)\n",
|
||||
mo->obj_inst.bts_nr,
|
||||
mo->obj_inst.trx_nr,
|
||||
mo->obj_inst.ts_nr);
|
||||
return oml_tx_state_changed(mo);
|
||||
}
|
||||
|
||||
|
|
|
@ -116,6 +116,12 @@ int main(int argc, char **argv)
|
|||
msgb_talloc_ctx_init(tall_bts_ctx, 10*1024);
|
||||
|
||||
osmo_init_logging2(tall_bts_ctx, &bts_log_info);
|
||||
log_set_print_category(osmo_stderr_target, 1);
|
||||
log_set_print_category_hex(osmo_stderr_target, 0);
|
||||
log_set_print_level(osmo_stderr_target, 1);
|
||||
log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_BASENAME);
|
||||
log_set_print_filename_pos(osmo_stderr_target, LOG_FILENAME_POS_LINE_END);
|
||||
log_set_print_extended_timestamp(osmo_stderr_target, 1);
|
||||
|
||||
bts = gsm_bts_alloc(tall_bts_ctx, 0);
|
||||
if (!bts)
|
||||
|
|
Loading…
Reference in New Issue