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
This commit is contained in:
Pau Espin 2020-05-08 14:20:32 +02:00
parent acd67cbdf1
commit 9ee90d2323
1 changed files with 13 additions and 5 deletions

View File

@ -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 "