flags: group BTS_INTERNAL_FLAG_* into an enum
Change-Id: I4c7d9f6dce61f7690b86c3973b13ddb63cdace04
This commit is contained in:
parent
fad8986f06
commit
11ec99d419
|
@ -53,24 +53,28 @@ enum gsm_bts_type_variant {
|
||||||
};
|
};
|
||||||
const char *btsvariant2str(enum gsm_bts_type_variant v);
|
const char *btsvariant2str(enum gsm_bts_type_variant v);
|
||||||
|
|
||||||
/* TODO: add a brief description of this flag */
|
enum bts_impl_flag {
|
||||||
#define BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP (1 << 0)
|
/* TODO: add a brief description of this flag */
|
||||||
/* When this flag is set then the measurement data is included in
|
BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP,
|
||||||
* (PRIM_PH_DATA) and struct ph_tch_param (PRIM_TCH). Otherwise the
|
/* When this flag is set then the measurement data is included in
|
||||||
* measurement data is passed using a separate MPH INFO MEAS IND.
|
* (PRIM_PH_DATA) and struct ph_tch_param (PRIM_TCH). Otherwise the
|
||||||
* (See also ticket: OS#2977) */
|
* measurement data is passed using a separate MPH INFO MEAS IND.
|
||||||
#define BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB (1 << 1)
|
* (See also ticket: OS#2977) */
|
||||||
/* Whether the BTS model requires RadioCarrier MO to be in Enabled state
|
BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB,
|
||||||
* (OPSTARTed) before OPSTARTing the RadioChannel MOs. See OS#5157 */
|
/* Whether the BTS model requires RadioCarrier MO to be in Enabled state
|
||||||
#define BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER (1 << 2)
|
* (OPSTARTed) before OPSTARTing the RadioChannel MOs. See OS#5157 */
|
||||||
/* Whether the BTS model reports interference measurements to L1SAP. */
|
BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER,
|
||||||
#define BTS_INTERNAL_FLAG_INTERF_MEAS (1 << 3)
|
/* Whether the BTS model reports interference measurements to L1SAP. */
|
||||||
|
BTS_INTERNAL_FLAG_INTERF_MEAS,
|
||||||
|
|
||||||
|
_BTS_INTERNAL_FLAG_NUM, /* must be at the end */
|
||||||
|
};
|
||||||
|
|
||||||
/* BTS implementation flags (internal use, not exposed via OML) */
|
/* BTS implementation flags (internal use, not exposed via OML) */
|
||||||
#define bts_internal_flag_get(bts, flag) \
|
#define bts_internal_flag_get(bts, flag) \
|
||||||
((bts->flags & (typeof(bts->flags)) flag) != 0)
|
((bts->flags & (typeof(bts->flags))(1 << flag)) != 0)
|
||||||
#define bts_internal_flag_set(bts, flag) \
|
#define bts_internal_flag_set(bts, flag) \
|
||||||
bts->flags |= (typeof(bts->flags)) flag
|
bts->flags |= (typeof(bts->flags))(1 << flag)
|
||||||
|
|
||||||
struct gprs_rlc_cfg {
|
struct gprs_rlc_cfg {
|
||||||
uint16_t parameter[_NUM_RLC_PAR];
|
uint16_t parameter[_NUM_RLC_PAR];
|
||||||
|
|
|
@ -1228,10 +1228,10 @@ static void bts_dump_vty_features(struct vty *vty, const struct gsm_bts *bts)
|
||||||
|
|
||||||
vty_out(vty, " BTS model specific (internal) flags:%s", VTY_NEWLINE);
|
vty_out(vty, " BTS model specific (internal) flags:%s", VTY_NEWLINE);
|
||||||
|
|
||||||
for (i = 0, no_features = true; i < sizeof(bts->flags) * 8; i++) {
|
for (i = 0, no_features = true; i < _BTS_INTERNAL_FLAG_NUM; i++) {
|
||||||
if (bts_internal_flag_get(bts, (1 << i))) {
|
if (bts_internal_flag_get(bts, i)) {
|
||||||
vty_out(vty, " %03u ", i);
|
vty_out(vty, " %03u ", i);
|
||||||
vty_out(vty, "%-40s%s", get_value_string(bts_impl_flag_desc, (1 << i)), VTY_NEWLINE);
|
vty_out(vty, "%-40s%s", get_value_string(bts_impl_flag_desc, i), VTY_NEWLINE);
|
||||||
no_features = false;
|
no_features = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue