This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgMax has submitted this change and it was merged. Change subject: TBF: move EGPRS enablement into (U|D)L-TBF ...................................................................... TBF: move EGPRS enablement into (U|D)L-TBF This is preparation patch for transition to separate UL/DL window variables instead of current shared generic window. The setting of window parameters is performed in functions specific to UL/DL TBFs but the general EGPRS flag remains the same and is set via the same function which is now marked as protected since it's only meant to be used by UL/DL subclasses. Related: OS#1759 Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579 --- M src/tbf.cpp M src/tbf.h 2 files changed, 15 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..98005dc 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -862,7 +862,6 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); - tbf->m_window.set_sns(RLC_EGPRS_SNS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); @@ -956,7 +955,6 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); - tbf->m_window.set_sns(RLC_EGPRS_SNS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); diff --git a/src/tbf.h b/src/tbf.h index 80249df..558bd21 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -210,7 +210,6 @@ /* EGPRS */ bool is_egprs_enabled() const; - void enable_egprs(); void disable_egprs(); /* attempt to make things a bit more fair */ @@ -286,7 +285,7 @@ protected: gprs_rlcmac_bts *bts_data() const; - + void enable_egprs(); int set_tlli_from_ul(uint32_t new_tlli); void merge_and_clear_ms(GprsMs *old_ms); @@ -416,7 +415,7 @@ gprs_rlcmac_dl_tbf(BTS *bts); void cleanup(); - + void enable_egprs(); /* dispatch Unitdata.DL messages */ static int handle(struct gprs_rlcmac_bts *bts, const uint32_t tlli, const uint32_t old_tlli, @@ -513,7 +512,7 @@ struct msgb *create_ul_ack(uint32_t fn, uint8_t ts); bool ctrl_ack_to_toggle(); bool handle_ctrl_ack(); - + void enable_egprs(); /* blocks were acked */ int rcv_data_block_acknowledged( const struct gprs_rlc_data_info *rlc, @@ -577,6 +576,18 @@ ((int)GPRS_RLCMAC_UL_TBF - (int)dir + (int)GPRS_RLCMAC_DL_TBF); } +inline void gprs_rlcmac_ul_tbf::enable_egprs() +{ + m_window.set_sns(RLC_EGPRS_SNS); + gprs_rlcmac_tbf::enable_egprs(); +} + +inline void gprs_rlcmac_dl_tbf::enable_egprs() +{ + m_window.set_sns(RLC_EGPRS_SNS); + gprs_rlcmac_tbf::enable_egprs(); +} + inline gprs_rlcmac_ul_tbf *as_ul_tbf(gprs_rlcmac_tbf *tbf) { if (tbf && tbf->direction == GPRS_RLCMAC_UL_TBF) -- To view, visit https://gerrit.osmocom.org/5335 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max <msuraev at sysmocom.de>