diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-15 06:25:37 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-15 06:25:37 +0200 |
commit | 592e04ab6d19612ebde5f4a4b9c1cda67ad055db (patch) | |
tree | 810da935492a8cb4266829cc642e5809e0e9fe77 /src/gprs_bssgp_pcu.cpp | |
parent | 51ab134fa8e7f16b627a038ecbfa2051421261de (diff) |
multislot: Rework of handling control channel / polling
In order to send control blocks to MS and receive control blocks from MS
(polling), it is required to select one timeslot that the MS must be
able to send and receive. The allocation algorithm must take care of
selecting that slot.
Diffstat (limited to 'src/gprs_bssgp_pcu.cpp')
-rw-r--r-- | src/gprs_bssgp_pcu.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 5f967eef..fb298039 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -123,6 +123,9 @@ int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) tbf->llc_length = len; memset(&tbf->dir.dl, 0, sizeof(tbf->dir.dl)); /* reset rlc states */ + if (!tbf->ms_class && ms_class) + tbf->ms_class = ms_class; + tbf_update(tbf); gprs_rlcmac_trigger_downlink_assignment(tbf, 1, NULL); } else { /* the TBF exists, so we must write it in the queue */ @@ -131,17 +134,24 @@ int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) return -ENOMEM; memcpy(msgb_put(llc_msg, len), data, len); msgb_enqueue(&tbf->llc_queue, llc_msg); + /* set ms class for updating TBF */ + if (!tbf->ms_class && ms_class) + tbf->ms_class = ms_class; } } else { - uint8_t trx, ts, use_trx, first_ts; + uint8_t trx, ts, use_trx, first_ts, ta, ss; /* check for uplink data, so we copy our informations */ if ((tbf = tbf_by_tlli(tlli, GPRS_RLCMAC_UL_TBF))) { use_trx = tbf->trx; first_ts = tbf->first_ts; + ta = tbf->ta; + ss = 0; } else { use_trx = -1; first_ts = -1; + ta = 0; /* FIXME: initial TA */ + ss = 1; /* PCH assignment only allows one timeslot */ } // Create new TBF (any TRX) @@ -152,7 +162,8 @@ int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) return -EBUSY; } /* set number of downlink slots according to multislot class */ - tbf = tbf_alloc(GPRS_RLCMAC_DL_TBF, tfi, trx, ts, ms_class); + tbf = tbf_alloc(tbf, GPRS_RLCMAC_DL_TBF, tfi, trx, ts, ms_class, + ss); if (!tbf) { LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH ressource\n"); /* FIXME: send reject */ |