Unify BTS into a C usable structure

Previous work on BTS class started to get stuff out of the C++ struct
 into a C struct (BTS -> struct gprs_glcmac_bts) so that some parts of
it were accessible from C code. Doing so, however, ended up being messy
too, since all code needs to be switching from one object to another,
which actually refer to the same logical component.

Let's instead rejoin the structures and make sure the struct is
accessible and usable from both C and C++ code by rewriting all methods
to be C compatible and converting 3 allocated suboject as pointers.
This way BTS can internally still use those C++ objects while providing
a clean APi to both C and C++ code.

Change-Id: I7d12c896c5ded659ca9d3bff4cf3a3fc857db9dd
diff --git a/src/rlc.cpp b/src/rlc.cpp
index 8f56a8e..a2cc52c 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -127,7 +127,7 @@
 	return (ssn - 1 - bitnum);
 }
 
-void gprs_rlc_dl_window::update(BTS *bts, const struct bitvec *rbb,
+void gprs_rlc_dl_window::update(struct gprs_rlcmac_bts *bts, const struct bitvec *rbb,
 			uint16_t first_bsn, uint16_t *lost,
 			uint16_t *received)
 {
@@ -154,13 +154,13 @@
 		} else {
 			LOGP(DRLCMACDL, LOGL_DEBUG, "- got NACK for BSN=%d\n", bsn);
 			m_v_b.mark_nacked(bsn);
-			bts->do_rate_ctr_inc(CTR_RLC_NACKED);
+			bts_do_rate_ctr_inc(bts, CTR_RLC_NACKED);
 			*lost += 1;
 		}
 	}
 }
 
-void gprs_rlc_dl_window::update(BTS *bts, char *show_rbb, uint16_t ssn,
+void gprs_rlc_dl_window::update(struct gprs_rlcmac_bts *bts, char *show_rbb, uint16_t ssn,
 			uint16_t *lost, uint16_t *received)
 {
 	/* SSN - 1 is in range V(A)..V(S)-1 */
@@ -178,7 +178,7 @@
 		} else {
 			LOGP(DRLCMACDL, LOGL_DEBUG, "- got NACK for BSN=%d\n", bsn);
 			m_v_b.mark_nacked(bsn);
-			bts->do_rate_ctr_inc(CTR_RLC_NACKED);
+			bts_do_rate_ctr_inc(bts, CTR_RLC_NACKED);
 			*lost += 1;
 		}
 	}