diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 78fc6a0a9..d6bf7584e 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -674,7 +674,7 @@ struct gsm_bts { #define GSM_BTS_SI(bts, i) (void *)((bts)->si_buf[i][0]) /* this actually refers to the IPA transport, not the BTS model */ -static inline bool is_ipaccess_bts(const struct gsm_bts *bts) +static inline bool is_ipa_abisip_bts(const struct gsm_bts *bts) { switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 2fc640b77..72acc8522 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2311,7 +2311,7 @@ static int rsl_rx_ccch_load(struct msgb *msg) switch (rslh->data[0]) { case RSL_IE_PAGING_LOAD: sd.pg_buf_space = rslh->data[1] << 8 | rslh->data[2]; - if (is_ipaccess_bts(sd.bts) && sd.pg_buf_space == UINT16_MAX) { + if (is_ipa_abisip_bts(sd.bts) && sd.pg_buf_space == UINT16_MAX) { sd.pg_buf_space = paging_estimate_available_slots(sd.bts, sd.bts->ccch_load_ind_period); } osmo_signal_dispatch(SS_CCCH, S_CCCH_PAGING_LOAD, &sd); diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c index 6f80beb17..2df7aa359 100644 --- a/src/osmo-bsc/bsc_ctrl.c +++ b/src/osmo-bsc/bsc_ctrl.c @@ -187,7 +187,7 @@ static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) struct gsm_bts *bts; llist_for_each_entry(bts, &net->bts_list, list) { - if (!is_ipaccess_bts(bts)) + if (!is_ipa_abisip_bts(bts)) continue; /* diff --git a/src/osmo-bsc/bsc_rf_ctrl.c b/src/osmo-bsc/bsc_rf_ctrl.c index 749d2eb49..108f7e9ce 100644 --- a/src/osmo-bsc/bsc_rf_ctrl.c +++ b/src/osmo-bsc/bsc_rf_ctrl.c @@ -303,7 +303,7 @@ static void rf_check_cb(void *_data) struct gsm_bts_trx *trx; /* don't bother to check a booting or missing BTS */ - if (!bts->oml_link || !is_ipaccess_bts(bts)) + if (!bts->oml_link || !is_ipa_abisip_bts(bts)) continue; /* Exclude the BTS from the global lock */ diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index de9d4d248..6300ca6ac 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -717,7 +717,7 @@ struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct gsm_subscriber_connection msc_assigned_cic, osmo_mgcpc_ep_name(conn->user_plane.mgw_endpoint)); } else if (gscon_is_aoip(conn)) { - if (is_ipaccess_bts(for_lchan->ts->trx->bts)) + if (is_ipa_abisip_bts(for_lchan->ts->trx->bts)) /* use dynamic RTPBRIDGE endpoint allocation in MGW */ epname = mgcp_client_rtpbridge_wildcard(mgcp_client); else { diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 34676a22f..84bea1daf 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1268,7 +1268,7 @@ DEFUN(drop_bts, return CMD_WARNING; } - if (!is_ipaccess_bts(bts)) { + if (!is_ipa_abisip_bts(bts)) { vty_out(vty, "%% This command only works for ipaccess.%s", VTY_NEWLINE); return CMD_WARNING; } @@ -1315,7 +1315,7 @@ DEFUN(restart_bts, restart_bts_cmd, return CMD_WARNING; } - if (!is_ipaccess_bts(bts) || is_osmobts(bts)) { + if (!is_ipa_abisip_bts(bts) || is_osmobts(bts)) { vty_out(vty, "%% This command only works for ipaccess nanoBTS.%s", VTY_NEWLINE); return CMD_WARNING; @@ -1532,7 +1532,7 @@ DEFUN(pdch_act, pdch_act_cmd, return CMD_WARNING; } - if (!is_ipaccess_bts(ts->trx->bts)) { + if (!is_ipa_abisip_bts(ts->trx->bts)) { vty_out(vty, "%% This command only works for ipaccess BTS%s", VTY_NEWLINE); return CMD_WARNING; @@ -2066,7 +2066,7 @@ DEFUN(lchan_mdcx, lchan_mdcx_cmd, lchan = &ts->lchan[ss_nr]; - if (!is_ipaccess_bts(lchan->ts->trx->bts)) { + if (!is_ipa_abisip_bts(lchan->ts->trx->bts)) { vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE); return CMD_WARNING; } diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 1ef9ccab5..02923866d 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -891,7 +891,7 @@ int bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other) static bool bts_is_online(const struct gsm_bts *bts) { /* TODO: support E1 BTS too */ - if (!is_ipaccess_bts(bts)) + if (!is_ipa_abisip_bts(bts)) return true; if (!bts->oml_link) diff --git a/src/osmo-bsc/bts_ctrl.c b/src/osmo-bsc/bts_ctrl.c index 7f4413ff3..7d0b4d524 100644 --- a/src/osmo-bsc/bts_ctrl.c +++ b/src/osmo-bsc/bts_ctrl.c @@ -253,7 +253,7 @@ static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) { struct gsm_bts *bts = cmd->node; - if (!is_ipaccess_bts(bts)) { + if (!is_ipa_abisip_bts(bts)) { cmd->reply = "BTS is not IP based"; return CTRL_CMD_ERROR; } diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index 57a47b076..8669d64b0 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -150,7 +150,7 @@ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd) struct gsm_gprs_nse *nse; struct gsm_gprs_cell *cell; - if (!is_ipaccess_bts(nsd->bts)) + if (!is_ipa_abisip_bts(nsd->bts)) return 0; switch (obj_class) { @@ -202,7 +202,7 @@ static int sw_activ_rep(struct msgb *mb) struct gsm_gprs_nsvc *nsvc; struct gsm_bts_trx_ts *ts; - if (!is_ipaccess_bts(bts)) + if (!is_ipa_abisip_bts(bts)) return 0; switch (foh->obj_class) { @@ -564,7 +564,7 @@ find_bts_by_unitid(struct gsm_network *net, uint16_t site_id, uint16_t bts_id) struct gsm_bts *bts; llist_for_each_entry(bts, &net->bts_list, list) { - if (!is_ipaccess_bts(bts)) + if (!is_ipa_abisip_bts(bts)) continue; if (bts->ip_access.site_id == site_id && diff --git a/src/osmo-bsc/bts_siemens_bs11.c b/src/osmo-bsc/bts_siemens_bs11.c index ed2c4c34d..d1fbeaa3d 100644 --- a/src/osmo-bsc/bts_siemens_bs11.c +++ b/src/osmo-bsc/bts_siemens_bs11.c @@ -401,7 +401,7 @@ static void nm_reconfig_ts(struct gsm_bts_trx_ts *ts) abis_nm_set_channel_attr(ts, ccomb); - if (is_ipaccess_bts(ts->trx->bts)) + if (is_ipa_abisip_bts(ts->trx->bts)) return; switch (ts->pchan_from_config) { diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c index 49702d084..4d2588d5b 100644 --- a/src/osmo-bsc/bts_trx.c +++ b/src/osmo-bsc/bts_trx.c @@ -264,7 +264,7 @@ void gsm_trx_lock_rf(struct gsm_bts_trx *trx, bool locked, const char *reason) bool trx_is_usable(const struct gsm_bts_trx *trx) { /* FIXME: How does this behave for BS-11 ? */ - if (is_ipaccess_bts(trx->bts)) { + if (is_ipa_abisip_bts(trx->bts)) { if (!nm_is_running(&trx->mo.nm_state) || !nm_is_running(&trx->bb_transc.mo.nm_state)) return false; diff --git a/src/osmo-bsc/bts_trx_vty.c b/src/osmo-bsc/bts_trx_vty.c index 84de9c5c6..ab642a453 100644 --- a/src/osmo-bsc/bts_trx_vty.c +++ b/src/osmo-bsc/bts_trx_vty.c @@ -609,7 +609,7 @@ void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan) } else { vty_out(vty, " No Subscriber%s", VTY_NEWLINE); } - if (is_ipaccess_bts(lchan->ts->trx->bts)) { + if (is_ipa_abisip_bts(lchan->ts->trx->bts)) { struct in_addr ia; if (lchan->abis_ip.bound_ip) { ia.s_addr = htonl(lchan->abis_ip.bound_ip); @@ -694,7 +694,7 @@ void ts_dump_vty(struct vty *vty, struct gsm_bts_trx_ts *ts) vty_out(vty, ", TSC %u%s NM State: ", gsm_ts_tsc(ts), VTY_NEWLINE); vty_out_dyn_ts_details(vty, ts); net_dump_nmstate(vty, &ts->mo.nm_state); - if (!is_ipaccess_bts(ts->trx->bts)) + if (!is_ipa_abisip_bts(ts->trx->bts)) vty_out(vty, " E1 Line %u, Timeslot %u, Subslot %u%s", ts->e1_link.e1_nr, ts->e1_link.e1_ts, ts->e1_link.e1_ts_ss, VTY_NEWLINE); @@ -753,7 +753,7 @@ void trx_dump_vty(struct vty *vty, struct gsm_bts_trx *trx, bool print_rsl, bool vty_out(vty, " %sBaseband Transceiver NM State: ", is_ericsson_bts(trx->bts) ? "[Virtual] " : ""); net_dump_nmstate(vty, &trx->bb_transc.mo.nm_state); - if (is_ipaccess_bts(trx->bts)) { + if (is_ipa_abisip_bts(trx->bts)) { vty_out(vty, " ip.access stream ID: 0x%02x ", trx->rsl_tei_primary); e1isl_dump_vty_tcp(vty, trx->rsl_link_primary); } else { diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 9ba3ac2e6..dc5216f17 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -204,7 +204,7 @@ DEFUN_USRATTR(cfg_bts_dtxu, struct gsm_bts *bts = vty->index; bts->dtxu = (argc > 0) ? GSM48_DTX_SHALL_BE_USED : GSM48_DTX_MAY_BE_USED; - if (!is_ipaccess_bts(bts)) + if (!is_ipa_abisip_bts(bts)) vty_out(vty, "%% DTX enabled on non-IP BTS: this configuration " "neither supported nor tested!%s", VTY_NEWLINE); return CMD_SUCCESS; @@ -234,7 +234,7 @@ DEFUN_USRATTR(cfg_bts_dtxd, struct gsm_bts *bts = vty->index; bts->dtxd = true; - if (!is_ipaccess_bts(bts)) + if (!is_ipa_abisip_bts(bts)) vty_out(vty, "%% DTX enabled on non-IP BTS: this configuration " "neither supported nor tested!%s", VTY_NEWLINE); return CMD_SUCCESS; @@ -340,7 +340,7 @@ DEFUN_USRATTR(cfg_bts_unit_id, int site_id = atoi(argv[0]); int bts_id = atoi(argv[1]); - if (!is_ipaccess_bts(bts)) { + if (!is_ipa_abisip_bts(bts)) { vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE); return CMD_WARNING; } @@ -370,7 +370,7 @@ DEFUN_USRATTR(cfg_bts_rsl_ip, struct gsm_bts *bts = vty->index; struct in_addr ia; - if (!is_ipaccess_bts(bts)) { + if (!is_ipa_abisip_bts(bts)) { vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE); return CMD_WARNING; } @@ -466,7 +466,7 @@ DEFUN_USRATTR(cfg_bts_stream_id, struct gsm_bts *bts = vty->index; int stream_id = atoi(argv[0]), linenr = atoi(argv[1]); - if (!is_ipaccess_bts(bts)) { + if (!is_ipa_abisip_bts(bts)) { vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE); return CMD_WARNING; } @@ -1919,7 +1919,7 @@ DEFUN_USRATTR(cfg_bts_no_si_unused_send_empty, { struct gsm_bts *bts = vty->index; - if (!is_ipaccess_bts(bts) || is_osmobts(bts)) { + if (!is_ipa_abisip_bts(bts) || is_osmobts(bts)) { vty_out(vty, "%% This command is only intended for ipaccess nanoBTS. See OS#3707.%s", VTY_NEWLINE); return CMD_WARNING; @@ -2476,14 +2476,14 @@ DEFUN_ATTR(cfg_bts_depends_on, cfg_bts_depends_on_cmd, int dep = atoi(argv[0]); - if (!is_ipaccess_bts(bts)) { + if (!is_ipa_abisip_bts(bts)) { vty_out(vty, "%% This feature is only available for IP systems.%s", VTY_NEWLINE); return CMD_WARNING; } other_bts = gsm_bts_num(bts->network, dep); - if (!other_bts || !is_ipaccess_bts(other_bts)) { + if (!other_bts || !is_ipa_abisip_bts(other_bts)) { vty_out(vty, "%% This feature is only available for IP systems.%s", VTY_NEWLINE); return CMD_WARNING; @@ -3955,7 +3955,7 @@ void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) bts->early_classmark_allowed_3g && !bts->early_classmark_allowed ? " (forbidden by 2G bit)" : "", VTY_NEWLINE); - if (is_ipaccess_bts(bts)) + if (is_ipa_abisip_bts(bts)) vty_out(vty, " Unit ID: %u/%u/0, OML Stream ID 0x%02x%s", bts->ip_access.site_id, bts->ip_access.bts_id, bts->oml_tei, VTY_NEWLINE); @@ -3982,7 +3982,7 @@ void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) vty_out(vty, " Paging: %u pending requests, %u free slots%s", paging_pending_requests_nr(bts), bts->paging.available_slots, VTY_NEWLINE); - if (is_ipaccess_bts(bts)) { + if (is_ipa_abisip_bts(bts)) { vty_out(vty, " OML Link: "); e1isl_dump_vty_tcp(vty, bts->oml_link); vty_out(vty, " OML Link state: %s", get_model_oml_status(bts)); diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 7e9c31fbe..e8384c604 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -143,7 +143,7 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_available_onenter(struct osmo_fsm_in struct osmo_mgcpc_ep_ci *use_mgwep_ci = lchan_use_mgw_endpoint_ci_bts(lchan); struct mgcp_conn_peer crcx_info; - if (!is_ipaccess_bts(lchan->ts->trx->bts)) { + if (!is_ipa_abisip_bts(lchan->ts->trx->bts)) { LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "Audio link to-BTS via E1, skipping IPACC\n"); lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_LCHAN_READY); return; @@ -290,7 +290,7 @@ static void lchan_rtp_fsm_post_lchan_ready(struct osmo_fsm_inst *fi) { struct gsm_lchan *lchan = lchan_rtp_fi_lchan(fi); - if (is_ipaccess_bts(lchan->ts->trx->bts)) + if (is_ipa_abisip_bts(lchan->ts->trx->bts)) lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_IPACC_CRCX_ACK); else lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_CONFIGURED); @@ -516,7 +516,7 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_configured_onenter(struct osmo_fsm_i return; } - if (!is_ipaccess_bts(lchan->ts->trx->bts)) { + if (!is_ipa_abisip_bts(lchan->ts->trx->bts)) { LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "Audio link to-BTS via E1, skipping IPACC\n"); lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_READY); return; @@ -543,7 +543,7 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_configured(struct osmo_fsm_inst *fi, switch (event) { case LCHAN_RTP_EV_MGW_ENDPOINT_CONFIGURED: - if (is_ipaccess_bts(lchan->ts->trx->bts)) + if (is_ipa_abisip_bts(lchan->ts->trx->bts)) lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_IPACC_MDCX_ACK); else { lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_READY); @@ -610,7 +610,7 @@ static void lchan_rtp_fsm_rollback_onenter(struct osmo_fsm_inst *fi, uint32_t pr return; } - if (is_ipaccess_bts(lchan->ts->trx->bts)) + if (is_ipa_abisip_bts(lchan->ts->trx->bts)) connect_mgw_endpoint_to_lchan(fi, lchan->mgw_endpoint_ci_bts, old_lchan); else osmo_fsm_inst_dispatch(fi, LCHAN_RTP_EV_MGW_ENDPOINT_CONFIGURED, 0); diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 133e5c2ab..b1a76318a 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -231,7 +231,7 @@ static int oml_msg_nack(struct nm_nack_signal_data *nack) return 0; } - if (is_ipaccess_bts(nack->bts)) + if (is_ipa_abisip_bts(nack->bts)) ipaccess_drop_oml_deferred(nack->bts); return 0; @@ -455,7 +455,7 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal, rate_ctr_inc(rate_ctr_group_get_ctr(trx->bts->bts_ctrs, BTS_CTR_BTS_OML_FAIL)); /* ip.access BTS models have a single global A-bis/OML link for all * transceivers, so once it's lost we need to notify them all. */ - if (is_ipaccess_bts(trx->bts)) + if (is_ipa_abisip_bts(trx->bts)) gsm_bts_all_ts_dispatch(trx->bts, TS_EV_OML_DOWN, NULL); else /* Other BTS models (e.g. Ericsson) have per-TRX OML links */ gsm_trx_all_ts_dispatch(trx, TS_EV_OML_DOWN, NULL); diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index f47794f46..9b29cff73 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -1084,7 +1084,7 @@ static int generate_si5(enum osmo_sysinfo_type t, struct gsm_bts *bts) memset(output, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN); /* ip.access nanoBTS needs l2_plen!! */ - if (is_ipaccess_bts(bts)) { + if (is_ipa_abisip_bts(bts)) { *output++ = GSM48_LEN2PLEN(l2_plen); l2_plen++; } @@ -1115,7 +1115,7 @@ static int generate_si5bis(enum osmo_sysinfo_type t, struct gsm_bts *bts) memset(output, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN); /* ip.access nanoBTS needs l2_plen!! */ - if (is_ipaccess_bts(bts)) { + if (is_ipa_abisip_bts(bts)) { *output++ = GSM48_LEN2PLEN(l2_plen); l2_plen++; } @@ -1154,7 +1154,7 @@ static int generate_si5ter(enum osmo_sysinfo_type t, struct gsm_bts *bts) memset(output, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN); /* ip.access nanoBTS needs l2_plen!! */ - if (is_ipaccess_bts(bts)) { + if (is_ipa_abisip_bts(bts)) { *output++ = GSM48_LEN2PLEN(l2_plen); l2_plen++; } @@ -1189,7 +1189,7 @@ static int generate_si6(enum osmo_sysinfo_type t, struct gsm_bts *bts) memset(&si6_ro_info, 0, sizeof(si6_ro_info)); /* ip.access nanoBTS needs l2_plen!! */ - if (is_ipaccess_bts(bts)) { + if (is_ipa_abisip_bts(bts)) { *output++ = GSM48_LEN2PLEN(l2_plen); l2_plen++; }