Pass gprc_rlcmac_pdch to tbf_set_polling
Change-Id: I5ecc57c72e7f60e31e64e76e724d7a5a95968c40
This commit is contained in:
parent
fd74e79ab3
commit
5b7eeecac2
|
@ -202,7 +202,7 @@ static struct msgb *create_packet_cell_chg_continue(const struct nacc_fsm_ctx *c
|
|||
LOGP(DNACC, LOGL_DEBUG, "------------------------- TX : Packet Cell Change Continue -------------------------\n");
|
||||
rate_ctr_inc(rate_ctr_group_get_ctr(bts_rate_counters(ms->bts), CTR_PKT_CELL_CHG_CONTINUE));
|
||||
talloc_free(mac_control_block);
|
||||
tbf_set_polling(tbf, *new_poll_fn, data->pdch->ts_no, PDCH_ULC_POLL_CELL_CHG_CONTINUE);
|
||||
tbf_set_polling(tbf, data->pdch, *new_poll_fn, PDCH_ULC_POLL_CELL_CHG_CONTINUE);
|
||||
LOGPTBF(tbf, LOGL_DEBUG,
|
||||
"Scheduled 'Packet Cell Change Continue' polling on PACCH (FN=%d, TS=%d)\n",
|
||||
*new_poll_fn, data->pdch->ts_no);
|
||||
|
|
15
src/tbf.cpp
15
src/tbf.cpp
|
@ -458,14 +458,6 @@ void gprs_rlcmac_tbf::t_start(enum tbf_timers t, int T, const char *reason, bool
|
|||
osmo_timer_schedule(&Tarr[t], sec, microsec);
|
||||
}
|
||||
|
||||
void gprs_rlcmac_tbf::set_polling(uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason reason)
|
||||
{
|
||||
/* schedule polling */
|
||||
if (pdch_ulc_reserve_tbf_poll(trx->pdch[ts].ulc, new_poll_fn, this, reason) < 0)
|
||||
LOGPTBF(this, LOGL_ERROR, "Failed scheduling poll on PACCH (FN=%d, TS=%d)\n",
|
||||
new_poll_fn, ts);
|
||||
}
|
||||
|
||||
void gprs_rlcmac_tbf::poll_timeout(struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason)
|
||||
{
|
||||
gprs_rlcmac_ul_tbf *ul_tbf;
|
||||
|
@ -843,9 +835,12 @@ int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcma
|
|||
return 0;
|
||||
}
|
||||
|
||||
void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason t)
|
||||
void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch, uint32_t new_poll_fn, enum pdch_ulc_tbf_poll_reason t)
|
||||
{
|
||||
return tbf->set_polling(new_poll_fn, ts, t);
|
||||
/* schedule polling */
|
||||
if (pdch_ulc_reserve_tbf_poll(pdch->ulc, new_poll_fn, tbf, t) < 0)
|
||||
LOGPTBF(tbf, LOGL_ERROR, "FN=%u Failed scheduling poll on PACCH %s\n",
|
||||
new_poll_fn, pdch_name(pdch));
|
||||
}
|
||||
|
||||
void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason)
|
||||
|
|
|
@ -140,7 +140,7 @@ uint8_t tbf_tfi(const struct gprs_rlcmac_tbf *tbf);
|
|||
bool tbf_is_egprs_enabled(const struct gprs_rlcmac_tbf *tbf);
|
||||
void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf);
|
||||
int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch, uint32_t fn, uint32_t *poll_fn, unsigned int *rrbp);
|
||||
void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason t);
|
||||
void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch, uint32_t new_poll_fn, enum pdch_ulc_tbf_poll_reason t);
|
||||
void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason);
|
||||
void tbf_update_state_fsm_name(struct gprs_rlcmac_tbf *tbf);
|
||||
const char* tbf_rlcmac_diag(const struct gprs_rlcmac_tbf *tbf);
|
||||
|
@ -188,7 +188,6 @@ struct gprs_rlcmac_tbf {
|
|||
void t_stop(enum tbf_timers t, const char *reason);
|
||||
void t_start(enum tbf_timers t, int T, const char *reason, bool force,
|
||||
const char *file, unsigned line);
|
||||
void set_polling(uint32_t poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason reason);
|
||||
void poll_timeout(struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason);
|
||||
|
||||
/** tlli handling */
|
||||
|
|
|
@ -805,7 +805,7 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
|
|||
|
||||
rc = tbf_check_polling(this, pdch, fn, &new_poll_fn, &rrbp);
|
||||
if (rc >= 0) {
|
||||
set_polling(new_poll_fn, pdch->ts_no, PDCH_ULC_POLL_DL_ACK);
|
||||
tbf_set_polling(this, pdch, new_poll_fn, PDCH_ULC_POLL_DL_ACK);
|
||||
LOGPTBFDL(this, LOGL_DEBUG,
|
||||
"Scheduled DL Acknowledgement polling on PACCH (FN=%d, TS=%d)\n",
|
||||
new_poll_fn, pdch->ts_no);
|
||||
|
|
|
@ -113,7 +113,7 @@ struct msgb *create_packet_dl_assign(const struct tbf_dl_ass_fsm_ctx *ctx,
|
|||
LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n");
|
||||
bts_do_rate_ctr_inc(ms->bts, CTR_PKT_DL_ASSIGNMENT);
|
||||
|
||||
tbf_set_polling(ctx->tbf, new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_DL_ASS);
|
||||
tbf_set_polling(ctx->tbf, d->pdch, new_poll_fn, PDCH_ULC_POLL_DL_ASS);
|
||||
LOGPTBF(ctx->tbf, LOGL_INFO, "Scheduled DL Assignment polling on PACCH (FN=%d, TS=%d)\n",
|
||||
new_poll_fn, d->pdch->ts_no);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ static struct msgb *create_ul_ack_nack(const struct tbf_ul_ack_fsm_ctx *ctx,
|
|||
osmo_fsm_inst_dispatch(tbf_state_fi(ul_tbf_as_tbf(ctx->tbf)), TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS, NULL);
|
||||
|
||||
if (final) {
|
||||
tbf_set_polling(ul_tbf_as_tbf(tbf), new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_UL_ACK);
|
||||
tbf_set_polling(ul_tbf_as_tbf(tbf), d->pdch, new_poll_fn, PDCH_ULC_POLL_UL_ACK);
|
||||
LOGPTBFUL(tbf, LOGL_DEBUG,
|
||||
"Scheduled UL Acknowledgement polling on PACCH (FN=%d, TS=%d)\n",
|
||||
new_poll_fn, d->pdch->ts_no);
|
||||
|
|
|
@ -128,7 +128,7 @@ struct msgb *create_packet_ul_assign(const struct tbf_ul_ass_fsm_ctx *ctx,
|
|||
LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Uplink Assignment -------------------------\n");
|
||||
bts_do_rate_ctr_inc(ms->bts, CTR_PKT_UL_ASSIGNMENT);
|
||||
|
||||
tbf_set_polling(ctx->tbf, new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_UL_ASS);
|
||||
tbf_set_polling(ctx->tbf, d->pdch, new_poll_fn, PDCH_ULC_POLL_UL_ASS);
|
||||
LOGPTBF(ctx->tbf, LOGL_INFO, "Scheduled UL Assignment polling on PACCH (FN=%d, TS=%d)\n",
|
||||
new_poll_fn, d->pdch->ts_no);
|
||||
|
||||
|
|
Loading…
Reference in New Issue