diff mbox

[1/5] openbsc/gsm_data_shared.h: Added the attribute reduce_power in TRX

Message ID 1398685127-19093-1-git-send-email-anayuso@sysmocom.de
State Accepted
Headers show

Commit Message

Alvaro Neira April 28, 2014, 11:38 a.m. UTC
From: Álvaro Neira Ayuso <anayuso@sysmocom.de>

Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
---
 openbsc/include/openbsc/gsm_data_shared.h |    1 +
 1 file changed, 1 insertion(+)

Comments

Holger Freyther April 29, 2014, 7:14 a.m. UTC | #1
On Mon, Apr 28, 2014 at 01:38:47PM +0200, Alvaro Neira Ayuso wrote:
> From: Álvaro Neira Ayuso <anayuso@sysmocom.de>

> --- a/openbsc/include/openbsc/gsm_data_shared.h
> +++ b/openbsc/include/openbsc/gsm_data_shared.h
> @@ -371,6 +371,7 @@ struct gsm_bts_trx {
>  	uint16_t arfcn;
>  	int nominal_power;		/* in dBm */
>  	unsigned int max_power_red;	/* in actual dB */
> +	int power_reduce;		/* in dBm */

any reason to make it use int and not unsigned int? As this
is a relative value the right unit is dB (take this with a
grain of salt as I am just a software guy)
Alvaro Neira April 29, 2014, 8:44 a.m. UTC | #2
On Tue, Apr 29, 2014 at 09:14:07AM +0200, Holger Hans Peter Freyther wrote:
> On Mon, Apr 28, 2014 at 01:38:47PM +0200, Alvaro Neira Ayuso wrote:
> > From: Álvaro Neira Ayuso <anayuso@sysmocom.de>
> 
> > --- a/openbsc/include/openbsc/gsm_data_shared.h
> > +++ b/openbsc/include/openbsc/gsm_data_shared.h
> > @@ -371,6 +371,7 @@ struct gsm_bts_trx {
> >  	uint16_t arfcn;
> >  	int nominal_power;		/* in dBm */
> >  	unsigned int max_power_red;	/* in actual dB */
> > +	int power_reduce;		/* in dBm */
> 
> any reason to make it use int and not unsigned int? As this
> is a relative value the right unit is dB (take this with a
> grain of salt as I am just a software guy)

No, I don't have any reason for using int. But I have seen that that
it's better to use unsigned int because it's a little bit strange
accept to use negative values in a one attribute that we want to use
for reducing the power transmitter. I'm going to change that and send
you another version. Thanks Holger
diff mbox

Patch

diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index ae9e7d8..a4d3c54 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -371,6 +371,7 @@  struct gsm_bts_trx {
 	uint16_t arfcn;
 	int nominal_power;		/* in dBm */
 	unsigned int max_power_red;	/* in actual dB */
+	int power_reduce;		/* in dBm */
 
 	struct {
 		void *l1h;