pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32204 )
Change subject: bts_model_apply_oml(): Improve definition of parameter ......................................................................
bts_model_apply_oml(): Improve definition of parameter
The param is usually called obj_class. Furthermore, we have an enum for it, so let's use it to make it clear what this param is.
Change-Id: Ife2e98a791455d5f7e7052356d559af2f1d4d185 --- M include/osmo-bts/bts_model.h M src/osmo-bts-lc15/oml.c M src/osmo-bts-oc2g/oml.c M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-omldummy/bts_model.c M src/osmo-bts-sysmo/oml.c M src/osmo-bts-trx/l1_if.c M src/osmo-bts-virtual/bts_model.c M tests/stubs.c 9 files changed, 31 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/04/32204/1
diff --git a/include/osmo-bts/bts_model.h b/include/osmo-bts/bts_model.h index 168930e..3baa416 100644 --- a/include/osmo-bts/bts_model.h +++ b/include/osmo-bts/bts_model.h @@ -5,6 +5,7 @@
#include <osmocom/gsm/tlv.h> #include <osmocom/gsm/gsm_utils.h> +#include <osmocom/gsm/protocol/gsm_12_21.h>
#include <osmo-bts/gsm_data.h>
@@ -20,7 +21,8 @@ struct tlv_parsed *old_attr, struct tlv_parsed *new_attr, void *obj);
-int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int obj_kind, void *obj); +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj);
int bts_model_opstart(struct gsm_bts *bts, struct gsm_abis_mo *mo, void *obj); diff --git a/src/osmo-bts-lc15/oml.c b/src/osmo-bts-lc15/oml.c index 1402483..bdafbcf 100644 --- a/src/osmo-bts-lc15/oml.c +++ b/src/osmo-bts-lc15/oml.c @@ -1801,7 +1801,8 @@ }
/* callback from OML */ -int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { struct abis_om_fom_hdr *foh = msgb_l3(msg); int rc; diff --git a/src/osmo-bts-oc2g/oml.c b/src/osmo-bts-oc2g/oml.c index ac4fe46..367d0bb 100644 --- a/src/osmo-bts-oc2g/oml.c +++ b/src/osmo-bts-oc2g/oml.c @@ -1810,7 +1810,8 @@ }
/* callback from OML */ -int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { struct abis_om_fom_hdr *foh = msgb_l3(msg); int rc; diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index f51252e..5e07f85 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1742,7 +1742,8 @@ }
/* callback from OML */ -int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { struct abis_om_fom_hdr *foh = msgb_l3(msg); int rc; diff --git a/src/osmo-bts-omldummy/bts_model.c b/src/osmo-bts-omldummy/bts_model.c index 55e43d3..10172a0 100644 --- a/src/osmo-bts-omldummy/bts_model.c +++ b/src/osmo-bts-omldummy/bts_model.c @@ -93,7 +93,8 @@ return 0; }
-int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { struct abis_om_fom_hdr *foh = msgb_l3(msg); int rc; diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index 8b2669f..5c7aa45 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -1714,7 +1714,8 @@ }
/* callback from OML */ -int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { struct abis_om_fom_hdr *foh = msgb_l3(msg); int rc; diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 5e6a22c..8c1dc2e 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -548,7 +548,8 @@ }
/* callback from OML */ -int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { struct abis_om_fom_hdr *foh = msgb_l3(msg); int rc; diff --git a/src/osmo-bts-virtual/bts_model.c b/src/osmo-bts-virtual/bts_model.c index 91a1ec8..66c2336 100644 --- a/src/osmo-bts-virtual/bts_model.c +++ b/src/osmo-bts-virtual/bts_model.c @@ -128,7 +128,8 @@ return 0; }
-int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { struct abis_om_fom_hdr *foh = msgb_l3(msg); int rc; diff --git a/tests/stubs.c b/tests/stubs.c index 00617cd..5f8cc99 100644 --- a/tests/stubs.c +++ b/tests/stubs.c @@ -18,7 +18,8 @@ { return 0; } int bts_model_trx_init(struct gsm_bts_trx *trx) { return 0; } -int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int kind, void *obj) +int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, + enum abis_nm_obj_class obj_class, void *obj) { return 0; }
int bts_model_trx_deact_rf(struct gsm_bts_trx *trx)