tbf: Implement enable_egprs() once
There's no real need for having different copies of this method in each children. Furthermore, having the method implemented in the base class made me shoot my foot while trying to move this to the tbf constructor (see next commit), so let's simplify this and avoid other people following into the same issue. enable_egprs() in tbf.h is moved to be public since it needed (as it was for the duplicated children mehtods with same name), but anyway it will be moved to private in next commit. Change-Id: Id7de060318201a42e51f277f898463f4b9a84eba
This commit is contained in:
parent
b3f239785c
commit
7bde60f260
|
@ -263,6 +263,7 @@ struct gprs_rlcmac_tbf {
|
|||
/* EGPRS */
|
||||
bool is_egprs_enabled() const;
|
||||
void disable_egprs();
|
||||
void enable_egprs();
|
||||
|
||||
/* attempt to make things a bit more fair */
|
||||
void rotate_in_list();
|
||||
|
@ -322,7 +323,6 @@ struct gprs_rlcmac_tbf {
|
|||
|
||||
protected:
|
||||
gprs_rlcmac_bts *bts_data() const;
|
||||
void enable_egprs();
|
||||
void merge_and_clear_ms(GprsMs *old_ms);
|
||||
|
||||
gprs_llc_queue *llc_queue();
|
||||
|
@ -581,6 +581,7 @@ inline bool gprs_rlcmac_tbf::is_egprs_enabled() const
|
|||
inline void gprs_rlcmac_tbf::enable_egprs()
|
||||
{
|
||||
m_egprs_enabled = true;
|
||||
window()->set_sns(RLC_EGPRS_SNS);
|
||||
}
|
||||
|
||||
inline void gprs_rlcmac_tbf::disable_egprs()
|
||||
|
|
|
@ -42,7 +42,6 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
|
|||
gprs_rlcmac_dl_tbf(BTS *bts);
|
||||
gprs_rlc_window *window();
|
||||
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,
|
||||
|
@ -143,12 +142,6 @@ inline uint16_t gprs_rlcmac_dl_tbf::window_size() const
|
|||
return m_window.ws();
|
||||
}
|
||||
|
||||
inline void gprs_rlcmac_dl_tbf::enable_egprs()
|
||||
{
|
||||
m_window.set_sns(RLC_EGPRS_SNS);
|
||||
gprs_rlcmac_tbf::enable_egprs();
|
||||
}
|
||||
|
||||
inline gprs_rlcmac_dl_tbf *as_dl_tbf(gprs_rlcmac_tbf *tbf)
|
||||
{
|
||||
if (tbf && tbf->direction == GPRS_RLCMAC_DL_TBF)
|
||||
|
|
|
@ -55,7 +55,6 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
|
|||
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,
|
||||
|
@ -123,12 +122,6 @@ inline uint16_t gprs_rlcmac_ul_tbf::window_size() const
|
|||
return m_window.ws();
|
||||
}
|
||||
|
||||
inline void gprs_rlcmac_ul_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)
|
||||
|
|
Loading…
Reference in New Issue