pdch: Simplify code path allocating UL TBF

There's no real need to pass a tlli per separate, the information is
already contained in the MS. Furthermore, when doing so, it becomes
clear the TLLI was only passed to set it again on the MS, so actually
that ms_update() can be totally dropped since it will act as a no-op.

Change-Id: Ie761c3c7c222458ab0514117ae637ad3267139a0
This commit is contained in:
Pau Espin 2021-10-18 12:24:38 +02:00
parent b0aba59143
commit 592239630b
3 changed files with 4 additions and 8 deletions

View File

@ -119,7 +119,7 @@ static inline void sched_ul_ass_or_rej(struct gprs_rlcmac_bts *bts, struct gprs_
bts_do_rate_ctr_inc(bts, CTR_CHANNEL_REQUEST_DESCRIPTION);
/* This call will register the new TBF with the MS on success */
gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul_pacch(bts, tbf->ms(), tbf->trx->trx_no, tbf->tlli());
gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul_pacch(bts, tbf->ms(), tbf->trx->trx_no);
/* schedule uplink assignment or reject */
if (ul_tbf) {
@ -707,7 +707,7 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
ms_set_egprs_ms_class(ms, egprs_ms_class);
}
ul_tbf = tbf_alloc_ul_pacch(bts(), ms, trx_no(), tlli);
ul_tbf = tbf_alloc_ul_pacch(bts(), ms, trx_no());
if (!ul_tbf) {
handle_tbf_reject(bts(), ms, trx_no(), ts_no);
goto return_unref;

View File

@ -152,8 +152,7 @@ struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs
}
/* Alloc a UL TBF to be assigned over PACCH */
gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx,
uint32_t tlli)
gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx)
{
struct gprs_rlcmac_ul_tbf *tbf;
@ -165,8 +164,6 @@ gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms,
}
tbf->m_contention_resolution_done = 1;
osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, NULL);
tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
OSMO_ASSERT(tbf->ms());
return tbf;
}

View File

@ -126,8 +126,7 @@ inline uint16_t gprs_rlcmac_ul_tbf::window_size() const
}
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot);
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms,
int8_t use_trx, uint32_t tlli);
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx);
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_ccch(struct gprs_rlcmac_bts *bts, struct GprsMs *ms);
struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts,
GprsMs *ms, uint8_t trx_no, uint8_t ts_no);