diff options
author | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2012-06-26 19:33:44 +0400 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2012-06-26 19:33:44 +0400 |
commit | d78ee736239414021fde8010179f42b86464a238 (patch) | |
tree | 787ac141f86ba7ca2efd1ecb9d1a07506b145551 /src/gprs_rlcmac.cpp | |
parent | cf7b3a529fe35e1cac38baa1cdcb9e88899fc694 (diff) |
Fixed Downlink TBF Establishment on CCCH.
UL TBF should be released before DL TBF establishment on CCCH.
Added delay after transmitting Immediate Assignment.
Diffstat (limited to 'src/gprs_rlcmac.cpp')
-rw-r--r-- | src/gprs_rlcmac.cpp | 18 |
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: |