diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2014-01-04 15:14:19 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-01-15 10:39:08 +0100 |
commit | b03d427b088380cc16461abb20115f36669777a9 (patch) | |
tree | 934f9282fb6665c34f76b934bdba84a7bf4faa18 | |
parent | 73193110f22f6e8bec774a7426c735ecc6d9733a (diff) |
alloc_algorithm_b: Correctly increment RX/TX window, even if TS is not useable
-rw-r--r-- | src/gprs_rlcmac_ts_alloc.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 171c2041..d2ccda99 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -203,7 +203,7 @@ static uint8_t select_dl_slots(struct gprs_rlcmac_trx *trx, LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, because " "not enabled\n", ts_no); if (ms_type == 1 && rx_window) - rx_window_size += 1; + goto inc_window; continue; } /* check if TSC changes */ @@ -216,7 +216,7 @@ static uint8_t select_dl_slots(struct gprs_rlcmac_trx *trx, "slots must be configured with the same " "TSC!\n", ts_no, trx->trx_no); if (ms_type == 1 && rx_window) - rx_window_size += 1; + goto inc_window; continue; } @@ -229,6 +229,7 @@ static uint8_t select_dl_slots(struct gprs_rlcmac_trx *trx, /* range of window (required for Type 1) */ rx_win_max = ts_no; +inc_window: if (++rx_window_size == ms_max_rxslots) { LOGP(DRLCMAC, LOGL_DEBUG, "- Done, because slots / " "window reached maximum alowed Rx size\n"); @@ -397,7 +398,8 @@ static int select_ul_slots(gprs_rlcmac_trx *trx, if (!pdch->is_enabled()) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, " "because not enabled\n", ts_no); - #warning "Why isn't it needed to increase the window?" + if (ms_type == 1 && tx_window) + goto inc_window; continue; } /* check if TSC changes */ @@ -410,10 +412,8 @@ static int select_ul_slots(gprs_rlcmac_trx *trx, "allow multislot, all slots must be " "configured with the same TSC!\n", ts_no, trx->trx_no); - /* increase window for Type 1 */ - #warning "Why isn't it needed to check for tx_window" if (ms_type == 1) - i++; + goto inc_window; continue; } /* check for free usf */ @@ -421,9 +421,8 @@ static int select_ul_slots(gprs_rlcmac_trx *trx, if (usf[ts_no] < 0) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, " "because no USF available\n", ts_no); - /* increase window for Type 1 */ if (ms_type == 1) - i++; + goto inc_window; continue; } @@ -433,6 +432,7 @@ static int select_ul_slots(gprs_rlcmac_trx *trx, tx_window |= (1 << ts_no); LOGP(DRLCMAC, LOGL_DEBUG, "- Selected UL TS %d\n", ts_no); +inc_window: if (1 && ms_type == 1) { /* FIXME: multislot UL assignment */ LOGP(DRLCMAC, LOGL_DEBUG, "- Done, because " "1 slot assigned\n"); |