Move alpha,gamma fields from BTS to PCU
Change-Id: I2fdd9c8a7393157183fff64084bb10e2a3b1dc63
This commit is contained in:
parent
03de898d19
commit
a281495008
|
@ -200,7 +200,6 @@ static void bts_init(struct gprs_rlcmac_bts *bts, BTS* bts_obj)
|
|||
bts->n3101 = 10;
|
||||
bts->n3103 = 4;
|
||||
bts->n3105 = 8;
|
||||
bts->alpha = 0; /* a = 0.0 */
|
||||
bts->si13_is_set = false;
|
||||
bts->cs_adj_enabled = 1;
|
||||
bts->cs_adj_upper_limit = 33; /* Decrease CS if the error rate is above */
|
||||
|
@ -966,7 +965,7 @@ send_imm_ass_rej:
|
|||
plen = Encoding::write_immediate_assignment(
|
||||
&m_bts.trx[trx_no].pdch[ts_no], tbf, bv,
|
||||
false, rip->ra, Fn, ta, usf, false, sb_fn,
|
||||
m_bts.alpha, m_bts.gamma, -1,
|
||||
pcu->vty.alpha, pcu->vty.gamma, -1,
|
||||
rip->burst_type);
|
||||
do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_UL_TBF);
|
||||
}
|
||||
|
@ -1048,7 +1047,7 @@ void BTS::snd_dl_ass(gprs_rlcmac_tbf *tbf, bool poll, uint16_t pgroup)
|
|||
tbf, immediate_assignment, true, 125,
|
||||
(tbf->pdch[ts_no]->last_rts_fn + 21216) % GSM_MAX_FN,
|
||||
tbf->ta(), 7, poll, tbf->poll_fn,
|
||||
m_bts.alpha, m_bts.gamma, -1,
|
||||
pcu->vty.alpha, pcu->vty.gamma, -1,
|
||||
GSM_L1_BURST_TYPE_ACCESS_0);
|
||||
if (plen >= 0) {
|
||||
do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_DL_TBF);
|
||||
|
|
|
@ -106,7 +106,6 @@ struct gprs_rlcmac_bts {
|
|||
uint8_t n3105;
|
||||
struct gprs_rlcmac_trx trx[8];
|
||||
|
||||
uint8_t alpha, gamma;
|
||||
bool dl_tbf_preemptive_retransmission;
|
||||
uint8_t si13[GSM_MACBLOCK_LEN];
|
||||
bool si13_is_set;
|
||||
|
|
|
@ -50,6 +50,7 @@ struct gprs_pcu *gprs_pcu_alloc(void *ctx)
|
|||
pcu->vty.max_cs_dl = MAX_GPRS_CS;
|
||||
pcu->vty.max_mcs_ul = MAX_EDGE_MCS;
|
||||
pcu->vty.max_mcs_dl = MAX_EDGE_MCS;
|
||||
pcu->vty.alpha = 0; /* a = 0.0 */
|
||||
|
||||
pcu->T_defs = T_defs_pcu;
|
||||
osmo_tdefs_reset(pcu->T_defs);
|
||||
|
|
|
@ -75,6 +75,7 @@ struct gprs_pcu {
|
|||
uint8_t max_cs_dl, max_cs_ul;
|
||||
uint8_t max_mcs_dl, max_mcs_ul;
|
||||
uint8_t force_two_phase;
|
||||
uint8_t alpha, gamma;
|
||||
} vty;
|
||||
|
||||
struct gsmtap_inst *gsmtap;
|
||||
|
|
|
@ -229,8 +229,8 @@ static int config_write_pcu(struct vty *vty)
|
|||
vty_out(vty, " alloc-algorithm dynamic%s", VTY_NEWLINE);
|
||||
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);
|
||||
vty_out(vty, " alpha %d%s", the_pcu->vty.alpha, VTY_NEWLINE);
|
||||
vty_out(vty, " gamma %d%s", the_pcu->vty.gamma * 2, VTY_NEWLINE);
|
||||
if (!bts->dl_tbf_preemptive_retransmission)
|
||||
vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE);
|
||||
if (strcmp(the_pcu->pcu_sock_path, PCU_SOCK_DEFAULT))
|
||||
|
@ -804,10 +804,7 @@ DEFUN_ATTR(cfg_pcu_alpha,
|
|||
"Alpha in units of 0.1\n",
|
||||
CMD_ATTR_IMMEDIATE)
|
||||
{
|
||||
struct gprs_rlcmac_bts *bts = bts_main_data();
|
||||
|
||||
bts->alpha = atoi(argv[0]);
|
||||
|
||||
the_pcu->vty.alpha = atoi(argv[0]);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -818,10 +815,7 @@ DEFUN_ATTR(cfg_pcu_gamma,
|
|||
"Gamma in even unit of dBs\n",
|
||||
CMD_ATTR_IMMEDIATE)
|
||||
{
|
||||
struct gprs_rlcmac_bts *bts = bts_main_data();
|
||||
|
||||
bts->gamma = atoi(argv[0]) / 2;
|
||||
|
||||
the_pcu->vty.gamma = atoi(argv[0]) / 2;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -926,7 +926,7 @@ struct msgb *gprs_rlcmac_tbf::create_dl_ass(uint32_t fn, uint8_t ts)
|
|||
Encoding::write_packet_downlink_assignment(mac_control_block,
|
||||
old_tfi_is_valid, m_tfi, (direction == GPRS_RLCMAC_DL_TBF),
|
||||
new_dl_tbf, poll_ass_dl, rrbp,
|
||||
bts_data()->alpha, bts_data()->gamma, -1, 0,
|
||||
the_pcu->vty.alpha, the_pcu->vty.gamma, -1, 0,
|
||||
is_egprs_enabled());
|
||||
LOGP(DTBF, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++\n");
|
||||
rc = encode_gsm_rlcmac_downlink(&bv, mac_control_block);
|
||||
|
@ -1029,8 +1029,8 @@ struct msgb *gprs_rlcmac_tbf::create_ul_ass(uint32_t fn, uint8_t ts)
|
|||
mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t);
|
||||
Encoding::write_packet_uplink_assignment(mac_control_block, m_tfi,
|
||||
(direction == GPRS_RLCMAC_DL_TBF), tlli(),
|
||||
is_tlli_valid(), new_tbf, 1, rrbp, bts_data()->alpha,
|
||||
bts_data()->gamma, -1, is_egprs_enabled());
|
||||
is_tlli_valid(), new_tbf, 1, rrbp, the_pcu->vty.alpha,
|
||||
the_pcu->vty.gamma, -1, is_egprs_enabled());
|
||||
|
||||
LOGP(DTBF, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++\n");
|
||||
rc = encode_gsm_rlcmac_downlink(&bv, mac_control_block);
|
||||
|
|
|
@ -72,13 +72,13 @@ static void init_main_bts()
|
|||
bts->n3101 = 10;
|
||||
bts->n3103 = 4;
|
||||
bts->n3105 = 8;
|
||||
bts->alpha = 0; /* a = 0.0 */
|
||||
}
|
||||
|
||||
static void init_pcu(struct gprs_pcu *pcu)
|
||||
{
|
||||
if (!pcu->alloc_algorithm)
|
||||
pcu->alloc_algorithm = alloc_algorithm_b;
|
||||
pcu->vty.alpha = 0; /* a = 0.0 */
|
||||
}
|
||||
|
||||
static void bvci_unblocked(struct gprs_bssgp_pcu *pcu)
|
||||
|
|
Loading…
Reference in New Issue