<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/14199">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH<br><br>We don't really *need* it in libosmocore as such, but the lack of<br>having all osmocom extensions listed here lead to using overlapping<br>definitions: 0x18 was used for dynamic PDCH on the Abis side, but also<br>for CBCH on the L1SAP side.  Let's list them all here to increase<br>visibility in case anyone wants to extend this further...<br><br>Related: OS#4027<br>Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12<br>---<br>M include/osmocom/gsm/protocol/gsm_08_58.h<br>M src/gsm/rsl.c<br>2 files changed, 15 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/14199/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h</span><br><span>index 3ea4e63..d36920d 100644</span><br><span>--- a/include/osmocom/gsm/protocol/gsm_08_58.h</span><br><span>+++ b/include/osmocom/gsm/protocol/gsm_08_58.h</span><br><span>@@ -50,6 +50,8 @@</span><br><span> #define ABIS_RSL_CHAN_NR_CBITS_RACH               0x11</span><br><span> #define ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH 0x12</span><br><span> #define ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH        0x18 /*< non-standard, for dyn TS */</span><br><span style="color: hsl(120, 100%, 40%);">+#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4      0x19 /*< non-standard, for CBCH/SDCCH4 */</span><br><span style="color: hsl(120, 100%, 40%);">+#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8 0x1a /*< non-standard, for CBCH/SDCCH8 */</span><br><span> </span><br><span> /* Link Identifier 9.3.2 */</span><br><span> union abis_rsl_link_id {</span><br><span>@@ -424,6 +426,8 @@</span><br><span> #define RSL_CHAN_RACH              0x88</span><br><span> #define RSL_CHAN_PCH_AGCH       0x90</span><br><span> #define RSL_CHAN_OSMO_PDCH      0xc0    /*< non-standard, for dyn TS */</span><br><span style="color: hsl(120, 100%, 40%);">+#define RSL_CHAN_OSMO_CBCH4 0xc1    /*< non-standard, for CBCH/SDCCH4 */</span><br><span style="color: hsl(120, 100%, 40%);">+#define RSL_CHAN_OSMO_CBCH8    0xc2    /*< non-standard, for CBCH/SDCCH8 */</span><br><span> </span><br><span> /* Chapter 9.3.3 */</span><br><span> #define RSL_ACT_TYPE_INITIAL      0x00</span><br><span>diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c</span><br><span>index 1777479..ea58bfd 100644</span><br><span>--- a/src/gsm/rsl.c</span><br><span>+++ b/src/gsm/rsl.c</span><br><span>@@ -209,6 +209,13 @@</span><br><span>         } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_PDCH) {</span><br><span>             *type = RSL_CHAN_OSMO_PDCH;</span><br><span>          *subch = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+   } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4) {</span><br><span style="color: hsl(120, 100%, 40%);">+             *type = RSL_CHAN_OSMO_CBCH4;</span><br><span style="color: hsl(120, 100%, 40%);">+          *subch = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+   } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH8) {</span><br><span style="color: hsl(120, 100%, 40%);">+             *type = RSL_CHAN_OSMO_CBCH8;</span><br><span style="color: hsl(120, 100%, 40%);">+          *subch = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+   } else</span><br><span>       } else</span><br><span>               return -EINVAL;</span><br><span> </span><br><span>@@ -242,6 +249,10 @@</span><br><span>           snprintf(buf, buf_len, "PCH/AGCH on TS%d", ts);</span><br><span>    else if (cbits == 0x18)</span><br><span>              snprintf(buf, buf_len, "PDCH on TS%d", ts);</span><br><span style="color: hsl(120, 100%, 40%);">+ else if (cbits == 0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+               snprintf(buf, buf_len, "CBCH(SDCCH/4) on TS%d", ts);</span><br><span style="color: hsl(120, 100%, 40%);">+        else if (cbits == 0x1a)</span><br><span style="color: hsl(120, 100%, 40%);">+               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><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/14199">change 14199</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/14199"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 </div>
<div style="display:none"> Gerrit-Change-Number: 14199 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>