Rename tbf_alloc_ul_tbf -> ul_tbf_alloc
Use proper prefix according to the type being allocated. Change-Id: Ic98c3c852c96c3f52f1c8f531b8d0fd28ce5aef5
This commit is contained in:
parent
b8ff74b37a
commit
bda7bb7667
|
@ -1068,7 +1068,7 @@ struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_pacch(struct GprsMs *ms, int8_
|
||||||
const bool single_slot = false;
|
const bool single_slot = false;
|
||||||
struct gprs_rlcmac_ul_tbf *ul_tbf;
|
struct gprs_rlcmac_ul_tbf *ul_tbf;
|
||||||
|
|
||||||
ul_tbf = tbf_alloc_ul_tbf(ms->bts, ms, use_trx, single_slot);
|
ul_tbf = ul_tbf_alloc(ms->bts, ms, use_trx, single_slot);
|
||||||
if (!ul_tbf) {
|
if (!ul_tbf) {
|
||||||
LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n");
|
LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n");
|
||||||
/* Caller will most probably send a Imm Ass Reject after return */
|
/* Caller will most probably send a Imm Ass Reject after return */
|
||||||
|
@ -1087,7 +1087,7 @@ struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_agch(struct GprsMs *ms)
|
||||||
const bool single_slot = true;
|
const bool single_slot = true;
|
||||||
struct gprs_rlcmac_ul_tbf *ul_tbf;
|
struct gprs_rlcmac_ul_tbf *ul_tbf;
|
||||||
|
|
||||||
ul_tbf = tbf_alloc_ul_tbf(ms->bts, ms, trx_no, single_slot);
|
ul_tbf = ul_tbf_alloc(ms->bts, ms, trx_no, single_slot);
|
||||||
if (!ul_tbf) {
|
if (!ul_tbf) {
|
||||||
LOGP(DTBF, LOGL_NOTICE, "No PDCH resource for Uplink TBF\n");
|
LOGP(DTBF, LOGL_NOTICE, "No PDCH resource for Uplink TBF\n");
|
||||||
/* Caller will most probably send a Imm Ass Reject after return */
|
/* Caller will most probably send a Imm Ass Reject after return */
|
||||||
|
|
|
@ -104,7 +104,7 @@ static int ul_tbf_dtor(struct gprs_rlcmac_ul_tbf *tbf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generic function to alloc a UL TBF, later configured to be assigned either over CCCH or PACCH */
|
/* Generic function to alloc a UL TBF, later configured to be assigned either over CCCH or PACCH */
|
||||||
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot)
|
struct gprs_rlcmac_ul_tbf *ul_tbf_alloc(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot)
|
||||||
{
|
{
|
||||||
struct gprs_rlcmac_ul_tbf *tbf;
|
struct gprs_rlcmac_ul_tbf *tbf;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
|
@ -132,7 +132,7 @@ struct gprs_rlcmac_ul_tbf;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot);
|
struct gprs_rlcmac_ul_tbf *ul_tbf_alloc(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot);
|
||||||
void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta);
|
void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta);
|
||||||
void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta);
|
void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta);
|
||||||
struct gprs_rlcmac_ul_tbf *tbf_as_ul_tbf(struct gprs_rlcmac_tbf *tbf);
|
struct gprs_rlcmac_ul_tbf *tbf_as_ul_tbf(struct gprs_rlcmac_tbf *tbf);
|
||||||
|
|
|
@ -46,7 +46,7 @@ static gprs_rlcmac_tbf *tbf_alloc(struct gprs_rlcmac_bts *bts,
|
||||||
OSMO_ASSERT(ms != NULL);
|
OSMO_ASSERT(ms != NULL);
|
||||||
|
|
||||||
if (dir == GPRS_RLCMAC_UL_TBF)
|
if (dir == GPRS_RLCMAC_UL_TBF)
|
||||||
return tbf_alloc_ul_tbf(bts, ms, use_trx, single_slot);
|
return ul_tbf_alloc(bts, ms, use_trx, single_slot);
|
||||||
else
|
else
|
||||||
return dl_tbf_alloc(bts, ms, use_trx, single_slot);
|
return dl_tbf_alloc(bts, ms, use_trx, single_slot);
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ static inline bool test_alloc_b_ul_dl(bool ts0, bool ts1, bool ts2, bool ts3, bo
|
||||||
ms = bts_alloc_ms(bts, ms_class, 0);
|
ms = bts_alloc_ms(bts, ms_class, 0);
|
||||||
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
|
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
|
||||||
ms_set_timeout(ms, 0);
|
ms_set_timeout(ms, 0);
|
||||||
ul_tbf = tbf_alloc_ul_tbf(bts, ms, -1, true);
|
ul_tbf = ul_tbf_alloc(bts, ms, -1, true);
|
||||||
if (!ul_tbf)
|
if (!ul_tbf)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ static inline bool test_alloc_b_dl_ul(bool ts0, bool ts1, bool ts2, bool ts3, bo
|
||||||
|
|
||||||
dump_assignment(dl_tbf, "DL", verbose);
|
dump_assignment(dl_tbf, "DL", verbose);
|
||||||
|
|
||||||
ul_tbf = tbf_alloc_ul_tbf(bts, ms, ms_current_trx(ms)->trx_no, false);
|
ul_tbf = ul_tbf_alloc(bts, ms, ms_current_trx(ms)->trx_no, false);
|
||||||
if (!ul_tbf)
|
if (!ul_tbf)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ static inline bool test_alloc_b_jolly(uint8_t ms_class)
|
||||||
ms = bts_alloc_ms(bts, ms_class, 0);
|
ms = bts_alloc_ms(bts, ms_class, 0);
|
||||||
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
|
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
|
||||||
ms_set_timeout(ms, 0);
|
ms_set_timeout(ms, 0);
|
||||||
ul_tbf = tbf_alloc_ul_tbf(bts, ms, -1, false);
|
ul_tbf = ul_tbf_alloc(bts, ms, -1, false);
|
||||||
if (!ul_tbf)
|
if (!ul_tbf)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ static GprsMs *alloc_tbfs(struct gprs_rlcmac_bts *bts, struct GprsMs *old_ms, en
|
||||||
case TEST_MODE_UL_AND_DL:
|
case TEST_MODE_UL_AND_DL:
|
||||||
if (ms_ul_tbf(old_ms))
|
if (ms_ul_tbf(old_ms))
|
||||||
tbf_free(ms_ul_tbf(old_ms));
|
tbf_free(ms_ul_tbf(old_ms));
|
||||||
tbf = tbf_alloc_ul_tbf(bts, old_ms, trx_no, false);
|
tbf = ul_tbf_alloc(bts, old_ms, trx_no, false);
|
||||||
if (tbf == NULL) {
|
if (tbf == NULL) {
|
||||||
OSMO_ASSERT(trx_no != -1 || bts_all_pdch_allocated(bts));
|
OSMO_ASSERT(trx_no != -1 || bts_all_pdch_allocated(bts));
|
||||||
ms_unref(old_ms);
|
ms_unref(old_ms);
|
||||||
|
|
|
@ -131,7 +131,7 @@ static void test_tbf_tlli_update()
|
||||||
OSMO_ASSERT(ms_dl_tbf(ms) == dl_tbf);
|
OSMO_ASSERT(ms_dl_tbf(ms) == dl_tbf);
|
||||||
OSMO_ASSERT(dl_tbf->ms() == ms);
|
OSMO_ASSERT(dl_tbf->ms() == ms);
|
||||||
|
|
||||||
gprs_rlcmac_tbf *ul_tbf = tbf_alloc_ul_tbf(bts,
|
gprs_rlcmac_tbf *ul_tbf = ul_tbf_alloc(bts,
|
||||||
ms, 0, false);
|
ms, 0, false);
|
||||||
OSMO_ASSERT(ul_tbf != NULL);
|
OSMO_ASSERT(ul_tbf != NULL);
|
||||||
ul_tbf->update_ms(0x2342, GPRS_RLCMAC_UL_TBF);
|
ul_tbf->update_ms(0x2342, GPRS_RLCMAC_UL_TBF);
|
||||||
|
|
|
@ -687,7 +687,7 @@ static void test_egprs_ul_ack_nack()
|
||||||
bts->trx[0].pdch[4].enable();
|
bts->trx[0].pdch[4].enable();
|
||||||
|
|
||||||
GprsMs *ms = bts_alloc_ms(bts, 1, 1);
|
GprsMs *ms = bts_alloc_ms(bts, 1, 1);
|
||||||
struct gprs_rlcmac_ul_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, true);
|
struct gprs_rlcmac_ul_tbf *tbf = ul_tbf_alloc(bts, ms, 0, true);
|
||||||
struct crbb_test crbb_test = {0};
|
struct crbb_test crbb_test = {0};
|
||||||
bitvec *rbb = NULL;
|
bitvec *rbb = NULL;
|
||||||
unsigned int rbb_size;
|
unsigned int rbb_size;
|
||||||
|
@ -804,7 +804,7 @@ void test_immediate_assign_ul0m()
|
||||||
bts->trx[0].pdch[5].enable();
|
bts->trx[0].pdch[5].enable();
|
||||||
|
|
||||||
GprsMs *ms = bts_alloc_ms(bts, 1, 0);
|
GprsMs *ms = bts_alloc_ms(bts, 1, 0);
|
||||||
struct gprs_rlcmac_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, false);
|
struct gprs_rlcmac_tbf *tbf = ul_tbf_alloc(bts, ms, 0, false);
|
||||||
static uint8_t res[] = { 0x06,
|
static uint8_t res[] = { 0x06,
|
||||||
0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
|
0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
|
||||||
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
|
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
|
||||||
|
@ -846,7 +846,7 @@ void test_immediate_assign_ul1s()
|
||||||
bts->trx[0].pdch[2].enable();
|
bts->trx[0].pdch[2].enable();
|
||||||
|
|
||||||
GprsMs *ms = bts_alloc_ms(bts, 1, 1);
|
GprsMs *ms = bts_alloc_ms(bts, 1, 1);
|
||||||
struct gprs_rlcmac_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, false);
|
struct gprs_rlcmac_tbf *tbf = ul_tbf_alloc(bts, ms, 0, false);
|
||||||
static uint8_t res[] = { 0x06,
|
static uint8_t res[] = { 0x06,
|
||||||
0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
|
0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
|
||||||
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
|
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
|
||||||
|
|
Loading…
Reference in New Issue