From 96efa70a9e4df47f98fe6ce2450d33e0c0e27294 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 29 Sep 2013 07:44:39 +0200 Subject: alloc: Call it trx_no and not trx as it is not trx object --- src/gprs_rlcmac.cpp | 8 ++++---- src/gprs_rlcmac_data.cpp | 10 +++++----- src/gprs_rlcmac_sched.cpp | 4 ++-- src/gprs_rlcmac_ts_alloc.cpp | 22 +++++++++++----------- src/tbf.cpp | 12 ++++++------ src/tbf.h | 2 +- 6 files changed, 29 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp index 5bc58cff..6dea7c81 100644 --- a/src/gprs_rlcmac.cpp +++ b/src/gprs_rlcmac.cpp @@ -303,7 +303,7 @@ int gprs_rlcmac_add_paging(uint8_t chan_needed, uint8_t *identity_lv) if (first_ts < 0) first_ts = ts; /* break, if we already marked a slot */ - if ((slot_mask[tbf->trx] & (1 << ts))) + if ((slot_mask[tbf->trx_no] & (1 << ts))) break; } } @@ -313,14 +313,14 @@ int gprs_rlcmac_add_paging(uint8_t chan_needed, uint8_t *identity_lv) "TRX=%d TS=%d, so we mark\n", (tbf->direction == GPRS_RLCMAC_UL_TBF) ? "UL" : "DL", - tbf->tfi, tbf->trx, first_ts); - slot_mask[tbf->trx] |= (1 << first_ts); + tbf->tfi, tbf->trx_no, first_ts); + slot_mask[tbf->trx_no] |= (1 << first_ts); } else LOGP(DRLCMAC, LOGL_DEBUG, "- %s TBF=%d uses " "already marked TRX=%d TS=%d\n", (tbf->direction == GPRS_RLCMAC_UL_TBF) ? "UL" : "DL", - tbf->tfi, tbf->trx, ts); + tbf->tfi, tbf->trx_no, ts); } } diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp index 17c4b1b3..079af564 100644 --- a/src/gprs_rlcmac_data.cpp +++ b/src/gprs_rlcmac_data.cpp @@ -364,7 +364,7 @@ int gprs_rlcmac_rcv_control_block(bitvec *rlc_block, uint8_t trx, uint8_t ts, if (ul_control_block->u.Packet_Downlink_Ack_Nack.Exist_Channel_Request_Description) { LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF in ack " "message, so we provide one:\n"); - tbf_alloc_ul(bts, tbf->trx, tbf->ms_class, tbf->tlli, tbf->ta, tbf); + tbf_alloc_ul(bts, tbf->trx_no, tbf->ms_class, tbf->tlli, tbf->ta, tbf); /* schedule uplink assignment */ tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS; } @@ -697,7 +697,7 @@ struct msgb *gprs_rlcmac_send_uplink_ack(struct gprs_rlcmac_tbf *tbf, "final uplink ack...\n", tbf->tfi); return NULL; } - if (sba_find(tbf->trx, tbf->control_ts, (fn + 13) % 2715648)) { + if (sba_find(tbf->trx_no, tbf->control_ts, (fn + 13) % 2715648)) { LOGP(DRLCMACUL, LOGL_DEBUG, "Polling is already " "scheduled for single block allocation...\n"); return NULL; @@ -974,7 +974,7 @@ struct msgb *gprs_rlcmac_send_packet_uplink_assignment( "assignment...\n", tbf->tfi); return NULL; } - if (sba_find(tbf->trx, tbf->control_ts, (fn + 13) % 2715648)) { + if (sba_find(tbf->trx_no, tbf->control_ts, (fn + 13) % 2715648)) { LOGP(DRLCMACUL, LOGL_DEBUG, "Polling is already scheduled for " "single block allocation...\n"); return NULL; @@ -1434,7 +1434,7 @@ tx_block: LOGP(DRLCMAC, LOGL_DEBUG, "Polling cannot be " "sheduled in this TS %d, waiting for " "TS %d\n", ts, tbf->control_ts); - else if (sba_find(tbf->trx, ts, (fn + 13) % 2715648)) + else if (sba_find(tbf->trx_no, ts, (fn + 13) % 2715648)) LOGP(DRLCMAC, LOGL_DEBUG, "Polling cannot be " "sheduled, because single block alllocation " "already exists\n"); @@ -1647,7 +1647,7 @@ struct msgb *gprs_rlcmac_send_packet_downlink_assignment( "assignment...\n", tbf->tfi); return NULL; } - if (sba_find(tbf->trx, tbf->control_ts, (fn + 13) % 2715648)) { + if (sba_find(tbf->trx_no, tbf->control_ts, (fn + 13) % 2715648)) { LOGP(DRLCMACUL, LOGL_DEBUG, "Polling is already " "scheduled for single block allocation...\n"); return NULL; diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 476d7812..e62a9e9e 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -38,7 +38,7 @@ uint32_t sched_poll(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr, poll_fn = poll_fn % 2715648; llist_for_each_entry(tbf, &gprs_rlcmac_ul_tbfs, list) { /* this trx, this ts */ - if (tbf->trx != trx || tbf->control_ts != ts) + if (tbf->trx_no != trx || tbf->control_ts != ts) continue; /* polling for next uplink block */ if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED @@ -53,7 +53,7 @@ uint32_t sched_poll(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr, } llist_for_each_entry(tbf, &gprs_rlcmac_dl_tbfs, list) { /* this trx, this ts */ - if (tbf->trx != trx || tbf->control_ts != ts) + if (tbf->trx_no != trx || tbf->control_ts != ts) continue; /* polling for next uplink block */ if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 340eb10d..949041a1 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -103,7 +103,7 @@ static void assign_uplink_tbf_usf(struct gprs_rlcmac_bts *bts, int ts, struct gprs_rlcmac_tbf *tbf, int8_t usf) { - bts->trx[tbf->trx].ul_tbf[tbf->tfi] = tbf; + bts->trx[tbf->trx_no].ul_tbf[tbf->tfi] = tbf; pdch->ul_tbf[tbf->tfi] = tbf; tbf->pdch[ts] = pdch; tbf->dir.ul.usf[ts] = usf; @@ -126,7 +126,7 @@ int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, "%d\n", tbf->ms_class); for (ts = 0; ts < 8; ts++) { - pdch = &bts->trx[tbf->trx].pdch[ts]; + pdch = &bts->trx[tbf->trx_no].pdch[ts]; if (!pdch->enable) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, because " "not enabled\n", ts); @@ -151,7 +151,7 @@ int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, assign_uplink_tbf_usf(bts, pdch, ts, tbf, usf); } else { LOGP(DRLCMAC, LOGL_DEBUG, "- Assign downlink TS=%d\n", ts); - bts->trx[tbf->trx].dl_tbf[tbf->tfi] = tbf; + bts->trx[tbf->trx_no].dl_tbf[tbf->tfi] = tbf; pdch->dl_tbf[tbf->tfi] = tbf; tbf->pdch[ts] = pdch; } @@ -280,7 +280,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, * This must be done for uplink TBF also, because it is the basis * for calculating control slot and uplink slot(s). */ for (ts = 0, i = 0; ts < 8; ts++) { - pdch = &bts->trx[tbf->trx].pdch[ts]; + pdch = &bts->trx[tbf->trx_no].pdch[ts]; /* check if enabled */ if (!pdch->enable) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, because " @@ -298,7 +298,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, "because it has different TSC than lower TS " "of TRX. In order to allow multislot, all " "slots must be configured with the same " - "TSC!\n", ts, tbf->trx); + "TSC!\n", ts, tbf->trx_no); /* increase window for Type 1 */ if (Type == 1 && rx_window) i++; @@ -436,7 +436,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, * slot. */ if (tbf->direction == GPRS_RLCMAC_UL_TBF) { for (ts = tx_win_min, i = 0; i < tx_range; ts = (ts + 1) & 7) { - pdch = &bts->trx[tbf->trx].pdch[ts]; + pdch = &bts->trx[tbf->trx_no].pdch[ts]; /* check if enabled */ if (!pdch->enable) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, " @@ -452,7 +452,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, "than lower TS of TRX. In order to " "allow multislot, all slots must be " "configured with the same TSC!\n", - ts, tbf->trx); + ts, tbf->trx_no); /* increase window for Type 1 */ if (Type == 1) i++; @@ -508,7 +508,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, /* assign the first common ts, which is used for control or * single slot. */ for (ts = tx_win_min, i = 0; i < tx_range; ts = (ts + 1) & 7) { - pdch = &bts->trx[tbf->trx].pdch[ts]; + pdch = &bts->trx[tbf->trx_no].pdch[ts]; /* check if enabled */ if (!pdch->enable) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, " @@ -541,8 +541,8 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, continue; LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning DL TS " "%d\n", ts); - pdch = &bts->trx[tbf->trx].pdch[ts]; - bts->trx[tbf->trx].dl_tbf[tbf->tfi] = tbf; + pdch = &bts->trx[tbf->trx_no].pdch[ts]; + bts->trx[tbf->trx_no].dl_tbf[tbf->tfi] = tbf; pdch->dl_tbf[tbf->tfi] = tbf; tbf->pdch[ts] = pdch; slotcount++; @@ -563,7 +563,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, if ((tx_window & (1 << ts))) { LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning UL TS " "%d\n", ts); - pdch = &bts->trx[tbf->trx].pdch[ts]; + pdch = &bts->trx[tbf->trx_no].pdch[ts]; assign_uplink_tbf_usf(bts, pdch, ts, tbf, usf[ts]); slotcount++; if (slotcount == 1) diff --git a/src/tbf.cpp b/src/tbf.cpp index 547612f6..ddb3fbb8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -123,7 +123,7 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts, tbf = tbf_by_tlli(tlli, GPRS_RLCMAC_UL_TBF); if (tbf && tbf->dir.ul.contention_resolution_done && !tbf->dir.ul.final_ack_sent) { - use_trx = tbf->trx; + use_trx = tbf->trx_no; ta = tbf->ta; ss = 0; old_tbf = tbf; @@ -248,7 +248,7 @@ static void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf) int ts; if (tbf->direction == GPRS_RLCMAC_UL_TBF) { - bts->trx[tbf->trx].ul_tbf[tbf->tfi] = NULL; + bts->trx[tbf->trx_no].ul_tbf[tbf->tfi] = NULL; for (ts = 0; ts < 8; ts++) { pdch = tbf->pdch[ts]; if (pdch) @@ -256,7 +256,7 @@ static void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf) tbf->pdch[ts] = NULL; } } else { - bts->trx[tbf->trx].dl_tbf[tbf->tfi] = NULL; + bts->trx[tbf->trx_no].dl_tbf[tbf->tfi] = NULL; for (ts = 0; ts < 8; ts++) { pdch = tbf->pdch[ts]; if (pdch) @@ -445,14 +445,14 @@ struct gprs_rlcmac_tbf *tbf_by_poll_fn(uint32_t fn, uint8_t trx, uint8_t ts) llist_for_each_entry(tbf, &gprs_rlcmac_ul_tbfs, list) { if (tbf->state_is_not(GPRS_RLCMAC_RELEASING) && tbf->poll_state == GPRS_RLCMAC_POLL_SCHED - && tbf->poll_fn == fn && tbf->trx == trx + && tbf->poll_fn == fn && tbf->trx_no == trx && tbf->control_ts == ts) return tbf; } llist_for_each_entry(tbf, &gprs_rlcmac_dl_tbfs, list) { if (tbf->state_is_not(GPRS_RLCMAC_RELEASING) && tbf->poll_state == GPRS_RLCMAC_POLL_SCHED - && tbf->poll_fn == fn && tbf->trx == trx + && tbf->poll_fn == fn && tbf->trx_no == trx && tbf->control_ts == ts) return tbf; } @@ -502,7 +502,7 @@ next_diagram: #endif tbf->direction = dir; tbf->tfi = tfi; - tbf->trx = trx; + tbf->trx_no = trx; tbf->arfcn = bts->trx[trx].arfcn; tbf->ms_class = ms_class; tbf->ws = 64; diff --git a/src/tbf.h b/src/tbf.h index 84d558e0..0b97f80c 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -103,7 +103,7 @@ struct gprs_rlcmac_tbf { uint8_t tfi; uint32_t tlli; uint8_t tlli_valid; - uint8_t trx; + uint8_t trx_no; uint16_t arfcn; uint8_t tsc; uint8_t first_ts; /* first TS used by TBF */ -- cgit v1.2.3