laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/38421?usp=email )

Change subject: vty: lchan_dump_full_vty(): print CSD mode
......................................................................

vty: lchan_dump_full_vty(): print CSD mode

Change-Id: Ibcf489eff73d6d117e94dee06a5a82a3404368f2
Related: OS#1572, OS#6579
---
M include/osmo-bts/lchan.h
M src/common/lchan.c
M src/common/vty.c
3 files changed, 25 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h
index 60c2710..df2f4fa 100644
--- a/include/osmo-bts/lchan.h
+++ b/include/osmo-bts/lchan.h
@@ -88,6 +88,12 @@
        _LCHAN_CSD_M_NUM,
 };

+extern const struct value_string lchan_csd_mode_descs[];
+static inline const char *lchan_csd_mode_desc(enum lchan_csd_mode mode)
+{
+       return get_value_string(lchan_csd_mode_descs, mode);
+}
+
 /* State of the SAPIs in the lchan */
 enum lchan_sapi_state {
        LCHAN_SAPI_S_NONE,
diff --git a/src/common/lchan.c b/src/common/lchan.c
index 5b41a15..0afc294 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -56,6 +56,20 @@
        { 0, NULL }
 };

+const struct value_string lchan_csd_mode_descs[] = {
+       { LCHAN_CSD_M_NT,               "non-transparent" },
+       { LCHAN_CSD_M_T_1200_75,        "transparent @ 1200/75 bps" },
+       { LCHAN_CSD_M_T_600,            "transparent @ 600 bps" },
+       { LCHAN_CSD_M_T_1200,           "transparent @ 1200 bps" },
+       { LCHAN_CSD_M_T_2400,           "transparent @ 2400 bps" },
+       { LCHAN_CSD_M_T_4800,           "transparent @ 4800 bps" },
+       { LCHAN_CSD_M_T_9600,           "transparent @ 9600 bps" },
+       { LCHAN_CSD_M_T_14400,          "transparent @ 14400 bps" },
+       { LCHAN_CSD_M_T_29000,          "transparent @ 29000 bps" },
+       { LCHAN_CSD_M_T_32000,          "transparent @ 32000 bps" },
+       { 0, NULL }
+};
+
 /* prepare the per-SAPI T200 arrays for a given lchan */
 static int t200_by_lchan(uint32_t *t200_fn_dcch, uint32_t *t200_fn_acch, 
struct gsm_lchan *lchan)
 {
diff --git a/src/common/vty.c b/src/common/vty.c
index c0008a8..ca7947b 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -1997,6 +1997,11 @@
        vty_out(vty, "  Channel Mode / Codec: %s%s",
                gsm48_chan_mode_name(lchan->tch_mode),
                VTY_NEWLINE);
+       if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA) {
+               vty_out(vty, "  CSD mode: %s%s",
+                       lchan_csd_mode_desc(lchan->csd_mode),
+                       VTY_NEWLINE);
+       }
        if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR) {
                const struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr;
                const struct gsm48_multi_rate_conf *mr_conf =

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38421?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibcf489eff73d6d117e94dee06a5a82a3404368f2
Gerrit-Change-Number: 38421
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to