aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts/gsm_data.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-12-12 23:57:13 +0100
committerHarald Welte <laforge@gnumonks.org>2018-12-23 10:38:23 +0000
commit5d9cb9f55534cd828290fced6dddd3094d4c1aa4 (patch)
tree6eac1d41ea6b544c74d6d9bb9c4d1c0220dd7c9b /include/osmo-bts/gsm_data.h
parenta4f562240863393fb6c1dc3b9261add253794ddf (diff)
osmo-bts-trx/loops.c: Use lchan name based logging
The loops.c code dates back to ancient times when we printed the TRX number and the raw channel number to identify a logical channel. We meanwhile have gsm_lchan_name() and should use it to log messages related to this lchan in a common format. This commit introduces the LOGPLCHAN() helper macro [similar to osmo-bsc], and uses it from loops.c. As a result, some functions don't need a chan_nr argument anymore, while some need to add a new lchan argument. Change-Id: I6976dd7444c26b1f52741bc367b0311ebbef1718 Related: OS#1622, OS#1851
Diffstat (limited to 'include/osmo-bts/gsm_data.h')
-rw-r--r--include/osmo-bts/gsm_data.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 9e62cdf0..1de5eddd 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -24,6 +24,8 @@
#define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41
#define GSM_BTS_AGCH_QUEUE_HIGH_LEVEL_DEFAULT 91
+#define LOGPLCHAN(lchan, ss, lvl, fmt, args...) LOGP(ss, lvl, "%s " fmt, gsm_lchan_name(lchan), ## args)
+
struct gsm_network {
struct llist_head bts_list;
unsigned int num_bts;