[OML] Allow each BTS model to specify the OML callback
This allows us to add BTS models that do not use the standard TS 12.21 OML
This commit is contained in:
parent
a4898a868b
commit
09cefee4db
|
@ -429,6 +429,8 @@ struct gsm_bts_model {
|
|||
enum gsm_bts_type type;
|
||||
const char *name;
|
||||
|
||||
int (*oml_rcvmsg)(struct msgb *msg);
|
||||
|
||||
struct tlv_definition nm_att_tlvdef;
|
||||
|
||||
struct bitvec features;
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
static struct gsm_bts_model model_nanobts = {
|
||||
.type = GSM_BTS_TYPE_NANOBTS,
|
||||
.name = "nanobts",
|
||||
.oml_rcvmsg = &abis_nm_rcvmsg,
|
||||
.nm_att_tlvdef = {
|
||||
.def = {
|
||||
/* ip.access specifics */
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
static struct gsm_bts_model model_bs11 = {
|
||||
.type = GSM_BTS_TYPE_BS11,
|
||||
.name = "bs11",
|
||||
.oml_rcvmsg = &abis_nm_rcvmsg,
|
||||
.nm_att_tlvdef = {
|
||||
.def = {
|
||||
[NM_ATT_AVAIL_STATUS] = { TLV_TYPE_TLV },
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
static struct gsm_bts_model model_unknown = {
|
||||
.type = GSM_BTS_TYPE_UNKNOWN,
|
||||
.name = "unknown",
|
||||
.oml_rcvmsg = &abis_nm_rcvmsg,
|
||||
.nm_att_tlvdef = {
|
||||
.def = {
|
||||
},
|
||||
|
|
|
@ -475,6 +475,7 @@ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
|
|||
u_int8_t tei, u_int8_t sapi)
|
||||
{
|
||||
struct e1inp_sign_link *link;
|
||||
struct gsm_bts *bts;
|
||||
int ret;
|
||||
|
||||
switch (ts->type) {
|
||||
|
@ -492,7 +493,8 @@ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
|
|||
switch (link->type) {
|
||||
case E1INP_SIGN_OML:
|
||||
msg->trx = link->trx;
|
||||
ret = abis_nm_rcvmsg(msg);
|
||||
bts = msg->trx->bts;
|
||||
ret = bts->model->oml_rcvmsg(msg);
|
||||
break;
|
||||
case E1INP_SIGN_RSL:
|
||||
msg->trx = link->trx;
|
||||
|
|
Loading…
Reference in New Issue