<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/20686">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rsl: rsl_chan_nr_str_buf(): use ABIS_RSL_CHAN_NR_CBITS_* macros<br><br>Change-Id: I3cd745e180787ea5c22f2a13441d599e0220d81f<br>---<br>M src/gsm/rsl.c<br>1 file changed, 10 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/20686/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c</span><br><span>index cdbdf91..c3420b6 100644</span><br><span>--- a/src/gsm/rsl.c</span><br><span>+++ b/src/gsm/rsl.c</span><br><span>@@ -232,25 +232,25 @@</span><br><span>   int ts = chan_nr & 7;</span><br><span>    uint8_t cbits = chan_nr >> 3;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (cbits == 0x01)</span><br><span style="color: hsl(120, 100%, 40%);">+    if (cbits == ABIS_RSL_CHAN_NR_CBITS_Bm_ACCHs)</span><br><span>                snprintf(buf, buf_len, "TCH/F on TS%d", ts);</span><br><span style="color: hsl(0, 100%, 40%);">-  else if ((cbits & 0x1e) == 0x02)</span><br><span style="color: hsl(120, 100%, 40%);">+  else if ((cbits & 0x1e) == ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(0))</span><br><span>           snprintf(buf, buf_len, "TCH/H(%u) on TS%d", cbits & 0x01, ts);</span><br><span style="color: hsl(0, 100%, 40%);">-    else if ((cbits & 0x1c) == 0x04)</span><br><span style="color: hsl(120, 100%, 40%);">+  else if ((cbits & 0x1c) == ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(0))</span><br><span>                snprintf(buf, buf_len, "SDCCH/4(%u) on TS%d", cbits & 0x03, ts);</span><br><span style="color: hsl(0, 100%, 40%);">-  else if ((cbits & 0x18) == 0x08)</span><br><span style="color: hsl(120, 100%, 40%);">+  else if ((cbits & 0x18) == ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(0))</span><br><span>                snprintf(buf, buf_len, "SDCCH/8(%u) on TS%d", cbits & 0x07, ts);</span><br><span style="color: hsl(0, 100%, 40%);">-  else if (cbits == 0x10)</span><br><span style="color: hsl(120, 100%, 40%);">+       else if (cbits == ABIS_RSL_CHAN_NR_CBITS_BCCH)</span><br><span>               snprintf(buf, buf_len, "BCCH on TS%d", ts);</span><br><span style="color: hsl(0, 100%, 40%);">-   else if (cbits == 0x11)</span><br><span style="color: hsl(120, 100%, 40%);">+       else if (cbits == ABIS_RSL_CHAN_NR_CBITS_RACH)</span><br><span>               snprintf(buf, buf_len, "RACH on TS%d", ts);</span><br><span style="color: hsl(0, 100%, 40%);">-   else if (cbits == 0x12)</span><br><span style="color: hsl(120, 100%, 40%);">+       else if (cbits == ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH)</span><br><span>           snprintf(buf, buf_len, "PCH/AGCH on TS%d", ts);</span><br><span style="color: hsl(0, 100%, 40%);">-       else if (cbits == 0x18)</span><br><span style="color: hsl(120, 100%, 40%);">+       else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH)</span><br><span>          snprintf(buf, buf_len, "PDCH on TS%d", ts);</span><br><span style="color: hsl(0, 100%, 40%);">-   else if (cbits == 0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+       else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4)</span><br><span>                 snprintf(buf, buf_len, "CBCH(SDCCH/4) on TS%d", ts);</span><br><span style="color: hsl(0, 100%, 40%);">-  else if (cbits == 0x1a)</span><br><span style="color: hsl(120, 100%, 40%);">+       else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8)</span><br><span>                 snprintf(buf, buf_len, "CBCH(SDCCH/8) on TS%d", ts);</span><br><span>       else</span><br><span>                 snprintf(buf, buf_len, "UNKNOWN on TS%d", ts);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/20686">change 20686</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/20686"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3cd745e180787ea5c22f2a13441d599e0220d81f </div>
<div style="display:none"> Gerrit-Change-Number: 20686 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>