<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/17244">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">simtrace2_api: Add osmo_st2_cardem_request_config()<br><br>In Change-Id I7cdd3f9171dbed45de0089defe29d2b59044bd84 we introduced<br>firmware support for SIMTRACE_MSGT_BD_CEMU_CONFIG.  The respective<br>host part was so far only implemented in osmo-remsim-client-st2,<br>but not in libosmo-simtrace2.  Let's fix that.<br><br>Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b<br>---<br>M host/include/osmocom/simtrace2/simtrace2_api.h<br>M host/lib/simtrace2_api.c<br>2 files changed, 16 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/44/17244/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h</span><br><span>index d31fb85..012b96c 100644</span><br><span>--- a/host/include/osmocom/simtrace2/simtrace2_api.h</span><br><span>+++ b/host/include/osmocom/simtrace2/simtrace2_api.h</span><br><span>@@ -48,6 +48,7 @@</span><br><span> int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw);</span><br><span> int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr,</span><br><span>                                  unsigned int atr_len);</span><br><span style="color: hsl(120, 100%, 40%);">+int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features);</span><br><span> </span><br><span> </span><br><span> int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms);</span><br><span>diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c</span><br><span>index b2b2829..b3e4e38 100644</span><br><span>--- a/host/lib/simtrace2_api.c</span><br><span>+++ b/host/lib/simtrace2_api.c</span><br><span>@@ -204,6 +204,21 @@</span><br><span>         return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       struct msgb *msg = st_msgb_alloc();</span><br><span style="color: hsl(120, 100%, 40%);">+   struct cardemu_usb_msg_config *cfg;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ cfg = (struct cardemu_usb_msg_config *) msgb_put(msg, sizeof(*cfg));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        printf("<= %s(%08x)\n", __func__, features);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   memset(cfg, 0, sizeof(*cfg));</span><br><span style="color: hsl(120, 100%, 40%);">+ cfg->features = features;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_BD_CEMU_CONFIG);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /***********************************************************************</span><br><span>  * Modem Control protocol</span><br><span>  ***********************************************************************/</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/17244">change 17244</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/simtrace2/+/17244"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b </div>
<div style="display:none"> Gerrit-Change-Number: 17244 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>