aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gprs_rlcmac.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp
index f482653e..4dc1fd1e 100644
--- a/src/gprs_rlcmac.cpp
+++ b/src/gprs_rlcmac.cpp
@@ -327,9 +327,8 @@ int tbf_dl_establish(struct gprs_rlcmac_tbf *tbf, uint8_t *imsi)
else
{
// Downlink TBF Establishment on CCCH ( Immediate Assignment )
- gprs_rlcmac_downlink_assignment(tbf);
+ tbf_gsm_timer_start(tbf, 1, 0);
}
- tbf->state = FINISH_ESTABLISH;
break;
case PACCH_ESTABLISH:
// Downlink TBF Establishment on PACCH ( Packet Immediate Assignment )
@@ -537,7 +536,22 @@ static void tbf_gsm_timer_cb(void *_tbf)
tbf->num_fT_exp++;
switch (tbf->fT) {
+ case 1:
+ if (tbf_by_tlli(tbf->tlli, GPRS_RLCMAC_UL_TBF))
+ {
+ // Wait release of UL TBF
+ tbf_gsm_timer_start(tbf, 1, 10);
+ }
+ else
+ {
+ gprs_rlcmac_downlink_assignment(tbf);
+ // FIXME: Remove magic delay!
+ int delay = 50;
+ tbf_gsm_timer_start(tbf, 2, delay);
+ }
+ break;
case 2:
+ tbf->state = FINISH_ESTABLISH;
tbf_dl_data_transfer(tbf);
break;
default: