Adjust BTS model feature check

Rename gsm_bts_has_feature() -> gsm_btsmodel_has_feature() and adjust
type signature to match gsm_btsmodel_set_feature() function and avoid
confusion with upcoming functions to check/set BTS features reported
over OML.

Change-Id: I97abdedbef568e0c2fbd37c110f7d658cf20e100
Related: OS#1614
This commit is contained in:
Max 2017-05-30 15:03:38 +02:00
parent 8254cf75bf
commit 71d082bec7
3 changed files with 9 additions and 9 deletions

View File

@ -562,7 +562,7 @@ void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr,
uint8_t e1_ts, uint8_t e1_ts_ss);
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked);
int gsm_bts_has_feature(struct gsm_bts *bts, enum gsm_bts_features feat);
bool gsm_btsmodel_has_feature(struct gsm_bts_model *model, enum gsm_bts_features feat);
struct gsm_bts_trx *gsm_bts_trx_by_nr(struct gsm_bts *bts, int nr);
int gsm_bts_trx_set_system_infos(struct gsm_bts_trx *trx);
int gsm_bts_set_system_infos(struct gsm_bts *bts);

View File

@ -3607,7 +3607,7 @@ DEFUN(cfg_ts_tsc,
{
struct gsm_bts_trx_ts *ts = vty->index;
if (!gsm_bts_has_feature(ts->trx->bts, BTS_FEAT_MULTI_TSC)) {
if (!gsm_btsmodel_has_feature(ts->trx->bts->model, BTS_FEAT_MULTI_TSC)) {
vty_out(vty, "%% This BTS does not support a TSC != BCC, "
"falling back to BCC%s", VTY_NEWLINE);
ts->tsc = -1;
@ -3630,7 +3630,7 @@ DEFUN(cfg_ts_hopping,
struct gsm_bts_trx_ts *ts = vty->index;
int enabled = atoi(argv[0]);
if (enabled && !gsm_bts_has_feature(ts->trx->bts, BTS_FEAT_HOPPING)) {
if (enabled && !gsm_btsmodel_has_feature(ts->trx->bts->model, BTS_FEAT_HOPPING)) {
vty_out(vty, "BTS model does not support hopping%s",
VTY_NEWLINE);
return CMD_WARNING;

View File

@ -199,11 +199,11 @@ const char *bts_gprs_mode_name(enum bts_gprs_mode mode)
int bts_gprs_mode_is_compat(struct gsm_bts *bts, enum bts_gprs_mode mode)
{
if (mode != BTS_GPRS_NONE &&
!gsm_bts_has_feature(bts, BTS_FEAT_GPRS)) {
!gsm_btsmodel_has_feature(bts->model, BTS_FEAT_GPRS)) {
return 0;
}
if (mode == BTS_GPRS_EGPRS &&
!gsm_bts_has_feature(bts, BTS_FEAT_EGPRS)) {
!gsm_btsmodel_has_feature(bts->model, BTS_FEAT_EGPRS)) {
return 0;
}
@ -223,14 +223,14 @@ struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan)
return meas_rep;
}
int gsm_btsmodel_set_feature(struct gsm_bts_model *bts, enum gsm_bts_features feat)
int gsm_btsmodel_set_feature(struct gsm_bts_model *model, enum gsm_bts_features feat)
{
return bitvec_set_bit_pos(&bts->features, feat, 1);
return bitvec_set_bit_pos(&model->features, feat, 1);
}
int gsm_bts_has_feature(struct gsm_bts *bts, enum gsm_bts_features feat)
bool gsm_btsmodel_has_feature(struct gsm_bts_model *model, enum gsm_bts_features feat)
{
return bitvec_get_bit_pos(&bts->model->features, feat);
return bitvec_get_bit_pos(&model->features, feat);
}
int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type)