[osmo-bts PATCH 2/3] sysmobts/sysmobts-mgr: Changed Reduce Power attribute and the tlv definition

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Alvaro Neira Ayuso anayuso at sysmocom.de
Mon May 19 17:25:53 UTC 2014


From: Álvaro Neira Ayuso <anayuso at sysmocom.de>

This patch is for changing the code for having consistency
with the patch of libosmocore:

Fix introducing osmocom speficic OML attributes
5b5650f3de0213a459b4184bab3ab2d0d833c4a4

For using the new tlv definition structure abis_nm_osmo_att_tlvdef and
change the attribute NM_ATT_O_REDUCEPOWER to NM_ATT_OSMO_REDUCEPOWER.

Signed-off-by: Alvaro Neira Ayuso <anayuso at sysmocom.de>
---
 src/osmo-bts-sysmo/main.c               |    6 +++---
 src/osmo-bts-sysmo/misc/sysmobts_misc.c |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 2c13a9c..60312b8 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -296,7 +296,7 @@ static int write_pid_file(char *procname)
 }
 
 #define oml_tlv_parse(dec, buf, len)	\
-	tlv_parse(dec, &abis_nm_att_tlvdef, buf, len, 0, 0)
+	tlv_parse(dec, &abis_nm_osmo_att_tlvdef, buf, len, 0, 0)
 
 static int send_oml_fom_ack_nack(int fd_unix, struct msgb *old_msg,
 				 uint8_t cause, int is_manuf)
@@ -377,9 +377,9 @@ static int take_reduce_power(struct msgb *msg)
 		return -1;
 	}
 
-	if (TLVP_PRESENT(&tlv_out, NM_ATT_O_REDUCEPOWER))
+	if (TLVP_PRESENT(&tlv_out, NM_ATT_OSMO_REDUCEPOWER))
 		recv_reduce_power = *TLVP_VAL(&tlv_out,
-					      NM_ATT_O_REDUCEPOWER);
+					      NM_ATT_OSMO_REDUCEPOWER);
 	else
 		return -1;
 
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_misc.c b/src/osmo-bts-sysmo/misc/sysmobts_misc.c
index 6277a6b..5a52005 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_misc.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_misc.c
@@ -142,7 +142,7 @@ int send_manufacturer_reduce_msg(int fd_unix, int reduce_power, int trx_nr)
 
 	add_oml_hdr_msg(msg, NM_MT_SET_RADIO_ATTR, 2, 0, trx_nr, 255, 1);
 
-	msgb_tv_put(msg, NM_ATT_O_REDUCEPOWER, reduce_power);
+	msgb_tv_put(msg, NM_ATT_OSMO_REDUCEPOWER, reduce_power);
 
 	prepend_oml_ipa_header(msg);
 
-- 
1.7.10.4





More information about the OpenBSC mailing list