laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/32179 )
Change subject: cosmetic: Rename is_ipaccess_bts() to is_ipa_abisip_bts()
......................................................................
cosmetic: Rename is_ipaccess_bts() to is_ipa_abisip_bts()
This function is used to check if the BTS is using the IPA Abis-IP
transport, and not whether its manufacturer/vendor is ip.access.
Let's use a less confusing name.
Change-Id: I202c58341c1536489064d2671c0842c6f70b5429
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bsc_ctrl.c
M src/osmo-bsc/bsc_rf_ctrl.c
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_ctrl.c
M src/osmo-bsc/bts_ipaccess_nanobts.c
M src/osmo-bsc/bts_siemens_bs11.c
M src/osmo-bsc/bts_trx.c
M src/osmo-bsc/bts_trx_vty.c
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/lchan_rtp_fsm.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/system_information.c
16 files changed, 54 insertions(+), 40 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/79/32179/1
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 20ed089..efffde8 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -674,7 +674,7 @@
#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 dfe7da9..6ad3038 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -2311,7 +2311,7 @@
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 8eb7caf..d8fa79d 100644
--- a/src/osmo-bsc/bsc_ctrl.c
+++ b/src/osmo-bsc/bsc_ctrl.c
@@ -187,7 +187,7 @@
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 749d2eb..108f7e9 100644
--- a/src/osmo-bsc/bsc_rf_ctrl.c
+++ b/src/osmo-bsc/bsc_rf_ctrl.c
@@ -303,7 +303,7 @@
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 de9d4d2..6300ca6 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -717,7 +717,7 @@
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 f1bd7c4..2f220c1 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1268,7 +1268,7 @@
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 @@
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;
@@ -1528,7 +1528,7 @@
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;
@@ -2062,7 +2062,7 @@
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 108c355..b6e6b8a 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -891,7 +891,7 @@
static int bts_is_online(struct gsm_bts *bts)
{
/* TODO: support E1 BTS too */
- if (!is_ipaccess_bts(bts))
+ if (!is_ipa_abisip_bts(bts))
return 1;
if (!bts->oml_link)
diff --git a/src/osmo-bsc/bts_ctrl.c b/src/osmo-bsc/bts_ctrl.c
index 728d89f..2147231 100644
--- a/src/osmo-bsc/bts_ctrl.c
+++ b/src/osmo-bsc/bts_ctrl.c
@@ -252,7 +252,7 @@
{
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 6c65040..222614d 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -150,7 +150,7 @@
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 @@
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) {
@@ -565,7 +565,7 @@
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 ed2c4c3..d1fbeaa 100644
--- a/src/osmo-bsc/bts_siemens_bs11.c
+++ b/src/osmo-bsc/bts_siemens_bs11.c
@@ -401,7 +401,7 @@
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 49702d0..4d2588d 100644
--- a/src/osmo-bsc/bts_trx.c
+++ b/src/osmo-bsc/bts_trx.c
@@ -264,7 +264,7 @@
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 84de9c5..ab642a4 100644
--- a/src/osmo-bsc/bts_trx_vty.c
+++ b/src/osmo-bsc/bts_trx_vty.c
@@ -609,7 +609,7 @@
} 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 @@
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 @@
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 e02c2d5..378568d 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -204,7 +204,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
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;
@@ -2478,14 +2478,14 @@
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;
@@ -3957,7 +3957,7 @@
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);
@@ -3984,7 +3984,7 @@
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 7e9c31f..e8384c6 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -143,7 +143,7 @@
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 @@
{
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 @@
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 @@
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 @@
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 5866ec1..0e1366b 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -231,7 +231,7 @@
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 @@
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 cfc9a04..a5f46c8 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -1070,7 +1070,7 @@
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++;
}
@@ -1101,7 +1101,7 @@
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++;
}
@@ -1140,7 +1140,7 @@
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++;
}
@@ -1175,7 +1175,7 @@
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++;
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/32179
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I202c58341c1536489064d2671c0842c6f70b5429
Gerrit-Change-Number: 32179
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange