aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gprs_ms.cpp13
-rw-r--r--src/gprs_ms.h8
-rw-r--r--src/gprs_rlcmac_meas.cpp5
3 files changed, 17 insertions, 9 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index 494ed2e2..f82026a5 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -685,13 +685,12 @@ void GprsMs::update_cs_ul(const pcu_l1_meas *meas)
mcs_inc_kind(&new_cs_ul, mode());
if (m_current_cs_ul != new_cs_ul) {
- LOGP(DRLCMACMEAS, LOGL_INFO,
- "MS (IMSI %s): "
- "Link quality %ddB (old %ddB) left window [%d, %d], "
- "modifying uplink CS level: %s -> %s\n",
- imsi(), meas->link_qual, old_link_qual,
- low, high,
- mcs_name(m_current_cs_ul), mcs_name(new_cs_ul));
+ LOGPMS(this, DRLCMACMEAS, LOGL_INFO,
+ "Link quality %ddB (old %ddB) left window [%d, %d], "
+ "modifying uplink CS level: %s -> %s\n",
+ meas->link_qual, old_link_qual,
+ low, high,
+ mcs_name(m_current_cs_ul), mcs_name(new_cs_ul));
m_current_cs_ul = new_cs_ul;
}
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 1e5a1558..0a1dda75 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -39,6 +39,7 @@ extern "C" {
#include <stdint.h>
#include <stddef.h>
+#include <inttypes.h>
struct BTS;
struct gprs_rlcmac_trx;
@@ -296,3 +297,10 @@ inline gprs_rlcmac_trx *GprsMs::current_trx() const
{
return m_current_trx;
}
+
+#define LOGPMS(ms, category, level, fmt, args...) \
+ LOGP(category, level, "MS(TLLI=0x%08x, IMSI=%s, TA=%" PRIu8 ", %" PRIu8 "/%" PRIu8 ",%s%s) " fmt, \
+ (ms)->tlli(), (ms)->imsi(), (ms)->ta(), (ms)->ms_class(), (ms)->egprs_ms_class(), \
+ (ms)->ul_tbf() ? " UL": "", \
+ (ms)->dl_tbf() ? " DL": "", \
+ ## args)
diff --git a/src/gprs_rlcmac_meas.cpp b/src/gprs_rlcmac_meas.cpp
index f4a7e479..e4df559e 100644
--- a/src/gprs_rlcmac_meas.cpp
+++ b/src/gprs_rlcmac_meas.cpp
@@ -26,6 +26,7 @@ extern "C" {
#include <pcu_l1_if.h>
#include <tbf.h>
#include <tbf_dl.h>
+#include <gprs_ms.h>
#include <string.h>
#include <errno.h>
@@ -105,8 +106,8 @@ int gprs_rlcmac_rssi_rep(struct gprs_rlcmac_tbf *tbf)
if (!tbf->meas.rssi_num)
return -EINVAL;
- LOGP(DRLCMACMEAS, LOGL_INFO, "UL RSSI of TLLI=0x%08x: %d dBm\n",
- tbf->tlli(), tbf->meas.rssi_sum / tbf->meas.rssi_num);
+ LOGPMS(tbf->ms(), DRLCMACMEAS, LOGL_INFO, "UL RSSI: %d dBm\n",
+ tbf->meas.rssi_sum / tbf->meas.rssi_num);
return 0;
}