Use downlink BSSGP RA Cap IE

This commit is basically a revert of
f4bb42459ca4f3e18f9ee3d3a27389b85c7692e8, which disabled the code. That
commit claimed the SGSN may have providen inacurate or wrong data at the
time, but then it should be fixed in the SGSN.

Related: OS#1525, OS#3499
Change-Id: Ie36ae23203110018d4b5ae47591e0a64989e23a0
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 63c0a6e..0be3b3d 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -26,6 +26,7 @@
 #include <tbf.h>
 #include <gprs_coding_scheme.h>
 #include <pdch.h>
+#include <decoding.h>
 
 extern "C" {
 	#include <osmocom/gsm/protocol/gsm_23_003.h>
@@ -52,7 +53,6 @@
 static void bvc_timeout(void *_priv);
 static int gprs_ns_reconnect(struct gprs_nsvc *nsvc);
 
-#if 0
 static int parse_ra_cap(struct tlv_parsed *tp, MS_Radio_Access_capability_t *rac)
 {
 	bitvec *block;
@@ -78,7 +78,6 @@
 	bitvec_free(block);
 	return 0;
 }
-#endif
 
 static int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp)
 {
@@ -92,9 +91,7 @@
 	uint8_t ms_class = 0;
 	uint8_t egprs_ms_class = 0;
 	int rc;
-#if 0
 	MS_Radio_Access_capability_t rac;
-#endif
 
 	budh = (struct bssgp_ud_hdr *)msgb_bssgph(msg);
 	tlli = ntohl(budh->tlli);
@@ -128,7 +125,6 @@
 		}
 	}
 
-#if 0 /* Do not rely on this IE. TODO: make this configurable */
 	/* parse ms radio access capability */
 	if (parse_ra_cap(tp, &rac) >= 0) {
 		/* Get the EGPRS class from the RA capability */
@@ -138,7 +134,6 @@
 		LOGP(DBSSGP, LOGL_DEBUG, "Got downlink MS class %d/%d\n",
 			ms_class, egprs_ms_class);
 	}
-#endif
 
 	/* get lifetime */
 	uint16_t delay_csec = 0xffff;