ms: Set proper initial MCS values setting mode EGPRS_GMSK

Before this patch, shared logic with EGPRS case would allow keeping
MCS>4.

Change-Id: I94cbf0c120fd37deb2dfd077d35b3811c7da0675
This commit is contained in:
Pau Espin 2021-01-25 15:08:35 +01:00
parent 7963edba09
commit 7bb8cd683c
2 changed files with 15 additions and 2 deletions

View File

@ -259,6 +259,19 @@ void ms_set_mode(struct GprsMs *ms, enum mcs_kind mode)
break;
case EGPRS_GMSK:
if (!mcs_is_edge_gmsk(ms->current_cs_ul)) {
ms->current_cs_ul = mcs_get_egprs_by_num(
ms->bts->initial_mcs_ul);
if (!mcs_is_valid(ms->current_cs_ul))
ms->current_cs_ul = MCS1;
}
if (!mcs_is_edge_gmsk(ms->current_cs_dl)) {
ms->current_cs_dl = mcs_get_egprs_by_num(
ms->bts->initial_mcs_dl);
if (!mcs_is_valid(ms->current_cs_dl))
ms->current_cs_dl = MCS1;
}
break;
case EGPRS:
if (!mcs_is_edge(ms->current_cs_ul)) {
ms->current_cs_ul = mcs_get_egprs_by_num(

View File

@ -26,8 +26,8 @@
2: after mode set MS DL MCS-1/MCS-9, UL MCS-1/MCS-9, mode EGPRS, <ACTIVE>
1: after MCS set MS DL MCS-7/MCS-9, UL MCS-1/MCS-9, mode EGPRS, <IDLE>
2: after MCS set MS DL MCS-8/MCS-9, UL MCS-1/MCS-9, mode EGPRS, <ACTIVE>
1: after mode set MS DL MCS-7/MCS-9, UL MCS-1/MCS-9, mode EGPRS_GMSK-only, <IDLE>
2: after mode set MS DL MCS-8/MCS-9, UL MCS-1/MCS-9, mode EGPRS_GMSK-only, <ACTIVE>
1: after mode set MS DL MCS-1/MCS-9, UL MCS-1/MCS-9, mode EGPRS_GMSK-only, <IDLE>
2: after mode set MS DL MCS-1/MCS-9, UL MCS-1/MCS-9, mode EGPRS_GMSK-only, <ACTIVE>
1: after mode set MS DL CS-4/CS-4, UL CS-1/CS-4, mode GPRS, <IDLE>
2: after mode set MS DL CS-4/CS-4, UL CS-1/CS-4, mode GPRS, <ACTIVE>
=== end test_ms_mcs_mode ===