diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-04 19:04:30 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-08 09:41:07 +0200 |
commit | b33e675e5a9f80be81ffef87ba3a9ed05d6945c5 (patch) | |
tree | 901f5466605c64b68b1333f44b3bf5c5eb7be7e9 /src/gprs_ms.cpp | |
parent | 8158ea7288f57d7bc66d8ccd1c278999fd656076 (diff) |
ms: Add support for maximum CS values
Currently the CS values can be increased to CS4 even when the "cs"
configuration command has been used with a lower value. The "cs"
command just sets the initial coding scheme, so other means are
needed to limit the selection. One approach is to use the CS flags
passed in SI, but these are currently ignored.
To make it possible to limit the CS selection by configuring the PCU,
this commit adds the following VTY commands to config-pcu:
- cs max <1-4> Limit DL and UL CS to the given value
- cs max <1-4> <1-4> Limit DL and UL CS separately (DL first)
- no cs max Don't limit
Ticket: #1674
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_ms.cpp')
-rw-r--r-- | src/gprs_ms.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index c8d598ee..adb6ff52 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -366,6 +366,7 @@ void GprsMs::update_error_rate(gprs_rlcmac_tbf *tbf, int error_rate) { struct gprs_rlcmac_bts *bts_data; int64_t now; + uint8_t max_cs_ul = 4, max_cs_dl = 4; OSMO_ASSERT(m_bts != NULL); bts_data = m_bts->bts_data(); @@ -375,6 +376,12 @@ void GprsMs::update_error_rate(gprs_rlcmac_tbf *tbf, int error_rate) now = now_msec(); + if (bts_data->max_cs_ul) + max_cs_ul = bts_data->max_cs_ul; + + if (bts_data->max_cs_dl) + max_cs_dl = bts_data->max_cs_dl; + /* TODO: Support different CS values for UL and DL */ if (error_rate > bts_data->cs_adj_upper_limit) { @@ -388,10 +395,12 @@ void GprsMs::update_error_rate(gprs_rlcmac_tbf *tbf, int error_rate) m_last_cs_not_low = now; } } else if (error_rate < bts_data->cs_adj_lower_limit) { - if (m_current_cs_dl < 4) { + if (m_current_cs_dl < max_cs_dl) { if (now - m_last_cs_not_low > 1000) { m_current_cs_dl += 1; - m_current_cs_ul = m_current_cs_dl; + if (m_current_cs_dl <= max_cs_ul) + m_current_cs_ul = m_current_cs_dl; + LOGP(DRLCMACDL, LOGL_INFO, "MS (IMSI %s): Low error rate %d%%, " "increasing CS level to %d\n", |