aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-11-27 15:17:34 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-15 15:17:51 +0100
commit86b6f05d19c8559b99d548730e54c1a4bfb7beba (patch)
treef22e5bd988217e5f2b4164d0613381829b69a58b /src/bts.cpp
parent5643f35fb4d09b160c4cd14c8e0ef6f2b7dce07e (diff)
edge: Support EGPRS multislot class handling in tbf_alloc
Add an egprs_ms_class argument to the allocation functions and set/pass it where necessary. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.cpp')
-rw-r--r--src/bts.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 26077c21..0e3e8f03 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -491,7 +491,7 @@ int BTS::rcv_rach(uint8_t ra, uint32_t Fn, int16_t qta)
// Create new TBF
#warning "Copy and pate with other routines.."
/* set class to 0, since we don't know the multislot class yet */
- tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, 1);
+ tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, 0, 1);
if (!tbf) {
LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource\n");
/* FIXME: send reject */
@@ -580,13 +580,14 @@ void BTS::snd_dl_ass(gprs_rlcmac_tbf *tbf, uint8_t poll, const char *imsi)
}
-GprsMs *BTS::ms_alloc(uint8_t ms_class)
+GprsMs *BTS::ms_alloc(uint8_t ms_class, uint8_t egprs_ms_class)
{
GprsMs *ms;
ms = ms_store().create_ms();
ms->set_timeout(m_bts.ms_idle_sec);
ms->set_ms_class(ms_class);
+ ms->set_egprs_ms_class(egprs_ms_class);
return ms;
}
@@ -968,7 +969,8 @@ void gprs_rlcmac_pdch::rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *ack_n
"message, so we provide one:\n");
/* This call will register the new TBF with the MS on success */
- tbf_alloc_ul(bts_data(), tbf->trx->trx_no, tbf->ms_class(),
+ tbf_alloc_ul(bts_data(), tbf->trx->trx_no,
+ tbf->ms_class(), tbf->ms()->egprs_ms_class(),
tbf->tlli(), tbf->ta(), tbf->ms());
/* schedule uplink assignment */
@@ -1053,7 +1055,8 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
LOGP(DRLCMAC, LOGL_NOTICE,
"MS supports EGPRS multislot class %d.\n",
egprs_ms_class);
- ul_tbf = tbf_alloc_ul(bts_data(), trx_no(), ms_class, tlli, ta, ms);
+ ul_tbf = tbf_alloc_ul(bts_data(), trx_no(), ms_class,
+ egprs_ms_class, tlli, ta, ms);
if (!ul_tbf)
return;