TBF: update MCS counters
* use enum CodingScheme directly instead of converting it to class and back * drop useless mode check * log errorneous update attempt Change-Id: I763136c2f356d63aa3d28d09c57fd5faf5336258
This commit is contained in:
parent
e742cc0997
commit
fb59a93425
|
@ -648,7 +648,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
|
|||
int abort();
|
||||
uint16_t window_size() const;
|
||||
void set_window_size();
|
||||
void update_coding_scheme_counter_dl(const GprsCodingScheme cs);
|
||||
void update_coding_scheme_counter_dl(enum CodingScheme cs);
|
||||
|
||||
/* TODO: add the gettimeofday as parameter */
|
||||
struct msgb *llc_dequeue(bssgp_bvc_ctx *bctx);
|
||||
|
@ -751,7 +751,7 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
|
|||
|
||||
uint16_t window_size() const;
|
||||
void set_window_size();
|
||||
void update_coding_scheme_counter_ul(const GprsCodingScheme cs);
|
||||
void update_coding_scheme_counter_ul(enum CodingScheme cs);
|
||||
|
||||
/* Please note that all variables here will be reset when changing
|
||||
* from WAIT RELEASE back to FLOW state (re-use of TBF).
|
||||
|
|
|
@ -1364,13 +1364,9 @@ void gprs_rlcmac_dl_tbf::set_window_size()
|
|||
m_window.set_ws(ws);
|
||||
}
|
||||
|
||||
void gprs_rlcmac_dl_tbf::update_coding_scheme_counter_dl(const GprsCodingScheme cs)
|
||||
void gprs_rlcmac_dl_tbf::update_coding_scheme_counter_dl(enum CodingScheme cs)
|
||||
{
|
||||
uint8_t coding_scheme = 0;
|
||||
|
||||
coding_scheme = CodingScheme(cs);
|
||||
if (mcs_is_gprs(cs)) {
|
||||
switch (coding_scheme) {
|
||||
switch (cs) {
|
||||
case CS1:
|
||||
bts->gprs_dl_cs1();
|
||||
rate_ctr_inc(&m_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS1]);
|
||||
|
@ -1387,9 +1383,6 @@ void gprs_rlcmac_dl_tbf::update_coding_scheme_counter_dl(const GprsCodingScheme
|
|||
bts->gprs_dl_cs4();
|
||||
rate_ctr_inc(&m_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS4]);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (coding_scheme) {
|
||||
case MCS1:
|
||||
bts->egprs_dl_mcs1();
|
||||
rate_ctr_inc(&m_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS1]);
|
||||
|
@ -1426,6 +1419,8 @@ void gprs_rlcmac_dl_tbf::update_coding_scheme_counter_dl(const GprsCodingScheme
|
|||
bts->egprs_dl_mcs9();
|
||||
rate_ctr_inc(&m_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS9]);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOGPTBFDL(this, LOGL_ERROR, "attempting to update rate counters for unsupported (M)CS %s\n",
|
||||
mcs_name(cs));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -525,13 +525,9 @@ egprs_rlc_ul_reseg_bsn_state gprs_rlcmac_ul_tbf::handle_egprs_ul_spb(
|
|||
return assemble_status;
|
||||
}
|
||||
|
||||
void gprs_rlcmac_ul_tbf::update_coding_scheme_counter_ul(const GprsCodingScheme cs)
|
||||
void gprs_rlcmac_ul_tbf::update_coding_scheme_counter_ul(enum CodingScheme cs)
|
||||
{
|
||||
uint8_t coding_scheme = 0;
|
||||
|
||||
coding_scheme = CodingScheme(cs);
|
||||
if (mcs_is_gprs(cs)) {
|
||||
switch (coding_scheme) {
|
||||
switch (cs) {
|
||||
case CS1:
|
||||
bts->gprs_ul_cs1();
|
||||
rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS1]);
|
||||
|
@ -548,9 +544,6 @@ void gprs_rlcmac_ul_tbf::update_coding_scheme_counter_ul(const GprsCodingScheme
|
|||
bts->gprs_ul_cs4();
|
||||
rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS4]);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (coding_scheme) {
|
||||
case MCS1:
|
||||
bts->egprs_ul_mcs1();
|
||||
rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS1]);
|
||||
|
@ -587,7 +580,9 @@ void gprs_rlcmac_ul_tbf::update_coding_scheme_counter_ul(const GprsCodingScheme
|
|||
bts->egprs_ul_mcs9();
|
||||
rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS9]);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOGPTBFUL(this, LOGL_ERROR, "attempting to update rate counters for unsupported (M)CS %s\n",
|
||||
mcs_name(cs));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue