aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/tx_power.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-06-18 16:56:22 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-06-18 19:11:55 +0200
commitd819a57c60a28dcad4478f041e82b9da818e0373 (patch)
tree77451e002f037f479157cb87ab26f5a84ee95bd9 /src/common/tx_power.c
parentcec19e6324b43f141a03fbc72f20534099b20be1 (diff)
Introduce LOGPTRX macro and use it in tx_power.c
Rename OCTPHY specific LOPGTRX macro to avoid redefine conflicts. Change-Id: I02878611501aca51039e2ac7e35784ccb93b1db6
Diffstat (limited to 'src/common/tx_power.c')
-rw-r--r--src/common/tx_power.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/common/tx_power.c b/src/common/tx_power.c
index db3121d8..705038c5 100644
--- a/src/common/tx_power.c
+++ b/src/common/tx_power.c
@@ -171,13 +171,13 @@ static void power_ramp_timer_cb(void *_trx)
/* compute new effective (= minus ramp and thermal attenuation) TRX output required */
p_trxout_eff_mdBm = get_p_trxout_eff_mdBm(trx, tpp->p_total_tgt_mdBm);
- LOGP(DL1C, LOGL_DEBUG, "ramp_timer_cb(cur_pout=%d, tgt_pout=%d, "
+ LOGPTRX(trx, DL1C, LOGL_DEBUG, "ramp_timer_cb(cur_pout=%d, tgt_pout=%d, "
"ramp_att=%d, therm_att=%d, user_gain=%d)\n",
tpp->p_total_cur_mdBm, tpp->p_total_tgt_mdBm,
tpp->ramp.attenuation_mdB, tpp->thermal_attenuation_mdB,
tpp->user_gain_mdB);
- LOGP(DL1C, LOGL_INFO,
+ LOGPTRX(trx, DL1C, LOGL_INFO,
"ramping TRX board output power to %d mdBm.\n", p_trxout_eff_mdBm);
/* Instruct L1 to apply new effective TRX output power required */
@@ -196,9 +196,9 @@ void power_trx_change_compl(struct gsm_bts_trx *trx, int p_trxout_cur_mdBm)
/* for now we simply write an error message, but in the future
* we might use the value (again) as part of our math? */
if (p_trxout_cur_mdBm != p_trxout_should_mdBm) {
- LOGP(DL1C, LOGL_ERROR, "bts_model notifies us of %u mdBm TRX "
- "output power. However, it should be %u mdBm!\n",
- p_trxout_cur_mdBm, p_trxout_should_mdBm);
+ LOGPTRX(trx, DL1C, LOGL_ERROR, "bts_model notifies us of %u mdBm TRX "
+ "output power. However, it should be %u mdBm!\n",
+ p_trxout_cur_mdBm, p_trxout_should_mdBm);
}
/* and do another step... */
@@ -244,13 +244,13 @@ int power_ramp_start(struct gsm_bts_trx *trx, int p_total_tgt_mdBm, int bypass)
* the maximum total system power subtracted by OML as well as RSL
* reductions */
- LOGP(DL1C, LOGL_INFO, "power_ramp_start(cur=%d, tgt=%d)\n",
+ LOGPTRX(trx, DL1C, LOGL_INFO, "power_ramp_start(cur=%d, tgt=%d)\n",
tpp->p_total_cur_mdBm, p_total_tgt_mdBm);
if (!bypass && (p_total_tgt_mdBm > get_p_nominal_mdBm(trx))) {
- LOGP(DL1C, LOGL_ERROR, "Asked to ramp power up to "
- "%d mdBm, which exceeds P_max_out (%d)\n",
- p_total_tgt_mdBm, get_p_nominal_mdBm(trx));
+ LOGPTRX(trx, DL1C, LOGL_ERROR, "Asked to ramp power up to "
+ "%d mdBm, which exceeds P_max_out (%d)\n",
+ p_total_tgt_mdBm, get_p_nominal_mdBm(trx));
return -ERANGE;
}
@@ -262,7 +262,7 @@ int power_ramp_start(struct gsm_bts_trx *trx, int p_total_tgt_mdBm, int bypass)
if (we_are_ramping_up(trx)) {
if (tpp->p_total_tgt_mdBm <= tpp->ramp.max_initial_pout_mdBm) {
- LOGP(DL1C, LOGL_INFO,
+ LOGPTRX(trx, DL1C, LOGL_INFO,
"target_power(%d) is below max.initial power\n",
tpp->p_total_tgt_mdBm);
/* new setting is below the maximum initial output