aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gprs_bssgp_pcu.cpp7
-rw-r--r--src/gprs_rlcmac.h3
-rw-r--r--src/gprs_rlcmac_ts_alloc.cpp21
3 files changed, 29 insertions, 2 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index dcb1b5b8..02395a8c 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -620,13 +620,16 @@ int gprs_bssgp_tx_fc_bvc(void)
if (ms_leak_rate == 0) {
int ms_num_pdch;
+ int max_pdch = gprs_alloc_max_dl_slots_per_ms(bts);
if (num_pdch < 0)
num_pdch = count_pdch(bts);
ms_num_pdch = num_pdch;
- if (ms_num_pdch > FC_MS_MAX_RX_SLOTS)
- ms_num_pdch = FC_MS_MAX_RX_SLOTS;
+ if (max_pdch > FC_MS_MAX_RX_SLOTS)
+ max_pdch = FC_MS_MAX_RX_SLOTS;
+ 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);
diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h
index 3c1f1a05..f193dfa4 100644
--- a/src/gprs_rlcmac.h
+++ b/src/gprs_rlcmac.h
@@ -93,6 +93,9 @@ int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts,
uint8_t trx, uint8_t ts, uint16_t arfcn,
uint32_t fn, uint8_t block_nr);
+int gprs_alloc_max_dl_slots_per_ms(struct gprs_rlcmac_bts *bts,
+ uint8_t ms_class = 0);
+
extern "C" {
#endif
int alloc_algorithm_a(struct gprs_rlcmac_bts *bts,
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 3714b30c..0daeaf5c 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -1077,3 +1077,24 @@ int alloc_algorithm_dynamic(struct gprs_rlcmac_bts *bts,
rc = alloc_algorithm_a(bts, ms_, tbf_, cust, single, use_trx);
return rc;
}
+
+int gprs_alloc_max_dl_slots_per_ms(struct gprs_rlcmac_bts *bts, uint8_t ms_class)
+{
+ int rx;
+
+ if (ms_class >= ARRAY_SIZE(gprs_ms_multislot_class))
+ ms_class = 0;
+
+ rx = gprs_ms_multislot_class[ms_class].rx;
+
+ if (rx == MS_NA)
+ rx = 4;
+
+ if (bts->alloc_algorithm == alloc_algorithm_a)
+ return 1;
+
+ if (bts->multislot_disabled)
+ return 1;
+
+ return rx;
+}