diff options
-rw-r--r-- | src/gprs_rlcmac_data.cpp | 2 | ||||
-rw-r--r-- | src/tbf.cpp | 7 | ||||
-rw-r--r-- | src/tbf.h | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp index ac83f571..32585938 100644 --- a/src/gprs_rlcmac_data.cpp +++ b/src/gprs_rlcmac_data.cpp @@ -1603,7 +1603,7 @@ int gprs_rlcmac_downlink_ack(struct gprs_rlcmac_bts *bts, memset(&tbf->dir.dl, 0, sizeof(tbf->dir.dl)); /* reset RLC states */ tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; /* keep TO flags */ tbf->state_flags &= ~(1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_update(bts, tbf); + tbf_update(tbf); gprs_rlcmac_trigger_downlink_assignment(bts, tbf, tbf, NULL); return 0; diff --git a/src/tbf.cpp b/src/tbf.cpp index a42a26c1..3a1ac456 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -71,7 +71,7 @@ static int tbf_append_data(struct gprs_rlcmac_tbf *tbf, tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; tbf->state_flags &= ~(1 << GPRS_RLCMAC_FLAG_CCCH); tbf_update_ms_class(tbf, ms_class); - tbf_update(bts, tbf); + tbf_update(tbf); gprs_rlcmac_trigger_downlink_assignment(bts, tbf, tbf, NULL); } else { /* the TBF exists, so we must write it in the queue @@ -299,10 +299,10 @@ void tbf_free(struct gprs_rlcmac_tbf *tbf) talloc_free(tbf); } -int tbf_update(struct gprs_rlcmac_bts *bts, - struct gprs_rlcmac_tbf *tbf) +int tbf_update(struct gprs_rlcmac_tbf *tbf) { struct gprs_rlcmac_tbf *ul_tbf = NULL; + gprs_rlcmac_bts *bts = tbf->bts->bts_data(); int rc; LOGP(DRLCMAC, LOGL_DEBUG, "********** TBF update **********\n"); @@ -497,6 +497,7 @@ next_diagram: if (!tbf) return NULL; + tbf->bts = bts->bts; #ifdef DEBUG_DIAGRAM tbf->diag = diagram_num; #endif @@ -195,6 +195,9 @@ struct gprs_rlcmac_tbf { /* these should become protected but only after gprs_rlcmac_data.c * stops to iterate over all tbf in its current form */ enum gprs_rlcmac_tbf_state state; + + /* store the BTS this TBF belongs to */ + BTS *bts; }; @@ -226,7 +229,7 @@ struct gprs_rlcmac_tbf *tbf_by_poll_fn(uint32_t fn, uint8_t trx, uint8_t ts); void tbf_free(struct gprs_rlcmac_tbf *tbf); -int tbf_update(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf); +int tbf_update(struct gprs_rlcmac_tbf *tbf); int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); |