diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2014-08-08 11:21:04 +0200 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2014-08-08 14:15:24 +0200 |
commit | 418a4230e0539583803deb189c30cc68c341da4e (patch) | |
tree | dbe0ee7ffd7fa5b980e29aaa937e2d74c57ae503 /src/tbf.cpp | |
parent | cf706b07752958693eaa831992f883252742a668 (diff) |
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
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index e5b8863c..647710c2 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -268,7 +268,10 @@ void tbf_free(struct gprs_rlcmac_tbf *tbf) { /* 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 @@ static int setup_tbf(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_bts *bts, } /* 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 @@ struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, 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; } |