Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11874 )

Change subject: trxcon/l1ctl.c: fix deprecated gsm_band_name() usage
......................................................................

trxcon/l1ctl.c: fix deprecated gsm_band_name() usage

Change-Id: I99bb935b7cd529c885bf10dc209b6016df8095d8
---
M src/host/trxcon/l1ctl.c
1 file changed, 13 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 83cdc2e..f239b30 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -46,6 +46,16 @@
 #include "trx_if.h"
 #include "sched_trx.h"

+static const char *arfcn2band_name(uint16_t arfcn)
+{
+       enum gsm_band band;
+
+       if (gsm_arfcn2band_rc(arfcn, &band) < 0)
+               return "(invalid)";
+
+       return gsm_band_name(band);
+}
+
 static struct msgb *l1ctl_alloc_msg(uint8_t msg_type)
 {
        struct l1ctl_hdr *l1h;
@@ -80,7 +90,7 @@
                return -ENOMEM;
 
        LOGP(DL1C, LOGL_DEBUG, "Send PM Conf (%s %d = %d dBm)\n",
-               gsm_band_name(gsm_arfcn2band(band_arfcn)),
+               arfcn2band_name(band_arfcn),
                band_arfcn &~ ARFCN_FLAG_MASK, dbm);

        pmc = (struct l1ctl_pm_conf *) msgb_put(msg, sizeof(*pmc));
@@ -331,7 +341,7 @@
        timeout = ntohs(fbsb->timeout);

        LOGP(DL1C, LOGL_NOTICE, "Received FBSB request (%s %d)\n",
-               gsm_band_name(gsm_arfcn2band(band_arfcn)),
+               arfcn2band_name(band_arfcn),
                band_arfcn &~ ARFCN_FLAG_MASK);

        /* Reset scheduler and clock counter */
@@ -385,7 +395,7 @@

        LOGP(DL1C, LOGL_NOTICE, "Received power measurement "
                "request (%s: %d -> %d)\n",
-               gsm_band_name(gsm_arfcn2band(band_arfcn_start)),
+               arfcn2band_name(band_arfcn_start),
                band_arfcn_start &~ ARFCN_FLAG_MASK,
                band_arfcn_stop &~ ARFCN_FLAG_MASK);


--
To view, visit https://gerrit.osmocom.org/11874
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I99bb935b7cd529c885bf10dc209b6016df8095d8
Gerrit-Change-Number: 11874
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>

Reply via email to