aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_nm.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-12 23:34:51 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-13 00:41:30 +0800
commit52fd4e4395cd8852ac0dcb31062cce60f1b97209 (patch)
treea5aa82c193fd7187171bc28909f3e583d8cd40ed /openbsc/src/abis_nm.c
parentebead597ff571ac6d4eb2986b64aa5242a563382 (diff)
ipaccess: Send the reset to the BASEBAND_TRANSC and supply TRX
Send the IPA Restart to a given BTS/TRX, change the signal callbacks to carry the trx instead of the BTS so we have an easy access to the right TRX and change the ipaccess-config to use that TRX. This is fixing the restart with a multi TRX setup. Even if we have the msg->trx, use the gsm_bts_trx_by_nr and get the TRX from the fom header. This is because the OpenBSC and the BTS numbering might not match for the multi TRX case.
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r--openbsc/src/abis_nm.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index 42f610d82..ee0604d3c 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -2775,12 +2775,12 @@ static int abis_nm_rx_ipacc(struct msgb *msg)
case NM_MT_IPACC_RSL_CONNECT_NACK:
case NM_MT_IPACC_SET_NVATTR_NACK:
case NM_MT_IPACC_GET_NVATTR_NACK:
- signal.bts = msg->trx->bts;
+ signal.trx = gsm_bts_trx_by_nr(msg->trx->bts, foh->obj_inst.trx_nr);
signal.msg_type = foh->msg_type;
dispatch_signal(SS_NM, S_NM_IPACC_NACK, &signal);
break;
case NM_MT_IPACC_SET_NVATTR_ACK:
- signal.bts = msg->trx->bts;
+ signal.trx = gsm_bts_trx_by_nr(msg->trx->bts, foh->obj_inst.trx_nr);
signal.msg_type = foh->msg_type;
dispatch_signal(SS_NM, S_NM_IPACC_ACK, &signal);
break;
@@ -2866,9 +2866,16 @@ int abis_nm_ipaccess_rsl_connect(struct gsm_bts_trx *trx,
}
/* restart / reboot an ip.access nanoBTS */
-int abis_nm_ipaccess_restart(struct gsm_bts *bts)
+int abis_nm_ipaccess_restart(struct gsm_bts_trx *trx)
{
- return __simple_cmd(bts, NM_MT_IPACC_RESTART);
+ struct abis_om_hdr *oh;
+ struct msgb *msg = nm_msgb_alloc();
+
+ oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
+ fill_om_fom_hdr(oh, 0, NM_MT_IPACC_RESTART, NM_OC_BASEB_TRANSC,
+ trx->bts->nr, trx->nr, 0xff);
+
+ return abis_nm_sendmsg(trx->bts, msg);
}
int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, u_int8_t obj_class,