[GPRS] Add RSL function for ip.access PDCH activation

If we have a dynamic TCH/F / PDCH channel configuration, then
we can either ACTIVATE CHANNEL it for a TCH/F, or we need to send
this vendor-specific PDCH ACTIVATE command to use it as a PDCH.

As opposed to a fixed configuration, this allows an intelligent
BSC channel allocator to use otherwise idle channels as PDCH
as long as no more TCH's are needed.
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index 8c5547d..1ffea3f 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -539,6 +539,7 @@
 int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip,
 		      u_int16_t port, u_int16_t conn_id,
 		      u_int8_t rtp_payload2);
+int rsl_ipacc_pdch_activate(struct gsm_lchan *lchan);
 
 int abis_rsl_rcvmsg(struct msgb *msg);
 
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 1a42b75..6b328bb 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -1020,6 +1020,18 @@
 	case RSL_MT_MODE_MODIFY_NACK:
 		DEBUGPC(DRSL, "CHANNEL MODE MODIFY NACK\n");
 		break;
+	case RSL_MT_IPAC_PDCH_ACT_ACK:
+		DEBUGPC(DRSL, "IPAC PDCH ACT ACK\n");
+		break;
+	case RSL_MT_IPAC_PDCH_ACT_NACK:
+		DEBUGPC(DRSL, "IPAC PDCH ACT NACK\n");
+		break;
+	case RSL_MT_IPAC_PDCH_DEACT_ACK:
+		DEBUGPC(DRSL, "IPAC PDCH DEACT ACK\n");
+		break;
+	case RSL_MT_IPAC_PDCH_DEACT_NACK:
+		DEBUGPC(DRSL, "IPAC PDCH DEACT NACK\n");
+		break;
 	case RSL_MT_PHY_CONTEXT_CONF:
 	case RSL_MT_PREPROC_MEAS_RES:
 	case RSL_MT_TALKER_DET:
@@ -1418,6 +1430,24 @@
 	return abis_rsl_sendmsg(msg);
 }
 
+int rsl_ipacc_pdch_activate(struct gsm_lchan *lchan)
+{
+	struct msgb *msg = rsl_msgb_alloc();
+	struct abis_rsl_dchan_hdr *dh;
+
+	dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
+	init_dchan_hdr(dh, RSL_MT_IPAC_PDCH_ACT);
+	dh->c.msg_discr = ABIS_RSL_MDISC_DED_CHAN;
+	dh->chan_nr = lchan2chan_nr(lchan);
+
+	DEBUGP(DRSL, "channel=%s chan_nr=0x%02x IPAC_PDCH_ACT\n",
+		gsm_ts_name(lchan->ts), dh->chan_nr);
+
+	msg->trx = lchan->ts->trx;
+
+	return abis_rsl_sendmsg(msg);
+}
+
 static int abis_rsl_rx_ipacc_bindack(struct msgb *msg)
 {
 	struct abis_rsl_dchan_hdr *dh = msgb_l2(msg);