diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-13 14:46:03 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-13 14:46:03 +0200 |
commit | b0c7ea72c8157f1b8124bbe105aa05c46a77a005 (patch) | |
tree | dda9d26a9e6a8b12022a24bc3ae090b091cb2b97 /src/pcu_l1_if.cpp | |
parent | e266bd48aca6f5b7831eb7c44e4773e9884d4c56 (diff) |
Changed data structures for TBF and PDCH instances, to allow multislot
The new data structure is required to define slot/TFI assigment for MS
with multislot capability.
Now there are two lists for TBFs: uplink and downlink. It is possible to
have different TBFs with same TFI in the same direction, as long as they
are assigned on different timeslots.
See tbf.txt for description.
Note: This does not implement any multislot support. It defines the new
data structure. Currently only the first slot is assigned.
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r-- | src/pcu_l1_if.cpp | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index d0f2e325..a58a1221 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -182,8 +182,8 @@ static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind) switch (data_ind->sapi) { case PCU_IF_SAPI_PDTCH: - rc = gprs_rlcmac_rcv_block(data_ind->data, data_ind->len, - data_ind->fn); + rc = gprs_rlcmac_rcv_block(data_ind->trx_nr, data_ind->ts_nr, + data_ind->data, data_ind->len, data_ind->fn); break; default: LOGP(DL1IF, LOGL_ERROR, "Received PCU data indication with " @@ -265,7 +265,10 @@ bssgp_failed: bts->trx[trx].arfcn = info_ind->trx[trx].arfcn; for (ts = 0; ts < 8; ts++) { for (tfi = 0; tfi < 32; tfi++) { - tbf = bts->trx[trx].pdch[ts].tbf[tfi]; + tbf = bts->trx[trx].pdch[ts].ul_tbf[tfi]; + if (tbf) + tbf_free(tbf); + tbf = bts->trx[trx].pdch[ts].dl_tbf[tfi]; if (tbf) tbf_free(tbf); } @@ -369,9 +372,12 @@ bssgp_failed: if (bts->trx[trx].pdch[ts].enable) pcu_tx_act_req(trx, ts, 0); bts->trx[trx].pdch[ts].enable = 0; - /* kick all tbf FIXME: multislot */ + /* kick all TBF on slot */ for (tfi = 0; tfi < 32; tfi++) { - tbf = bts->trx[trx].pdch[ts].tbf[tfi]; + tbf = bts->trx[trx].pdch[ts].ul_tbf[tfi]; + if (tbf) + tbf_free(tbf); + tbf = bts->trx[trx].pdch[ts].dl_tbf[tfi]; if (tbf) tbf_free(tbf); } @@ -384,8 +390,6 @@ bssgp_failed: static int pcu_rx_time_ind(struct gsm_pcu_if_time_ind *time_ind) { - struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts; - int trx, ts, tfi; struct gprs_rlcmac_tbf *tbf; uint32_t elapsed; uint8_t fn13 = time_ind->fn % 13; @@ -400,19 +404,18 @@ static int pcu_rx_time_ind(struct gsm_pcu_if_time_ind *time_ind) set_current_fn(time_ind->fn); /* check for poll timeout */ - for (trx = 0; trx < 8; trx++) { - for (ts = 0; ts < 8; ts++) { - for (tfi = 0; tfi < 32; tfi++) { - tbf = bts->trx[trx].pdch[ts].tbf[tfi]; - if (!tbf) - continue; - if (tbf->poll_state != GPRS_RLCMAC_POLL_SCHED) - continue; - elapsed = (frame_number - tbf->poll_fn) - % 2715648; - if (elapsed >= 20 && elapsed < 200) - gprs_rlcmac_poll_timeout(tbf); - } + llist_for_each_entry(tbf, &gprs_rlcmac_ul_tbfs, list) { + if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED) { + elapsed = (frame_number - tbf->poll_fn) % 2715648; + if (elapsed >= 20 && elapsed < 200) + gprs_rlcmac_poll_timeout(tbf); + } + } + llist_for_each_entry(tbf, &gprs_rlcmac_dl_tbfs, list) { + if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED) { + elapsed = (frame_number - tbf->poll_fn) % 2715648; + if (elapsed >= 20 && elapsed < 200) + gprs_rlcmac_poll_timeout(tbf); } } |