bts-trx: Rename setpower TRXC functions to describe they use power attenuation

Change-Id: Iedbe8e76bce990c2330477157cd886a8fc22063c
This commit is contained in:
Pau Espin 2020-05-29 16:47:25 +02:00 committed by pespin
parent adf5d3aed2
commit c854ca14d5
3 changed files with 7 additions and 7 deletions

View File

@ -193,12 +193,12 @@ static void l1if_poweronoff_cb(struct trx_l1h *l1h, bool poweronoff, int rc)
}
}
static void l1if_setpower_cb(struct trx_l1h *l1h, int power_att_db, int rc)
static void l1if_setpower_att_cb(struct trx_l1h *l1h, int power_att_db, int rc)
{
struct phy_instance *pinst = l1h->phy_inst;
struct gsm_bts_trx *trx = pinst->trx;
LOGPPHI(pinst, DL1C, LOGL_DEBUG, "l1if_setpower_cb(power_att_db=%d, rc=%d)\n", power_att_db, rc);
LOGPPHI(pinst, DL1C, LOGL_DEBUG, "l1if_setpower_att_cb(power_att_db=%d, rc=%d)\n", power_att_db, rc);
power_trx_change_compl(trx, get_p_max_out_mdBm(trx) - to_mdB(power_att_db));
}
@ -818,7 +818,7 @@ int bts_model_change_power(struct gsm_bts_trx *trx, int p_trxout_mdBm)
struct phy_instance *pinst = trx_phy_instance(trx);
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
int power_att = (get_p_max_out_mdBm(trx) - p_trxout_mdBm) / 1000;
return trx_if_cmd_setpower(l1h, power_att, l1if_setpower_cb);
return trx_if_cmd_setpower_att(l1h, power_att, l1if_setpower_att_cb);
}
int bts_model_ts_disconnect(struct gsm_bts_trx_ts *ts)

View File

@ -303,7 +303,7 @@ int trx_if_cmd_setrxgain(struct trx_l1h *l1h, int db)
}
/*! Send "SETPOWER" command to TRX */
int trx_if_cmd_setpower(struct trx_l1h *l1h, int power_att_db, trx_if_cmd_setpower_cb *cb)
int trx_if_cmd_setpower_att(struct trx_l1h *l1h, int power_att_db, trx_if_cmd_setpower_att_cb *cb)
{
return trx_ctrl_cmd_cb(l1h, 0, cb, "SETPOWER", "%d", power_att_db);
}
@ -546,7 +546,7 @@ static int trx_ctrl_rx_rsp_setformat(struct trx_l1h *l1h,
static int trx_ctrl_rx_rsp_setpower(struct trx_l1h *l1h, struct trx_ctrl_rsp *rsp)
{
trx_if_cmd_setpower_cb *cb = (trx_if_cmd_setpower_cb*) rsp->cb;
trx_if_cmd_setpower_att_cb *cb = (trx_if_cmd_setpower_att_cb*) rsp->cb;
struct phy_instance *pinst = l1h->phy_inst;
int power_att;

View File

@ -15,7 +15,7 @@ struct trx_ctrl_msg {
typedef void trx_if_cmd_poweronoff_cb(struct trx_l1h *l1h, bool poweronoff, int rc);
typedef void trx_if_cmd_setslot_cb(struct trx_l1h *l1h, uint8_t tn, uint8_t type, int rc);
typedef void trx_if_cmd_setpower_cb(struct trx_l1h *l1h, int power_att_db, int rc);
typedef void trx_if_cmd_setpower_att_cb(struct trx_l1h *l1h, int power_att_db, int rc);
void trx_if_init(struct trx_l1h *l1h);
int trx_if_cmd_poweroff(struct trx_l1h *l1h, trx_if_cmd_poweronoff_cb *cb);
@ -23,7 +23,7 @@ int trx_if_cmd_poweron(struct trx_l1h *l1h, trx_if_cmd_poweronoff_cb *cb);
int trx_if_cmd_settsc(struct trx_l1h *l1h, uint8_t tsc);
int trx_if_cmd_setbsic(struct trx_l1h *l1h, uint8_t bsic);
int trx_if_cmd_setrxgain(struct trx_l1h *l1h, int db);
int trx_if_cmd_setpower(struct trx_l1h *l1h, int power_att_db, trx_if_cmd_setpower_cb *cb);
int trx_if_cmd_setpower_att(struct trx_l1h *l1h, int power_att_db, trx_if_cmd_setpower_att_cb *cb);
int trx_if_cmd_setmaxdly(struct trx_l1h *l1h, int dly);
int trx_if_cmd_setmaxdlynb(struct trx_l1h *l1h, int dly);
int trx_if_cmd_setslot(struct trx_l1h *l1h, uint8_t tn, uint8_t type, trx_if_cmd_setslot_cb *cb);