tbf, gprs_rlcmac_meas: Move the DL bandwidth variables to the DL TBF

The bandwidth calculation as well as loss report is only done for DL TBF
so move everything related to that in there.

Ticket: SYS#389
Sponsored by: On-Waves ehf
diff --git a/src/tbf.cpp b/src/tbf.cpp
index e5b8863..647710c 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -268,7 +268,10 @@
 {
 	/* Give final measurement report */
 	gprs_rlcmac_rssi_rep(tbf);
-	gprs_rlcmac_lost_rep(tbf);
+	if (tbf->direction == GPRS_RLCMAC_DL_TBF) {
+		gprs_rlcmac_dl_tbf *dl_tbf = static_cast<gprs_rlcmac_dl_tbf *>(tbf);
+		gprs_rlcmac_lost_rep(dl_tbf);
+	}
 
 	LOGP(DRLCMAC, LOGL_INFO, "%s free\n", tbf_name(tbf));
 	if (tbf->ul_ass_state != GPRS_RLCMAC_UL_ASS_NONE)
@@ -519,9 +522,7 @@
 	}
 
 	/* set timestamp */
-	gettimeofday(&tbf->meas.dl_bw_tv, NULL);
 	gettimeofday(&tbf->meas.rssi_tv, NULL);
-	gettimeofday(&tbf->meas.dl_loss_tv, NULL);
 
 	tbf->m_llc.init();
 	return 0;
@@ -591,6 +592,9 @@
 	llist_add(&tbf->list.list, &bts->dl_tbfs);
 	tbf->bts->tbf_dl_created();
 
+	gettimeofday(&tbf->m_bw.dl_bw_tv, NULL);
+	gettimeofday(&tbf->m_bw.dl_loss_tv, NULL);
+
 	return tbf;
 }