aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-02-12 14:29:30 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-02-12 14:29:38 +0100
commit52d7eafceae67822c6a342bb0985c716f2845d34 (patch)
tree455151e9e1ed2451935451135e6785e7179e9f51 /src/osmo-bts-sysmo/l1_if.c
parentcb69d607c95b04ace9e8b27ccc7b6c762d42555a (diff)
l1_if: Fix strange formatting of Meas info logging
Some use LOGPC, but were used after a LOGP with a trailing newline. Let's simply add some defines/macros to be able to include it into a normal LOGP easily insted of having a function. Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 199d8bd4..db0dfb56 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -937,12 +937,8 @@ empty_frame:
goto tx;
}
-static void dump_meas_res(int ll, GsmL1_MeasParam_t *m)
-{
- LOGPC(DL1C, ll, ", Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, "
- "BER %-3.2f, Timing %d\n", m->fRssi, m->fLinkQuality,
- m->fBer, m->i16BurstTiming);
-}
+#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d"
+#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming
static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr,
uint32_t fn, GsmL1_MeasParam_t *m)
@@ -991,10 +987,10 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i
gsm_fn2gsmtime(&g_time, fn);
- DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s\n",
+ DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n",
get_value_string(femtobts_l1sapi_names, data_ind->sapi), data_ind->hLayer2,
- osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size));
- dump_meas_res(LOGL_DEBUG, &data_ind->measParam);
+ osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size),
+ LOG_PARAM_MEAS(&data_ind->measParam));
/* check for TCH */
if (data_ind->sapi == GsmL1_Sapi_TchF
@@ -1040,8 +1036,8 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind,
struct ph_rach_ind_param rach_ind_param;
set_log_ctx_sapi(ra_ind->sapi);
-
- dump_meas_res(LOGL_DEBUG, &ra_ind->measParam);
+ LOGPFN(DL1C, LOGL_DEBUG, ra_ind->u32Fn, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n",
+ LOG_PARAM_MEAS(&ra_ind->measParam));
if ((ra_ind->msgUnitParam.u8Size != 1) &&
(ra_ind->msgUnitParam.u8Size != 2)) {