si: Add a config option to disable SI2ter/SI2bis/SI5ter/SI5bis messages

The iPhone5 (US) appears to have some issues with the SIs generated,
or the nanoBTS is not sending them correctly.

Add a configurable hack to put all bands into the SI2/SI5 message.
It is enabled by the bts VTY command 'force-combined-si'.

This is a quick change without much reflection and watching for side
effects. I have verfied that a network with ARFCN 134 and neighbors
ARFCN 130 and 512 do not get generate the SI2ter and announce everything
inside the SI2.

This patch is conceptually based on 'si: Add a hack to disable
SI2ter/SI2bis/SI5ter/SI5bis messages' (692daaf2d2).

Ticket: OW#1062
Sponsored-by: On-Waves ehf
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index b27184b..3b85892 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -645,6 +645,9 @@
 	if (bts->excl_from_rf_lock)
 		vty_out(vty, "  rf-lock-exclude%s", VTY_NEWLINE);
 
+	vty_out(vty, "  %sforce-combined-si%s",
+		bts->force_combined_si ? "" : "no ", VTY_NEWLINE);
+
 	config_write_bts_model(vty, bts);
 }
 
@@ -2667,6 +2670,28 @@
 	return CMD_SUCCESS;
 }
 
+#define FORCE_COMB_SI_STR "Force the generation of a single SI (no ter/bis)\n"
+
+DEFUN(cfg_bts_force_comb_si,
+      cfg_bts_force_comb_si_cmd,
+      "force-combined-si",
+      FORCE_COMB_SI_STR)
+{
+	struct gsm_bts *bts = vty->index;
+	bts->force_combined_si = 1;
+	return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_no_force_comb_si,
+      cfg_bts_no_force_comb_si_cmd,
+      "no force-combined-si",
+      NO_STR FORCE_COMB_SI_STR)
+{
+	struct gsm_bts *bts = vty->index;
+	bts->force_combined_si = 0;
+	return CMD_SUCCESS;
+}
+
 static void _get_codec_from_arg(struct vty *vty, int argc, const char *argv[])
 {
 	struct gsm_bts *bts = vty->index;
@@ -3331,6 +3356,8 @@
 	install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd);
 	install_element(BTS_NODE, &cfg_bts_excl_rf_lock_cmd);
 	install_element(BTS_NODE, &cfg_bts_no_excl_rf_lock_cmd);
+	install_element(BTS_NODE, &cfg_bts_force_comb_si_cmd);
+	install_element(BTS_NODE, &cfg_bts_no_force_comb_si_cmd);
 	install_element(BTS_NODE, &cfg_bts_codec0_cmd);
 	install_element(BTS_NODE, &cfg_bts_codec1_cmd);
 	install_element(BTS_NODE, &cfg_bts_codec2_cmd);