aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-19 10:44:42 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:35 +0100
commit9b3d7e015968bdb0a9f1a3642c1047d875d7049f (patch)
treea1aee174f4ab78a335b42c3477f4b08825ae1cf1 /src
parentf9940ca8d7d93e143da375c0775e852bd20e4c52 (diff)
edge: Disable GPRS/EGPRS mixed mode
Currently the plain 'egprs' command enables EGPRS but doesn't prevent phones from being served in GPRS mode if they do not support EGPRS. This involves complex frame allocation implementations in dynamic mode, especially if 8PSK is being used. This is due to the inability of non-EGPRS phone to decode 8PSK USF and ES/P altogether. Since polling has a higher priority than USF, collisions will have to be prevented by the PCU by never using an GPRS USF if it refers to a FN that is already being used for polling. This commit just disables mixed usage by ignoring GPRS-only request if EGPRS is enabled. The following VTY command (config-pcu node) is changed: egprs -> egprs only Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/bts.cpp1
-rw-r--r--src/bts.h3
-rw-r--r--src/pcu_vty.c8
-rw-r--r--src/tbf.cpp14
4 files changed, 21 insertions, 5 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index eb079186..1c10596c 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -57,6 +57,7 @@ static const struct rate_ctr_desc bts_ctr_description[] = {
{ "tbf.reused", "TBF Reused "},
{ "tbf.alloc.algo-a", "TBF Alloc Algo A "},
{ "tbf.alloc.algo-b", "TBF Alloc Algo B "},
+ { "tbf.failed.egprs-only", "TBF Failed EGPRS-only"},
{ "rlc.sent", "RLC Sent "},
{ "rlc.resent", "RLC Resent "},
{ "rlc.restarted", "RLC Restarted "},
diff --git a/src/bts.h b/src/bts.h
index 52154cb2..e467c1ed 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -215,6 +215,7 @@ public:
CTR_TBF_REUSED,
CTR_TBF_ALLOC_ALGO_A,
CTR_TBF_ALLOC_ALGO_B,
+ CTR_TBF_FAILED_EGPRS_ONLY,
CTR_RLC_SENT,
CTR_RLC_RESENT,
CTR_RLC_RESTARTED,
@@ -288,6 +289,7 @@ public:
void tbf_reused();
void tbf_alloc_algo_a();
void tbf_alloc_algo_b();
+ void tbf_failed_egprs_only();
void rlc_sent();
void rlc_resent();
void rlc_restarted();
@@ -425,6 +427,7 @@ CREATE_COUNT_INLINE(tbf_ul_freed, CTR_TBF_UL_FREED)
CREATE_COUNT_INLINE(tbf_reused, CTR_TBF_REUSED)
CREATE_COUNT_INLINE(tbf_alloc_algo_a, CTR_TBF_ALLOC_ALGO_A)
CREATE_COUNT_INLINE(tbf_alloc_algo_b, CTR_TBF_ALLOC_ALGO_B)
+CREATE_COUNT_INLINE(tbf_failed_egprs_only, CTR_TBF_FAILED_EGPRS_ONLY)
CREATE_COUNT_INLINE(rlc_sent, CTR_RLC_SENT)
CREATE_COUNT_INLINE(rlc_resent, CTR_RLC_RESENT)
CREATE_COUNT_INLINE(rlc_restarted, CTR_RLC_RESTARTED)
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index fe3009b1..97be4c72 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -55,9 +55,7 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, "pcu%s", VTY_NEWLINE);
if (bts->egprs_enabled)
- vty_out(vty, " egprs%s", VTY_NEWLINE);
- else
- vty_out(vty, " no egprs%s", VTY_NEWLINE);
+ vty_out(vty, " egprs only%s", VTY_NEWLINE);
vty_out(vty, " flow-control-interval %d%s", bts->fc_interval,
VTY_NEWLINE);
@@ -171,8 +169,8 @@ DEFUN(cfg_pcu,
DEFUN(cfg_pcu_egprs,
cfg_pcu_egprs_cmd,
- "egprs",
- EGPRS_STR)
+ "egprs only",
+ EGPRS_STR "Use EGPRS and disable plain GPRS\n")
{
struct gprs_rlcmac_bts *bts = bts_main_data();
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 1f0576af..db63a08d 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -609,6 +609,13 @@ struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts,
struct gprs_rlcmac_ul_tbf *tbf;
int rc;
+ if (egprs_ms_class == 0 && bts->egprs_enabled) {
+ LOGP(DRLCMAC, LOGL_NOTICE,
+ "Not accepting non-EGPRS phone in EGPRS-only mode\n");
+ bts->bts->tbf_failed_egprs_only();
+ return NULL;
+ }
+
LOGP(DRLCMAC, LOGL_DEBUG, "********** TBF starts here **********\n");
LOGP(DRLCMAC, LOGL_INFO, "Allocating %s TBF: MS_CLASS=%d/%d\n",
"UL", ms_class, egprs_ms_class);
@@ -679,6 +686,13 @@ struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts,
struct gprs_rlcmac_dl_tbf *tbf;
int rc;
+ if (egprs_ms_class == 0 && bts->egprs_enabled) {
+ LOGP(DRLCMAC, LOGL_NOTICE,
+ "Not accepting non-EGPRS phone in EGPRS-only mode\n");
+ bts->bts->tbf_failed_egprs_only();
+ return NULL;
+ }
+
LOGP(DRLCMAC, LOGL_DEBUG, "********** TBF starts here **********\n");
LOGP(DRLCMAC, LOGL_INFO, "Allocating %s TBF: MS_CLASS=%d/%d\n",
"DL", ms_class, egprs_ms_class);