aboutsummaryrefslogtreecommitdiffstats
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/tbf/TbfTest.cpp34
-rw-r--r--tests/tbf/TbfTest.err2
-rw-r--r--tests/tbf/TbfTest.ok2
3 files changed, 38 insertions, 0 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index f9431f6..895ba8e 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -1071,6 +1071,39 @@ static void test_tbf_dl_reuse()
printf("=== end %s ===\n", __func__);
}
+static void test_tbf_gprs_egprs()
+{
+ BTS the_bts;
+ gprs_rlcmac_bts *bts;
+ uint8_t ts_no = 4;
+ uint8_t ms_class = 45;
+ int rc = 0;
+ uint32_t tlli = 0xc0006789;
+ const char *imsi = "001001123456789";
+ unsigned delay_csec = 1000;
+
+ uint8_t buf[256] = {0};
+
+ printf("=== start %s ===\n", __func__);
+
+ bts = the_bts.bts_data();
+ setup_bts(&the_bts, ts_no);
+
+ /* EGPRS-only */
+ bts->egprs_enabled = 1;
+
+ gprs_bssgp_create_and_connect(bts, 33001, 0, 33001,
+ 1234, 1234, 1234, 1, 1, 0, 0, 0);
+
+ /* Does not support EGPRS */
+ rc = gprs_rlcmac_dl_tbf::handle(bts, tlli, 0, imsi, ms_class, 0,
+ delay_csec, buf, sizeof(buf));
+
+ OSMO_ASSERT(rc == -EBUSY);
+ printf("=== end %s ===\n", __func__);
+
+ gprs_bssgp_destroy();
+}
static const struct log_info_cat default_categories[] = {
{"DCSN1", "\033[1;31m", "Concrete Syntax Notation One (CSN1)", LOGL_INFO, 0},
@@ -1129,6 +1162,7 @@ int main(int argc, char **argv)
test_tbf_dl_flow_and_rach_two_phase();
test_tbf_dl_flow_and_rach_single_phase();
test_tbf_dl_reuse();
+ test_tbf_gprs_egprs();
if (getenv("TALLOC_REPORT_FULL"))
talloc_report_full(tall_pcu_ctx, stderr);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 7b36b31..0ca4b82 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -3039,3 +3039,5 @@ TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer 3191.
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654461, TS=7
msg block (BSN 10, CS-1): 0f 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29
Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654448 block=1 data=08 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29
+Not accepting non-EGPRS phone in EGPRS-only mode
+No PDCH resource
diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok
index 916ea52..c4bc870 100644
--- a/tests/tbf/TbfTest.ok
+++ b/tests/tbf/TbfTest.ok
@@ -26,3 +26,5 @@
=== end test_tbf_dl_flow_and_rach_single_phase ===
=== start test_tbf_dl_reuse ===
=== end test_tbf_dl_reuse ===
+=== start test_tbf_gprs_egprs ===
+=== end test_tbf_gprs_egprs ===