bts_features: introduce osmo_bts_unset_feature()

This function may be useful in a case when most of the BTS models
do support some feature, but just a couple models do not. It's
much easier to unset that feature 2/10 times than set it 8/10
times individually for each BTS model.

Change-Id: Ib5fa27287be7f1ecf2f82249b1e8c848465cbac0
Related: I431c8ab9478cbc40179903edc21043623d805da1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index bc95b91..a6ed730 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -10,3 +10,4 @@
 gsm		API/ABI change		l1sap.h, added struct members to ph_data_param and ph_tch_param
 sim		API/ABI change		new osim_file_desc_find_aid()
 sim		API/ABI change		all over the place
+gsm		new API			new osmo_bts_unset_feature()
diff --git a/include/osmocom/gsm/bts_features.h b/include/osmocom/gsm/bts_features.h
index 6ab8f62..27a3983 100644
--- a/include/osmocom/gsm/bts_features.h
+++ b/include/osmocom/gsm/bts_features.h
@@ -37,6 +37,12 @@
 	return bitvec_set_bit_pos(features, feature, 1);
 }
 
+static inline int osmo_bts_unset_feature(struct bitvec *features, enum osmo_bts_features feature)
+{
+	OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);
+	return bitvec_set_bit_pos(features, feature, 0);
+}
+
 static inline bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature)
 {
 	OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);