aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-05-09 17:18:40 +0700
committerlaforge <laforge@osmocom.org>2020-05-11 20:06:39 +0000
commitf094b46d1c058c5f77035cb0f8983c57894d3d63 (patch)
treea3747c31f77891c02f54d6f21eba3847deb27552
parentdb9ea55c6e0ccd7fd55be9fed692f20876f5f2a9 (diff)
fix egprs_mslot_class_from_ra(): multislot class may not be present
For more details, see 3GPP TS 44.060, table 11.2.5a.2. Change-Id: Iba0466b29afd26cff317ed4fb6749f8a3079f16a Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com> Related: OS#1548
-rw-r--r--src/bts.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 6578e06..1d073aa 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -675,7 +675,8 @@ uint32_t BTS::rfn_to_fn(int32_t rfn)
*/
static inline uint8_t egprs_mslot_class_from_ra(uint16_t ra, bool is_11bit)
{
- if (is_11bit)
+ /* EGPRS multislot class is only present in One Phase Access Request */
+ if (is_11bit && (ra >> 10) == 0x00) /* .0xx xxx. .... */
return ((ra & 0x3e0) >> 5) + 1;
/* set EGPRS multislot class to 0 for 8-bit RACH, since we don't know it yet */