aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_bssgp_pcu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gprs_bssgp_pcu.cpp')
-rw-r--r--src/gprs_bssgp_pcu.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 02395a8c..7601b218 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -595,6 +595,7 @@ int gprs_bssgp_tx_fc_bvc(void)
uint32_t ms_leak_rate; /* oct/s */
uint32_t avg_delay_ms;
int num_pdch = -1;
+ int max_cs_dl;
if (!the_pcu.bctx) {
LOGP(DBSSGP, LOGL_ERROR, "No bctx\n");
@@ -602,6 +603,22 @@ int gprs_bssgp_tx_fc_bvc(void)
}
bts = bts_main_data();
+ if (bts->cs_adj_enabled) {
+ max_cs_dl = bts->max_cs_dl;
+ if (!max_cs_dl) {
+ if (bts->cs4)
+ max_cs_dl = 4;
+ else if (bts->cs3)
+ max_cs_dl = 3;
+ else if (bts->cs2)
+ max_cs_dl = 2;
+ else
+ max_cs_dl = 1;
+ }
+ } else {
+ max_cs_dl = bts->initial_cs_dl;
+ }
+
bucket_size = bts->fc_bvc_bucket_size;
leak_rate = bts->fc_bvc_leak_rate;
ms_bucket_size = bts->fc_ms_bucket_size;
@@ -611,11 +628,11 @@ int gprs_bssgp_tx_fc_bvc(void)
if (num_pdch < 0)
num_pdch = count_pdch(bts);
- leak_rate = gprs_bssgp_max_leak_rate(bts->initial_cs_dl, num_pdch);
+ leak_rate = gprs_bssgp_max_leak_rate(max_cs_dl, num_pdch);
LOGP(DBSSGP, LOGL_DEBUG,
"Computed BVC leak rate = %d, num_pdch = %d, cs = %d\n",
- leak_rate, num_pdch, bts->initial_cs_dl);
+ leak_rate, num_pdch, max_cs_dl);
};
if (ms_leak_rate == 0) {
@@ -631,15 +648,14 @@ int gprs_bssgp_tx_fc_bvc(void)
if (ms_num_pdch > max_pdch)
ms_num_pdch = max_pdch;
- ms_leak_rate = gprs_bssgp_max_leak_rate(bts->initial_cs_dl,
- ms_num_pdch);
+ ms_leak_rate = gprs_bssgp_max_leak_rate(max_cs_dl, ms_num_pdch);
/* TODO: To properly support multiple TRX, the per MS leak rate
* should be derived from the max number of PDCH TS per TRX.
*/
LOGP(DBSSGP, LOGL_DEBUG,
"Computed MS default leak rate = %d, ms_num_pdch = %d, cs = %d\n",
- ms_leak_rate, ms_num_pdch, bts->initial_cs_dl);
+ ms_leak_rate, ms_num_pdch, max_cs_dl);
};
/* TODO: Force leak_rate to 0 on buffer bloat */