libgb: remove dependency of BSSGP to include sgsn/gmm internal structs
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index b26f263..c1327b6 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -36,6 +36,26 @@
 #include <openbsc/crc24.h>
 #include <openbsc/sgsn.h>
 
+/* Entry function from upper level (LLC), asking us to transmit a BSSGP PDU
+ * to a remote MS (identified by TLLI) at a BTS identified by its BVCI and NSEI */
+static int _bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx)
+{
+	struct bssgp_dl_ud_par dup;
+	const uint8_t qos_profile_default[3] = { 0x00, 0x00, 0x20 };
+
+	dup.tlli = NULL;
+	dup.imsi = mmctx->imsi;
+	dup.drx_parms = mmctx->drx_parms;
+	dup.ms_ra_cap.len = mmctx->ms_radio_access_capa.len;
+	dup.ms_ra_cap.v = mmctx->ms_radio_access_capa.buf;
+	dup.pdu_lifetime = 1000; /* centi-seconds */
+	memcpy(&dup.qos_profile, qos_profile_default,
+		sizeof(qos_profile_default));
+
+	return gprs_bssgp_tx_dl_ud(msg, 1000, &dup);
+}
+
+
 /* Section 8.9.9 LLC layer parameter default values */
 static const struct gprs_llc_params llc_default_params[] = {
 	[1] = {
@@ -308,7 +328,7 @@
 	/* Identifiers passed down: (BVCI, NSEI) */
 
 	/* Send BSSGP-DL-UNITDATA.req */
-	return gprs_bssgp_tx_dl_ud(msg, NULL);
+	return _bssgp_tx_dl_ud(msg, 1000, NULL);
 }
 
 /* Send XID response to LLE */
@@ -420,7 +440,7 @@
 	/* Identifiers passed down: (BVCI, NSEI) */
 
 	/* Send BSSGP-DL-UNITDATA.req */
-	return gprs_bssgp_tx_dl_ud(msg, mmctx);
+	return _bssgp_tx_dl_ud(msg, mmctx);
 }
 
 /* According to 6.4.1.6 / Figure 11 */