ms: Properly handle EGPRS_GMSK mode in ms_max_cs_dl/ul()

Change-Id: Ied3e02a12145112fafa12282ed7aefa5b0fa6eb6
This commit is contained in:
Pau Espin 2021-01-25 15:10:33 +01:00
parent 7bb8cd683c
commit 201da4e5b2
2 changed files with 12 additions and 20 deletions

View File

@ -632,6 +632,7 @@ void ms_update_error_rate(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, int er
enum CodingScheme ms_max_cs_ul(const struct GprsMs *ms)
{
enum CodingScheme cs;
OSMO_ASSERT(ms->bts != NULL);
if (mcs_is_gprs(ms->current_cs_ul)) {
@ -642,15 +643,10 @@ enum CodingScheme ms_max_cs_ul(const struct GprsMs *ms)
return mcs_get_gprs_by_num(bts_max_cs_ul(ms->bts));
}
if (!mcs_is_edge(ms->current_cs_ul))
return UNKNOWN;
if (bts_max_mcs_ul(ms->bts))
return mcs_get_egprs_by_num(bts_max_mcs_ul(ms->bts));
else if (bts_max_cs_ul(ms->bts))
return mcs_get_gprs_by_num(bts_max_cs_ul(ms->bts));
return MCS4;
cs = mcs_get_egprs_by_num(bts_max_mcs_ul(ms->bts));
if (ms_mode(ms) == EGPRS_GMSK && cs > MCS4)
cs = MCS4;
return cs;
}
void ms_set_current_cs_dl(struct GprsMs *ms, enum CodingScheme scheme)
@ -660,6 +656,7 @@ void ms_set_current_cs_dl(struct GprsMs *ms, enum CodingScheme scheme)
enum CodingScheme ms_max_cs_dl(const struct GprsMs *ms)
{
enum CodingScheme cs;
OSMO_ASSERT(ms->bts != NULL);
if (mcs_is_gprs(ms->current_cs_dl)) {
@ -670,15 +667,10 @@ enum CodingScheme ms_max_cs_dl(const struct GprsMs *ms)
return mcs_get_gprs_by_num(bts_max_cs_dl(ms->bts));
}
if (!mcs_is_edge(ms->current_cs_dl))
return UNKNOWN;
if (bts_max_mcs_dl(ms->bts))
return mcs_get_egprs_by_num(bts_max_mcs_dl(ms->bts));
else if (bts_max_cs_dl(ms->bts))
return mcs_get_gprs_by_num(bts_max_cs_dl(ms->bts));
return MCS4;
cs = mcs_get_egprs_by_num(bts_max_mcs_dl(ms->bts));
if (ms_mode(ms) == EGPRS_GMSK && cs > MCS4)
cs = MCS4;
return cs;
}
void ms_update_cs_ul(struct GprsMs *ms, const struct pcu_l1_meas *meas)

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-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 MCS-1/MCS-4, UL MCS-1/MCS-4, mode EGPRS_GMSK-only, <IDLE>
2: after mode set MS DL MCS-1/MCS-4, UL MCS-1/MCS-4, 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 ===