From 418a4230e0539583803deb189c30cc68c341da4e Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Fri, 8 Aug 2014 11:21:04 +0200 Subject: 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 --- src/tbf.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/tbf.h') diff --git a/src/tbf.h b/src/tbf.h index 22504e7e..54781c0f 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -179,17 +179,9 @@ struct gprs_rlcmac_tbf { unsigned int num_fT_exp; /* number of consecutive fT expirations */ struct { - struct timeval dl_bw_tv; /* timestamp for dl bw calculation */ - uint32_t dl_bw_octets; /* number of octets since bw_tv */ - struct timeval rssi_tv; /* timestamp for rssi calculation */ int32_t rssi_sum; /* sum of rssi values */ int rssi_num; /* number of rssi values added since rssi_tv */ - - struct timeval dl_loss_tv; /* timestamp for loss calculation */ - uint16_t dl_loss_lost; /* sum of lost packets */ - uint16_t dl_loss_received; /* sum of received packets */ - } meas; uint8_t cs; /* current coding scheme */ @@ -319,6 +311,15 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { int32_t m_tx_counter; /* count all transmitted blocks */ uint8_t m_wait_confirm; /* wait for CCCH IMM.ASS cnf */ + struct { + struct timeval dl_bw_tv; /* timestamp for dl bw calculation */ + uint32_t dl_bw_octets; /* number of octets since bw_tv */ + + struct timeval dl_loss_tv; /* timestamp for loss calculation */ + uint16_t dl_loss_lost; /* sum of lost packets */ + uint16_t dl_loss_received; /* sum of received packets */ + } m_bw; + protected: struct msgb *create_new_bsn(const uint32_t fn, const uint8_t ts); struct msgb *create_dl_acked_block(const uint32_t fn, const uint8_t ts, -- cgit v1.2.3