Allow VTY-based configuration of T3105

This timer will only be forwarded to BS11 and Ericsson Abis so far,
not to Nokia and ip.access BTS yet.
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index c547cd7..9e808fc 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -215,6 +215,7 @@
 };
 
 #define GSM_T3101_DEFAULT 10
+#define GSM_T3105_DEFAULT 40
 #define GSM_T3113_DEFAULT 60
 
 struct gsm_network {
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 2ea3678..139cc04 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -1186,7 +1186,7 @@
 		msgb_tv_put(msg, OM2K_DEI_CCCH_OPTIONS, 0x01);
 		break;
 	case GSM_PCHAN_CCCH_SDCCH4:
-		msgb_tv_put(msg, OM2K_DEI_T3105, 0x04);
+		msgb_tv_put(msg, OM2K_DEI_T3105, ts->trx->bts->network->T3105 / 10);
 		msgb_tv_put(msg, OM2K_DEI_NY1, 35);
 		msgb_tv_put(msg, OM2K_DEI_BA_PA_MFRMS, 0x06);
 		msgb_tv_put(msg, OM2K_DEI_CBCH_INDICATOR, 0);
@@ -1200,7 +1200,7 @@
 				  sizeof(icm_bound_params), icm_bound_params);
 		break;
 	case GSM_PCHAN_SDCCH8_SACCH8C:
-		msgb_tv_put(msg, OM2K_DEI_T3105, 0x04);
+		msgb_tv_put(msg, OM2K_DEI_T3105, ts->trx->bts->network->T3105 / 10);
 		msgb_tv_put(msg, OM2K_DEI_NY1, 35);
 		msgb_tv_put(msg, OM2K_DEI_CBCH_INDICATOR, 0);
 		msgb_tv_put(msg, OM2K_DEI_TSC, ts->trx->bts->tsc);
@@ -1210,7 +1210,7 @@
 				  sizeof(icm_bound_params), icm_bound_params);
 		break;
 	default:
-		msgb_tv_put(msg, OM2K_DEI_T3105, 0x04);
+		msgb_tv_put(msg, OM2K_DEI_T3105, ts->trx->bts->network->T3105 / 10);
 		msgb_tv_put(msg, OM2K_DEI_NY1, 35);
 		msgb_tv_put(msg, OM2K_DEI_TSC, ts->trx->bts->tsc);
 		/* Disable RF RESOURCE INDICATION on idle channels */
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index e6d2327..cacc6b0 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -1355,7 +1355,7 @@
 
 DECLARE_TIMER(3101, "Set the timeout value for IMMEDIATE ASSIGNMENT.\n")
 DECLARE_TIMER(3103, "Set the timeout value for HANDOVER.\n")
-DECLARE_TIMER(3105, "Currently not used.\n")
+DECLARE_TIMER(3105, "Set the timer for repetition of PHYSICAL INFORMATION.\n")
 DECLARE_TIMER(3107, "Currently not used.\n")
 DECLARE_TIMER(3109, "Currently not used.\n")
 DECLARE_TIMER(3111, "Set the RSL timeout to wait before releasing the RF Channel.\n")
diff --git a/openbsc/src/libbsc/bts_nokia_site.c b/openbsc/src/libbsc/bts_nokia_site.c
index cb1a9d5..b2749b5 100644
--- a/openbsc/src/libbsc/bts_nokia_site.c
+++ b/openbsc/src/libbsc/bts_nokia_site.c
@@ -541,13 +541,13 @@
 	/* ID = 0x02 (T3105_F) */
 	/* length = 2 */
 	/* [16] */
-	0x00, 0x28,
+	0x00, 0x28, /* FIXME: use net->T3105 */
 
 	0x50, 0x02,
 	/* ID = 0x10 (T3105_D) */
 	/* length = 2 */
 	/* [20] */
-	0x00, 0x28,
+	0x00, 0x28, /* FIXME: use net->T3105 */
 
 	0x43, 0x05,
 	/* ID = 0x03 (Interference band limits) */
diff --git a/openbsc/src/libbsc/bts_siemens_bs11.c b/openbsc/src/libbsc/bts_siemens_bs11.c
index 2514d99..101e996 100644
--- a/openbsc/src/libbsc/bts_siemens_bs11.c
+++ b/openbsc/src/libbsc/bts_siemens_bs11.c
@@ -357,6 +357,9 @@
 	uint8_t arfcn_low = bts->c0->arfcn & 0xff;
 	uint8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f;
 
+	/* T3105 attribute in units of 10ms */
+	bs11_attr_bts[2] = bts->network->T3105 / 10;
+
 	/* patch ARFCN into BTS Attributes */
 	bs11_attr_bts[69] &= 0xf0;
 	bs11_attr_bts[69] |= arfcn_high;
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index 6eb39b0..a235c9d 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -94,6 +94,7 @@
 	net->num_bts = 0;
 	net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED;
 	net->T3101 = GSM_T3101_DEFAULT;
+	net->T3105 = GSM_T3105_DEFAULT;
 	net->T3113 = GSM_T3113_DEFAULT;
 	/* FIXME: initialize all other timers! */