<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25299">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm_08_58.h: Extend IPA Power Control Params IEs to pass C/I params<br><br>This commit adds new Osmocom specific IEs required to pass C/I related<br>Power Control Parameters osmo-bsc => osmo-bts to be used by the MS Power<br>Control Loop being implemented.<br><br>Related: SYS#4917<br>Change-Id: Iffef0611430ad6c90606149c398d80158633bbca<br>---<br>M include/osmocom/gsm/protocol/gsm_08_58.h<br>M src/gsm/rsl.c<br>2 files changed, 72 insertions(+), 2 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/25299/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 9f80816..141c95f 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>@@ -793,8 +793,14 @@</span><br><span>      RSL_IPAC_EIE_SDCCH_CTL_PARAM    = 0x1a,</span><br><span>      RSL_IPAC_EIE_AMR_CONV_THRESH    = 0x1b,</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   /* Osmocom specific extensions: */</span><br><span style="color: hsl(120, 100%, 40%);">+    RSL_IPAC_EIE_OSMO_MEAS_AVG_CFG  = 0xf0,</span><br><span style="color: hsl(120, 100%, 40%);">+       RSL_IPAC_EIE_OSMO_MS_PWR_CTL    = 0xf1,</span><br><span style="color: hsl(120, 100%, 40%);">+       RSL_IPAC_EIE_OSMO_PC_THRESH_COMP = 0xf2,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Value of TLV IE RSL_IPAC_EIE_MEAS_AVG_CFG */</span><br><span> struct ipac_preproc_ave_cfg {</span><br><span> #if OSMO_IS_LITTLE_ENDIAN</span><br><span>  uint8_t h_reqave:5,</span><br><span>@@ -811,7 +817,32 @@</span><br><span> #endif</span><br><span> }__attribute__ ((packed));</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/*! MS/BS Power Control Thresholds */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct osmo_preproc_ave_cfg_field {</span><br><span style="color: hsl(120, 100%, 40%);">+#if OSMO_IS_LITTLE_ENDIAN</span><br><span style="color: hsl(120, 100%, 40%);">+ uint8_t h_reqave:5,</span><br><span style="color: hsl(120, 100%, 40%);">+           ave_enabled:1,</span><br><span style="color: hsl(120, 100%, 40%);">+                reserved:2;</span><br><span style="color: hsl(120, 100%, 40%);">+   uint8_t h_reqt:5,</span><br><span style="color: hsl(120, 100%, 40%);">+             ave_method:3;</span><br><span style="color: hsl(120, 100%, 40%);">+#elif OSMO_IS_BIG_ENDIAN</span><br><span style="color: hsl(120, 100%, 40%);">+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */</span><br><span style="color: hsl(120, 100%, 40%);">+     uint8_t reserved:2, ave_enabled:1, h_reqave:5;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t ave_method:3, h_reqt:5;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+}__attribute__ ((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+/* Value of TLV IE RSL_IPAC_EIE_OSMO_MEAS_AVG_CFG: */</span><br><span style="color: hsl(120, 100%, 40%);">+struct osmo_preproc_ave_cfg {</span><br><span style="color: hsl(120, 100%, 40%);">+     struct osmo_preproc_ave_cfg_field ci_fr;</span><br><span style="color: hsl(120, 100%, 40%);">+      struct osmo_preproc_ave_cfg_field ci_hr;</span><br><span style="color: hsl(120, 100%, 40%);">+      struct osmo_preproc_ave_cfg_field ci_amr_fr;</span><br><span style="color: hsl(120, 100%, 40%);">+  struct osmo_preproc_ave_cfg_field ci_amr_hr;</span><br><span style="color: hsl(120, 100%, 40%);">+  struct osmo_preproc_ave_cfg_field ci_sdcch;</span><br><span style="color: hsl(120, 100%, 40%);">+   struct osmo_preproc_ave_cfg_field ci_gprs;</span><br><span style="color: hsl(120, 100%, 40%);">+    uint8_t params[0]; /* Contains params for each above, appended one after the other */</span><br><span style="color: hsl(120, 100%, 40%);">+}__attribute__ ((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! MS/BS Power Control Thresholds (RSL_IPAC_EIE_MS_PWR_CTL) */</span><br><span> struct ipac_preproc_pc_thresh {</span><br><span> #if OSMO_IS_LITTLE_ENDIAN</span><br><span>         uint8_t l_rxlev:6, reserved_l_rxlev:2;</span><br><span>@@ -826,6 +857,17 @@</span><br><span> #endif</span><br><span> }__attribute__ ((packed));</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! Osmocom extension for: MS/BS Power Control Thresholds (RSL_IPAC_EIE_OSMO_MS_PWR_CTL) */</span><br><span style="color: hsl(120, 100%, 40%);">+struct osmo_preproc_pc_thresh {</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Carrier-to-Interference (C/I), in dB: */</span><br><span style="color: hsl(120, 100%, 40%);">+   int8_t l_ci_fr; int8_t u_ci_fr; /* FR/EFR */</span><br><span style="color: hsl(120, 100%, 40%);">+  int8_t l_ci_hr; int8_t u_ci_hr; /* HR */</span><br><span style="color: hsl(120, 100%, 40%);">+      int8_t l_ci_amr_fr; int8_t u_ci_amr_fr; /* AMR FR */</span><br><span style="color: hsl(120, 100%, 40%);">+  int8_t l_ci_amr_hr; int8_t u_ci_amr_hr; /* AMR HR */</span><br><span style="color: hsl(120, 100%, 40%);">+  int8_t l_ci_sdcch; int8_t u_ci_sdcch; /* SDCCH */</span><br><span style="color: hsl(120, 100%, 40%);">+     int8_t l_ci_gprs; int8_t u_ci_gprs; /* GPRS */</span><br><span style="color: hsl(120, 100%, 40%);">+}__attribute__ ((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! Handover Thresholds */</span><br><span> struct ipac_preproc_ho_thresh {</span><br><span> #if OSMO_IS_LITTLE_ENDIAN</span><br><span>@@ -854,7 +896,7 @@</span><br><span> #endif</span><br><span> }__attribute__ ((packed));</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/*! PC Threshold Comparators */</span><br><span style="color: hsl(120, 100%, 40%);">+/*! PC Threshold Comparators (RSL_IPAC_EIE_PC_THRESH_COMP) */</span><br><span> struct ipac_preproc_pc_comp {</span><br><span> #if OSMO_IS_LITTLE_ENDIAN</span><br><span>     uint8_t p1:5, reserved_p1:3;</span><br><span>@@ -881,6 +923,30 @@</span><br><span> #endif</span><br><span> }__attribute__ ((packed));</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! Osmocom extension for: PC Threshold Comparators (RSL_IPAC_EIE_OSMO_PC_THRESH_COMP) */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ipac_preproc_pc_comp_field {</span><br><span style="color: hsl(120, 100%, 40%);">+       #if OSMO_IS_LITTLE_ENDIAN</span><br><span style="color: hsl(120, 100%, 40%);">+     uint8_t lower_p:5, reserved_lower_p:3;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t lower_n:5, reserved_lower_n:3;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t upper_p:5, reserved_upper_p:3;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t upper_n:5, reserved_upper_n:3;</span><br><span style="color: hsl(120, 100%, 40%);">+        #elif OSMO_IS_BIG_ENDIAN</span><br><span style="color: hsl(120, 100%, 40%);">+      uint8_t reserved_lower_p:3, lower_p:5;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t reserved_lower_n:3, lower_n:5;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t reserved_upper_p:3, upper_p:5;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t reserved_upper_n:3, upper_n:5;</span><br><span style="color: hsl(120, 100%, 40%);">+        #endif</span><br><span style="color: hsl(120, 100%, 40%);">+}__attribute__ ((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+struct osmo_preproc_pc_comp {</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Used for Carrier-to-Interference (C/I), in dB: */</span><br><span style="color: hsl(120, 100%, 40%);">+  struct ipac_preproc_pc_comp_field ci_fr;</span><br><span style="color: hsl(120, 100%, 40%);">+      struct ipac_preproc_pc_comp_field ci_hr;</span><br><span style="color: hsl(120, 100%, 40%);">+      struct ipac_preproc_pc_comp_field ci_amr_fr;</span><br><span style="color: hsl(120, 100%, 40%);">+  struct ipac_preproc_pc_comp_field ci_amr_hr;</span><br><span style="color: hsl(120, 100%, 40%);">+  struct ipac_preproc_pc_comp_field ci_sdcch;</span><br><span style="color: hsl(120, 100%, 40%);">+   struct ipac_preproc_pc_comp_field ci_gprs;</span><br><span style="color: hsl(120, 100%, 40%);">+}__attribute__ ((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! HO Threshold Comparators */</span><br><span> struct ipac_preproc_ho_comp {</span><br><span> #if OSMO_IS_LITTLE_ENDIAN</span><br><span>diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c</span><br><span>index a7fa81d..1d74de8 100644</span><br><span>--- a/src/gsm/rsl.c</span><br><span>+++ b/src/gsm/rsl.c</span><br><span>@@ -620,6 +620,10 @@</span><br><span>            [RSL_IPAC_EIE_3G_NCELL_LIST]    = { TLV_TYPE_TLV },</span><br><span>          [RSL_IPAC_EIE_SDCCH_CTL_PARAM]  = { TLV_TYPE_TV },</span><br><span>           [RSL_IPAC_EIE_AMR_CONV_THRESH]  = { TLV_TYPE_FIXED, 9 },</span><br><span style="color: hsl(120, 100%, 40%);">+              /* Osmocom extensions: */</span><br><span style="color: hsl(120, 100%, 40%);">+             [RSL_IPAC_EIE_OSMO_MEAS_AVG_CFG]= { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+           [RSL_IPAC_EIE_OSMO_MS_PWR_CTL]  = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+           [RSL_IPAC_EIE_OSMO_PC_THRESH_COMP]= { TLV_TYPE_TLV },</span><br><span>        },</span><br><span> };</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/25299">change 25299</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/+/25299"/><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: Iffef0611430ad6c90606149c398d80158633bbca </div>
<div style="display:none"> Gerrit-Change-Number: 25299 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>