From patchwork Mon May 19 17:25:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alvaro Neira X-Patchwork-Id: 350356 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 93AFC14008E for ; Tue, 20 May 2014 03:27:06 +1000 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1WmRKy-0004pf-OO; Mon, 19 May 2014 19:26:57 +0200 Received: from mail.sysmocom.de ([2a01:4f8:191:444c::2:4]) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1WmRKm-0004pV-Gu for openbsc@lists.osmocom.org; Mon, 19 May 2014 19:26:48 +0200 Received: from localhost.localdomain (tmo-109-137.customers.d1-online.com [80.187.109.137]) by mail.sysmocom.de (Postfix) with ESMTPA id 153495907D; Mon, 19 May 2014 17:26:40 +0000 (UTC) From: Alvaro Neira Ayuso To: openbsc@lists.osmocom.org Subject: [osmo-bts PATCH 2/3] sysmobts/sysmobts-mgr: Changed Reduce Power attribute and the tlv definition Date: Mon, 19 May 2014 19:25:53 +0200 Message-Id: <1400520353-15062-1-git-send-email-anayuso@sysmocom.de> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) Cc: hwelte@sysmocom.de, hfreyther@sysmocom.de X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org From: Álvaro Neira Ayuso 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 --- 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);