aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-08 16:37:23 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-08 16:37:25 +0200
commite6bca376aa6b84e70a9eeb0e2cfce71491233506 (patch)
tree3ecd9d3e46b6b925df2228428cb42ea6e99764fc
parent98eb03c391145dad40de6f052fe04d2f03a6fe11 (diff)
bts: Return uint8_t in egprs_mslot_class_from_ra()
MultislotClass is 5 bit long, so an uint8_t is enough. In most places we are already storing multislot class as uint8_t. Change-Id: I1dcaff9d69379453a0b794e5f36b820f5f78531f
-rw-r--r--src/bts.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index a43613e..6578e06 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -673,7 +673,7 @@ uint32_t BTS::rfn_to_fn(int32_t rfn)
* can only receive EGPRS mslot class through 11-bit EGPRS PACKET CHANNEL
* REQUEST.
*/
-static inline uint16_t egprs_mslot_class_from_ra(uint16_t ra, bool is_11bit)
+static inline uint8_t egprs_mslot_class_from_ra(uint16_t ra, bool is_11bit)
{
if (is_11bit)
return ((ra & 0x3e0) >> 5) + 1;
@@ -750,7 +750,7 @@ int BTS::rcv_rach(uint16_t ra, uint32_t Fn, int16_t qta, bool is_11bit,
int plen;
uint8_t usf = 7;
uint8_t tsc = 0, ta = qta2ta(qta);
- uint16_t egprs_ms_class = egprs_mslot_class_from_ra(ra, is_11bit);
+ uint8_t egprs_ms_class = egprs_mslot_class_from_ra(ra, is_11bit);
bool failure = false;
rach_frame();