Move trx->rsl_link to trx->bb_transc.rsl.link
The RSL link is configured/set up by the BBTRANSC NM object, hence move it to the appropiate substruct. Related: OS#5253 Change-Id: I62937cbd81c27274b9f5f70d454d5319a6898c7b
This commit is contained in:
parent
9aaaacc7aa
commit
c4e836838d
|
@ -9,6 +9,7 @@ struct gsm_bts_bb_trx {
|
||||||
struct {
|
struct {
|
||||||
struct osmo_sockaddr_str rem_addrstr;
|
struct osmo_sockaddr_str rem_addrstr;
|
||||||
uint8_t tei;
|
uint8_t tei;
|
||||||
|
struct e1inp_sign_link *link;
|
||||||
} rsl;
|
} rsl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,8 +23,6 @@ struct gsm_bts_trx {
|
||||||
uint8_t nr;
|
uint8_t nr;
|
||||||
/* human readable name / description */
|
/* human readable name / description */
|
||||||
char *description;
|
char *description;
|
||||||
/* how do we talk RSL with this TRX? */
|
|
||||||
struct e1inp_sign_link *rsl_link;
|
|
||||||
|
|
||||||
/* NM Radio Carrier and Baseband Transciever */
|
/* NM Radio Carrier and Baseband Transciever */
|
||||||
struct gsm_abis_mo mo;
|
struct gsm_abis_mo mo;
|
||||||
|
|
|
@ -225,9 +225,9 @@ static void abis_link_connected(struct osmo_fsm_inst *fi, uint32_t event, void *
|
||||||
|
|
||||||
/* Then iterate over the RSL signalling links */
|
/* Then iterate over the RSL signalling links */
|
||||||
llist_for_each_entry(trx, &bts->trx_list, list) {
|
llist_for_each_entry(trx, &bts->trx_list, list) {
|
||||||
if (trx->rsl_link) {
|
if (trx->bb_transc.rsl.link) {
|
||||||
e1inp_sign_link_destroy(trx->rsl_link);
|
e1inp_sign_link_destroy(trx->bb_transc.rsl.link);
|
||||||
trx->rsl_link = NULL;
|
trx->bb_transc.rsl.link = NULL;
|
||||||
if (trx == trx->bts->c0)
|
if (trx == trx->bts->c0)
|
||||||
load_timer_stop(trx->bts);
|
load_timer_stop(trx->bts);
|
||||||
} else {
|
} else {
|
||||||
|
@ -364,7 +364,7 @@ int abis_bts_rsl_sendmsg(struct msgb *msg)
|
||||||
|
|
||||||
/* osmo-bts uses msg->trx internally, but libosmo-abis uses
|
/* osmo-bts uses msg->trx internally, but libosmo-abis uses
|
||||||
* the signalling link at msg->dst */
|
* the signalling link at msg->dst */
|
||||||
msg->dst = msg->trx->rsl_link;
|
msg->dst = msg->trx->bb_transc.rsl.link;
|
||||||
return abis_sendmsg(msg);
|
return abis_sendmsg(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,10 +404,10 @@ static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
e1inp_ts_config_sign(sign_ts, line);
|
e1inp_ts_config_sign(sign_ts, line);
|
||||||
trx->rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL,
|
trx->bb_transc.rsl.link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL,
|
||||||
trx, trx->bb_transc.rsl.tei, 0);
|
trx, trx->bb_transc.rsl.tei, 0);
|
||||||
trx_link_estab(trx);
|
trx_link_estab(trx);
|
||||||
return trx->rsl_link;
|
return trx->bb_transc.rsl.link;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
||||||
if (trx->bts->variant != BTS_OSMO_OMLDUMMY) { /* In OMLDUMMY, phy=NULL */
|
if (trx->bts->variant != BTS_OSMO_OMLDUMMY) { /* In OMLDUMMY, phy=NULL */
|
||||||
struct phy_instance *pinst = trx_phy_instance(trx);
|
struct phy_instance *pinst = trx_phy_instance(trx);
|
||||||
phy_state_connected = phy_link_state_get(pinst->phy_link) == PHY_LINK_CONNECTED;
|
phy_state_connected = phy_link_state_get(pinst->phy_link) == PHY_LINK_CONNECTED;
|
||||||
rsl_link_connected = !!trx->rsl_link;
|
rsl_link_connected = !!trx->bb_transc.rsl.link;
|
||||||
} else {
|
} else {
|
||||||
phy_state_connected = true;
|
phy_state_connected = true;
|
||||||
rsl_link_connected = true;
|
rsl_link_connected = true;
|
||||||
|
|
|
@ -153,7 +153,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
||||||
if (trx->bts->variant != BTS_OSMO_OMLDUMMY) { /* In OMLDUMMY, phy=NULL */
|
if (trx->bts->variant != BTS_OSMO_OMLDUMMY) { /* In OMLDUMMY, phy=NULL */
|
||||||
struct phy_instance *pinst = trx_phy_instance(trx);
|
struct phy_instance *pinst = trx_phy_instance(trx);
|
||||||
phy_state_connected = phy_link_state_get(pinst->phy_link) == PHY_LINK_CONNECTED;
|
phy_state_connected = phy_link_state_get(pinst->phy_link) == PHY_LINK_CONNECTED;
|
||||||
rsl_link_connected = !!trx->rsl_link;
|
rsl_link_connected = !!trx->bb_transc.rsl.link;
|
||||||
} else {
|
} else {
|
||||||
phy_state_connected = true;
|
phy_state_connected = true;
|
||||||
rsl_link_connected = true;
|
rsl_link_connected = true;
|
||||||
|
|
|
@ -2911,7 +2911,7 @@ static int tx_ipac_XXcx_nack(struct gsm_lchan *lchan, uint8_t cause,
|
||||||
|
|
||||||
static char *get_rsl_local_ip(struct gsm_bts_trx *trx)
|
static char *get_rsl_local_ip(struct gsm_bts_trx *trx)
|
||||||
{
|
{
|
||||||
struct e1inp_ts *ts = trx->rsl_link->ts;
|
struct e1inp_ts *ts = trx->bb_transc.rsl.link->ts;
|
||||||
struct sockaddr_storage ss;
|
struct sockaddr_storage ss;
|
||||||
socklen_t sa_len = sizeof(ss);
|
socklen_t sa_len = sizeof(ss);
|
||||||
static char hostbuf[256];
|
static char hostbuf[256];
|
||||||
|
@ -3054,7 +3054,7 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
|
||||||
* address */
|
* address */
|
||||||
if (connect_ip == 0) {
|
if (connect_ip == 0) {
|
||||||
struct e1inp_sign_link *sign_link =
|
struct e1inp_sign_link *sign_link =
|
||||||
lchan->ts->trx->rsl_link;
|
lchan->ts->trx->bb_transc.rsl.link;
|
||||||
|
|
||||||
ia.s_addr = htonl(get_signlink_remote_ip(sign_link));
|
ia.s_addr = htonl(get_signlink_remote_ip(sign_link));
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -1659,7 +1659,7 @@ static void trx_dump_vty(struct vty *vty, const struct gsm_bts_trx *trx)
|
||||||
|
|
||||||
vty_out(vty, " NM State: ");
|
vty_out(vty, " NM State: ");
|
||||||
net_dump_nmstate(vty, &trx->mo.nm_state);
|
net_dump_nmstate(vty, &trx->mo.nm_state);
|
||||||
vty_out(vty, " RSL State: %s%s", trx->rsl_link? "connected" : "disconnected", VTY_NEWLINE);
|
vty_out(vty, " RSL State: %s%s", trx->bb_transc.rsl.link ? "connected" : "disconnected", VTY_NEWLINE);
|
||||||
vty_out(vty, " Baseband Transceiver NM State: ");
|
vty_out(vty, " Baseband Transceiver NM State: ");
|
||||||
net_dump_nmstate(vty, &trx->bb_transc.mo.nm_state);
|
net_dump_nmstate(vty, &trx->bb_transc.mo.nm_state);
|
||||||
vty_out(vty, " IPA stream ID: 0x%02x%s", trx->bb_transc.rsl.tei, VTY_NEWLINE);
|
vty_out(vty, " IPA stream ID: 0x%02x%s", trx->bb_transc.rsl.tei, VTY_NEWLINE);
|
||||||
|
|
|
@ -90,7 +90,7 @@ DEFUN(show_transceiver, show_transceiver_cmd, "show transceiver",
|
||||||
vty_out(vty, " bsic : undefined%s", VTY_NEWLINE);
|
vty_out(vty, " bsic : undefined%s", VTY_NEWLINE);
|
||||||
|
|
||||||
/* trx->ts[tn].priv is NULL in absence of the A-bis connection */
|
/* trx->ts[tn].priv is NULL in absence of the A-bis connection */
|
||||||
if (trx->rsl_link == NULL)
|
if (trx->bb_transc.rsl.link == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
|
for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
|
||||||
|
|
|
@ -99,9 +99,9 @@ int main(int argc, char **argv)
|
||||||
OSMO_ASSERT(line);
|
OSMO_ASSERT(line);
|
||||||
sign_ts = e1inp_line_ipa_rsl_ts(line, 0);
|
sign_ts = e1inp_line_ipa_rsl_ts(line, 0);
|
||||||
e1inp_ts_config_sign(sign_ts, line);
|
e1inp_ts_config_sign(sign_ts, line);
|
||||||
trx->rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL, NULL, 0, 0);
|
trx->bb_transc.rsl.link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL, NULL, 0, 0);
|
||||||
OSMO_ASSERT(trx->rsl_link);
|
OSMO_ASSERT(trx->bb_transc.rsl.link);
|
||||||
trx->rsl_link->trx = trx;
|
trx->bb_transc.rsl.link->trx = trx;
|
||||||
|
|
||||||
fprintf(stderr, "test 1: without timeout\n");
|
fprintf(stderr, "test 1: without timeout\n");
|
||||||
|
|
||||||
|
@ -114,9 +114,9 @@ int main(int argc, char **argv)
|
||||||
lchan->ho.active = HANDOVER_ENABLED;
|
lchan->ho.active = HANDOVER_ENABLED;
|
||||||
lchan->ho.ref = 23;
|
lchan->ho.ref = 23;
|
||||||
l1sap_chan_act(lchan->ts->trx, 0x0a);
|
l1sap_chan_act(lchan->ts->trx, 0x0a);
|
||||||
OSMO_ASSERT(msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
OSMO_ASSERT(msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
OSMO_ASSERT(!msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(!msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
|
|
||||||
/* send access burst with wrong ref */
|
/* send access burst with wrong ref */
|
||||||
memset(&nl1sap, 0, sizeof(nl1sap));
|
memset(&nl1sap, 0, sizeof(nl1sap));
|
||||||
|
@ -129,7 +129,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* expect no action */
|
/* expect no action */
|
||||||
OSMO_ASSERT(modify_count == 0);
|
OSMO_ASSERT(modify_count == 0);
|
||||||
OSMO_ASSERT(!msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(!msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
|
|
||||||
/* send access burst with correct ref */
|
/* send access burst with correct ref */
|
||||||
nl1sap.u.rach_ind.ra = 23;
|
nl1sap.u.rach_ind.ra = 23;
|
||||||
|
@ -140,10 +140,10 @@ int main(int argc, char **argv)
|
||||||
expect_phys_info(&trx->ts[2].lchan[0].lapdm_ch.lapdm_dcch);
|
expect_phys_info(&trx->ts[2].lchan[0].lapdm_ch.lapdm_dcch);
|
||||||
|
|
||||||
/* expect exactly one HO.DET */
|
/* expect exactly one HO.DET */
|
||||||
OSMO_ASSERT(msg = msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(msg = msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
rslh = msgb_l2(msg);
|
rslh = msgb_l2(msg);
|
||||||
OSMO_ASSERT(rslh->c.msg_type == RSL_MT_HANDO_DET);
|
OSMO_ASSERT(rslh->c.msg_type == RSL_MT_HANDO_DET);
|
||||||
OSMO_ASSERT(!msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(!msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
|
|
||||||
/* expect T3105 running */
|
/* expect T3105 running */
|
||||||
OSMO_ASSERT(osmo_timer_pending(&trx->ts[2].lchan[0].ho.t3105))
|
OSMO_ASSERT(osmo_timer_pending(&trx->ts[2].lchan[0].ho.t3105))
|
||||||
|
@ -171,10 +171,10 @@ int main(int argc, char **argv)
|
||||||
expect_phys_info(&trx->ts[2].lchan[0].lapdm_ch.lapdm_dcch);
|
expect_phys_info(&trx->ts[2].lchan[0].lapdm_ch.lapdm_dcch);
|
||||||
|
|
||||||
/* expect exactly one HO.DET */
|
/* expect exactly one HO.DET */
|
||||||
OSMO_ASSERT(msg = msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(msg = msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
rslh = msgb_l2(msg);
|
rslh = msgb_l2(msg);
|
||||||
OSMO_ASSERT(rslh->c.msg_type == RSL_MT_HANDO_DET);
|
OSMO_ASSERT(rslh->c.msg_type == RSL_MT_HANDO_DET);
|
||||||
OSMO_ASSERT(!msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(!msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
|
|
||||||
for (i = 0; i < bts->ny1 - 1; i++) {
|
for (i = 0; i < bts->ny1 - 1; i++) {
|
||||||
/* expect T3105 running */
|
/* expect T3105 running */
|
||||||
|
@ -196,10 +196,10 @@ int main(int argc, char **argv)
|
||||||
OSMO_ASSERT(!osmo_timer_pending(&trx->ts[2].lchan[0].ho.t3105))
|
OSMO_ASSERT(!osmo_timer_pending(&trx->ts[2].lchan[0].ho.t3105))
|
||||||
|
|
||||||
/* expect exactly one CONN.FAIL */
|
/* expect exactly one CONN.FAIL */
|
||||||
OSMO_ASSERT(msg = msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(msg = msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
rslh = msgb_l2(msg);
|
rslh = msgb_l2(msg);
|
||||||
OSMO_ASSERT(rslh->c.msg_type == RSL_MT_CONN_FAIL);
|
OSMO_ASSERT(rslh->c.msg_type == RSL_MT_CONN_FAIL);
|
||||||
OSMO_ASSERT(!msgb_dequeue(&trx->rsl_link->tx_list));
|
OSMO_ASSERT(!msgb_dequeue(&trx->bb_transc.rsl.link->tx_list));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
while (!quit) {
|
while (!quit) {
|
||||||
|
|
Loading…
Reference in New Issue