aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-06-03 16:10:51 +0200
committerlaforge <laforge@osmocom.org>2020-06-05 20:57:08 +0000
commit897aa786c20b1fcb91aebb4f579554902f151c48 (patch)
treec77475c16871413b899c58c9346b14bc80deb3f5 /include
parentaa5e46dc9aa92c3086fb66acbbf1966df692edba (diff)
bts-trx: phy_link: Improve logging fmt in phy_link_state_set()
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/phy_link.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index cf877bde..2bed8ea3 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -157,6 +157,7 @@ struct phy_instance {
struct phy_link *phy_link_by_num(int num);
struct phy_link *phy_link_create(void *ctx, int num);
void phy_link_destroy(struct phy_link *plink);
+const char *phy_link_name(struct phy_link *plink);
void phy_link_state_set(struct phy_link *plink, enum phy_link_state state);
enum phy_link_state phy_link_state_get(struct phy_link *plink);
const char *phy_link_state_name(enum phy_link_state state);
@@ -178,4 +179,5 @@ static inline struct phy_instance *trx_phy_instance(const struct gsm_bts_trx *tr
int bts_model_phy_link_open(struct phy_link *plink);
+#define LOGPPHL(plink, section, lvl, fmt, args...) LOGP(section, lvl, "%s: " fmt, phy_link_name(plink), ##args)
#define LOGPPHI(pinst, section, lvl, fmt, args...) LOGP(section, lvl, "%s: " fmt, phy_instance_name(pinst), ##args)