alloc_algorithm_b: Correctly increment RX/TX window, even if TS is not useable
This commit is contained in:
parent
73193110f2
commit
b03d427b08
|
@ -203,7 +203,7 @@ static uint8_t select_dl_slots(struct gprs_rlcmac_trx *trx,
|
||||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, because "
|
LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, because "
|
||||||
"not enabled\n", ts_no);
|
"not enabled\n", ts_no);
|
||||||
if (ms_type == 1 && rx_window)
|
if (ms_type == 1 && rx_window)
|
||||||
rx_window_size += 1;
|
goto inc_window;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* check if TSC changes */
|
/* 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 "
|
"slots must be configured with the same "
|
||||||
"TSC!\n", ts_no, trx->trx_no);
|
"TSC!\n", ts_no, trx->trx_no);
|
||||||
if (ms_type == 1 && rx_window)
|
if (ms_type == 1 && rx_window)
|
||||||
rx_window_size += 1;
|
goto inc_window;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +229,7 @@ static uint8_t select_dl_slots(struct gprs_rlcmac_trx *trx,
|
||||||
/* range of window (required for Type 1) */
|
/* range of window (required for Type 1) */
|
||||||
rx_win_max = ts_no;
|
rx_win_max = ts_no;
|
||||||
|
|
||||||
|
inc_window:
|
||||||
if (++rx_window_size == ms_max_rxslots) {
|
if (++rx_window_size == ms_max_rxslots) {
|
||||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Done, because slots / "
|
LOGP(DRLCMAC, LOGL_DEBUG, "- Done, because slots / "
|
||||||
"window reached maximum alowed Rx size\n");
|
"window reached maximum alowed Rx size\n");
|
||||||
|
@ -397,7 +398,8 @@ static int select_ul_slots(gprs_rlcmac_trx *trx,
|
||||||
if (!pdch->is_enabled()) {
|
if (!pdch->is_enabled()) {
|
||||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, "
|
LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, "
|
||||||
"because not enabled\n", ts_no);
|
"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;
|
continue;
|
||||||
}
|
}
|
||||||
/* check if TSC changes */
|
/* check if TSC changes */
|
||||||
|
@ -410,10 +412,8 @@ static int select_ul_slots(gprs_rlcmac_trx *trx,
|
||||||
"allow multislot, all slots must be "
|
"allow multislot, all slots must be "
|
||||||
"configured with the same TSC!\n",
|
"configured with the same TSC!\n",
|
||||||
ts_no, trx->trx_no);
|
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)
|
if (ms_type == 1)
|
||||||
i++;
|
goto inc_window;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* check for free usf */
|
/* check for free usf */
|
||||||
|
@ -421,9 +421,8 @@ static int select_ul_slots(gprs_rlcmac_trx *trx,
|
||||||
if (usf[ts_no] < 0) {
|
if (usf[ts_no] < 0) {
|
||||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, "
|
LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, "
|
||||||
"because no USF available\n", ts_no);
|
"because no USF available\n", ts_no);
|
||||||
/* increase window for Type 1 */
|
|
||||||
if (ms_type == 1)
|
if (ms_type == 1)
|
||||||
i++;
|
goto inc_window;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,6 +432,7 @@ static int select_ul_slots(gprs_rlcmac_trx *trx,
|
||||||
tx_window |= (1 << ts_no);
|
tx_window |= (1 << ts_no);
|
||||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Selected UL TS %d\n", ts_no);
|
LOGP(DRLCMAC, LOGL_DEBUG, "- Selected UL TS %d\n", ts_no);
|
||||||
|
|
||||||
|
inc_window:
|
||||||
if (1 && ms_type == 1) { /* FIXME: multislot UL assignment */
|
if (1 && ms_type == 1) { /* FIXME: multislot UL assignment */
|
||||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Done, because "
|
LOGP(DRLCMAC, LOGL_DEBUG, "- Done, because "
|
||||||
"1 slot assigned\n");
|
"1 slot assigned\n");
|
||||||
|
|
Loading…
Reference in New Issue