aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-08 14:20:32 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-08 16:34:50 +0200
commit9ee90d2323cfba7ab9ee2f6c98520e56391102a0 (patch)
treef816372c5ffc3910f299e599344fffd30a7eccbc
parentacd67cbdf159b03fd25dcf1fd14abf60f949ff54 (diff)
bts: Rename mslot_class_from_ra
This function is actually returning an EGPRS multislot class, so let's update naming. The variable using the return value was already being passed as egprs_ms_class to tbf_alloc_ul_tbf(). Change-Id: Idb51836c8c9dd4e865bf2cb0b0c24155662f2ae8
-rw-r--r--src/bts.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 5e1725c..8edde23 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -664,12 +664,21 @@ uint32_t BTS::rfn_to_fn(int32_t rfn)
return fn;
}
-static inline uint16_t mslot_class_from_ra(uint16_t ra, bool is_11bit)
+/* 3GPP TS 44.060:
+ * Table 11.2.5.3: PACKET CHANNEL REQUEST
+ * Table 11.2.5a.3: EGPRS PACKET CHANNEL REQUEST
+ * Both GPRS and EGPRS use same MultislotClass coding, but since use of PCCCH is
+ * deprecated, no PACKET CHANNEL REQUEST exists, which means for GPRS we will
+ * receive CCCH RACH which doesn't contain any mslot class. Hence in the end we
+ * 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)
{
if (is_11bit)
return (ra & 0x3e0) >> 5;
- /* set multislot class to 0 for 8-bit RACH, since we don't know it yet */
+ /* set EGPRS multislot class to 0 for 8-bit RACH, since we don't know it yet */
return 0;
}
@@ -741,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 ms_class = mslot_class_from_ra(ra, is_11bit);
+ uint16_t egprs_ms_class = egprs_mslot_class_from_ra(ra, is_11bit);
bool failure = false;
rach_frame();
@@ -784,8 +793,7 @@ int BTS::rcv_rach(uint16_t ra, uint32_t Fn, int16_t qta, bool is_11bit,
} else {
// Create new TBF
/* FIXME: Copy and paste with other routines.. */
-
- tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, ms_class, true);
+ tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, egprs_ms_class, true);
if (!tbf) {
LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource sending "