From de7bb75ccfa57cfbe1af205bda5a7ae6e633bf46 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 23 Jan 2020 12:37:15 +0100 Subject: 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 --- src/gprs_bssgp_pcu.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 63c0a6e8..0be3b3dd 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -26,6 +26,7 @@ #include #include #include +#include extern "C" { #include @@ -52,7 +53,6 @@ extern bool spoof_mnc_3_digits; 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 @@ static int parse_ra_cap(struct tlv_parsed *tp, MS_Radio_Access_capability_t *rac 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 @@ static int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) 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 @@ static int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) } } -#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 @@ static int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) LOGP(DBSSGP, LOGL_DEBUG, "Got downlink MS class %d/%d\n", ms_class, egprs_ms_class); } -#endif /* get lifetime */ uint16_t delay_csec = 0xffff; -- cgit v1.2.3