<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/18620">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bts_features: introduce osmo_bts_unset_feature()<br><br>This function may be useful in a case when most of the BTS models<br>do support some feature, but just a couple models do not. It's<br>much easier to unset that feature 2/10 times than set it 8/10<br>times individually for each BTS model.<br><br>Change-Id: Ib5fa27287be7f1ecf2f82249b1e8c848465cbac0<br>Related: I431c8ab9478cbc40179903edc21043623d805da1<br>---<br>M TODO-RELEASE<br>M include/osmocom/gsm/bts_features.h<br>2 files changed, 7 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/20/18620/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/TODO-RELEASE b/TODO-RELEASE</span><br><span>index bc95b91..a6ed730 100644</span><br><span>--- a/TODO-RELEASE</span><br><span>+++ b/TODO-RELEASE</span><br><span>@@ -10,3 +10,4 @@</span><br><span> gsm              API/ABI change          l1sap.h, added struct members to ph_data_param and ph_tch_param</span><br><span> sim          API/ABI change          new osim_file_desc_find_aid()</span><br><span> sim            API/ABI change          all over the place</span><br><span style="color: hsl(120, 100%, 40%);">+gsm         new API                 new osmo_bts_unset_feature()</span><br><span>diff --git a/include/osmocom/gsm/bts_features.h b/include/osmocom/gsm/bts_features.h</span><br><span>index 6ab8f62..27a3983 100644</span><br><span>--- a/include/osmocom/gsm/bts_features.h</span><br><span>+++ b/include/osmocom/gsm/bts_features.h</span><br><span>@@ -37,6 +37,12 @@</span><br><span>       return bitvec_set_bit_pos(features, feature, 1);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static inline int osmo_bts_unset_feature(struct bitvec *features, enum osmo_bts_features feature)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);</span><br><span style="color: hsl(120, 100%, 40%);">+     return bitvec_set_bit_pos(features, feature, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static inline bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature)</span><br><span> {</span><br><span>         OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/18620">change 18620</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/+/18620"/><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: Ib5fa27287be7f1ecf2f82249b1e8c848465cbac0 </div>
<div style="display:none"> Gerrit-Change-Number: 18620 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>