nokia: Allow to set the reset time for the nokia bts
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 588be26..af30f39 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -605,6 +605,7 @@
 		vty_out(vty, "  nokia_site skip-reset %d%s", bts->nokia.skip_reset, VTY_NEWLINE);
 		vty_out(vty, "  nokia_site no-local-rel-conf %d%s",
 			bts->nokia.no_loc_rel_cnf, VTY_NEWLINE);
+		vty_out(vty, "  nokia_site bts-reset-timer %d%s", bts->nokia.bts_reset_timer_cnf, VTY_NEWLINE);
 		/* fall through: Nokia requires "oml e1" parameters also */
 	default:
 		config_write_e1_link(vty, &bts->oml_e1_link, "  oml ");
@@ -1837,6 +1838,25 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(cfg_bts_nokia_site_bts_reset_timer_cnf,
+      cfg_bts_nokia_site_bts_reset_timer_cnf_cmd,
+      "nokia_site bts-reset-timer  <15-100>",
+      NOKIA_STR
+      "The amount of time (in sec.) between BTS_RESET is sent,\n"
+      "and the BTS is being bootstrapped.\n")
+{
+	struct gsm_bts *bts = vty->index;
+
+	if (!is_nokia_bts(bts)) {
+		vty_out(vty, "%% BTS is not of Nokia *Site type%s",
+			VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	bts->nokia.bts_reset_timer_cnf = atoi(argv[0]);
+
+	return CMD_SUCCESS;
+}
 #define OML_STR	"Organization & Maintenance Link\n"
 #define IPA_STR "A-bis/IP Specific Options\n"
 
@@ -3420,6 +3440,7 @@
 	install_element(BTS_NODE, &cfg_bts_no_timezone_cmd);
 	install_element(BTS_NODE, &cfg_bts_nokia_site_skip_reset_cmd);
 	install_element(BTS_NODE, &cfg_bts_nokia_site_no_loc_rel_cnf_cmd);
+	install_element(BTS_NODE, &cfg_bts_nokia_site_bts_reset_timer_cnf_cmd);
 	install_element(BTS_NODE, &cfg_bts_stream_id_cmd);
 	install_element(BTS_NODE, &cfg_bts_oml_e1_cmd);
 	install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd);
diff --git a/openbsc/src/libbsc/bts_nokia_site.c b/openbsc/src/libbsc/bts_nokia_site.c
index 376a048..32a885c 100644
--- a/openbsc/src/libbsc/bts_nokia_site.c
+++ b/openbsc/src/libbsc/bts_nokia_site.c
@@ -42,8 +42,6 @@
 
 /* TODO: put in a separate file ? */
 
-#define RESET_INTERVAL      15, 0	/* 15 seconds */
-
 extern int abis_nm_sendmsg(struct gsm_bts *bts, struct msgb *msg);
 /* was static in system_information.c */
 extern int generate_cell_chan_list(uint8_t * chan_list, struct gsm_bts *bts);
@@ -1147,7 +1145,7 @@
 {
 	uint8_t *data = reset;
 	int len_data = sizeof(reset);
-
+	LOGP(DLINP, LOGL_INFO, "Nokia BTS reset timer: %d\n", bts->nokia.bts_reset_timer_cnf);
 	return abis_nm_send(bts, NOKIA_MSG_RESET_REQ, ref, data, len_data);
 }
 
@@ -1564,7 +1562,7 @@
 
 			bts->nokia.reset_timer.cb = &reset_timer_cb;
 			bts->nokia.reset_timer.data = bts;
-			osmo_timer_schedule(&bts->nokia.reset_timer, RESET_INTERVAL);
+			osmo_timer_schedule(&bts->nokia.reset_timer, bts->nokia.bts_reset_timer_cnf, 0);
 
 			struct gsm_e1_subslot *e1_link = &bts->oml_e1_link;
 			struct e1inp_line *line;