Move force_two_phase field from BTS to PCU

Change-Id: I68a6e032f725cde87992b99f039c5280e912faf7
changes/80/22180/3
Pau Espin 2 years ago committed by pespin
parent 924aaad4bc
commit 03de898d19
  1. 2
      src/bts.cpp
  2. 1
      src/bts.h
  3. 1
      src/gprs_pcu.h
  4. 12
      src/pcu_vty.c

@ -903,7 +903,7 @@ int BTS::rcv_rach(const struct rach_ind_params *rip)
if (chan_req.single_block)
LOGP(DRLCMAC, LOGL_DEBUG, "MS requests single block allocation\n");
else if (m_bts.force_two_phase) {
else if (pcu->vty.force_two_phase) {
LOGP(DRLCMAC, LOGL_DEBUG, "MS requests single block allocation, "
"but we force two phase access\n");
chan_req.single_block = true;

@ -106,7 +106,6 @@ struct gprs_rlcmac_bts {
uint8_t n3105;
struct gprs_rlcmac_trx trx[8];
uint8_t force_two_phase;
uint8_t alpha, gamma;
bool dl_tbf_preemptive_retransmission;
uint8_t si13[GSM_MACBLOCK_LEN];

@ -74,6 +74,7 @@ struct gprs_pcu {
bool force_initial_mcs; /* false=use from BTS true=use from VTY */
uint8_t max_cs_dl, max_cs_ul;
uint8_t max_mcs_dl, max_mcs_ul;
uint8_t force_two_phase;
} vty;
struct gsmtap_inst *gsmtap;

@ -227,7 +227,7 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, " alloc-algorithm b%s", VTY_NEWLINE);
if (the_pcu->alloc_algorithm == alloc_algorithm_dynamic)
vty_out(vty, " alloc-algorithm dynamic%s", VTY_NEWLINE);
if (bts->force_two_phase)
if (the_pcu->vty.force_two_phase)
vty_out(vty, " two-phase-access%s", VTY_NEWLINE);
vty_out(vty, " alpha %d%s", bts->alpha, VTY_NEWLINE);
vty_out(vty, " gamma %d%s", bts->gamma * 2, VTY_NEWLINE);
@ -782,10 +782,7 @@ DEFUN_ATTR(cfg_pcu_two_phase,
"Force two phase access when MS requests single phase access\n",
CMD_ATTR_IMMEDIATE)
{
struct gprs_rlcmac_bts *bts = bts_main_data();
bts->force_two_phase = 1;
the_pcu->vty.force_two_phase = 1;
return CMD_SUCCESS;
}
@ -795,10 +792,7 @@ DEFUN_ATTR(cfg_pcu_no_two_phase,
NO_STR "Only use two phase access when requested my MS\n",
CMD_ATTR_IMMEDIATE)
{
struct gprs_rlcmac_bts *bts = bts_main_data();
bts->force_two_phase = 0;
the_pcu->vty.force_two_phase = 0;
return CMD_SUCCESS;
}

Loading…
Cancel
Save