aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-14 00:24:15 +0700
committerfixeria <vyanitskiy@sysmocom.de>2020-09-17 15:45:48 +0000
commit0cd8df218429ee7e05d7dbcafbeabba2f26d4b98 (patch)
treec07685def72babc7fcfc0782670b7fd4ca8425a2 /src
parent9b6000c6fa9ccf71bb10dd8db4ff7f7b8a601d4a (diff)
gsm_data: rename hopping.{ma,ma_len} to hopping.arfcn_{list,num}
MA (Mobile Allocation) is actually a bit-mask indicating those ARFCNs of the Cell Allocation, which must be used as the hopping sequence. What we store in struct gsm_bts_trx_ts is the actual list of hopping channels, so let's name it properly and eliminate possible confusion. Change-Id: I677d66e428fa0fe119ebc37bc2a4e6cc05c251c4
Diffstat (limited to 'src')
-rw-r--r--src/common/oml.c12
-rw-r--r--src/osmo-bts-trx/scheduler_trx.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 78d9c65a..14fc80f3 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -903,7 +903,7 @@ static int oml_rx_set_chan_attr(struct gsm_bts_trx_ts *ts, struct msgb *msg)
return oml_fom_ack_nack(msg, NM_NACK_ATTRLIST_INCONSISTENT);
}
- if (TLVP_LEN(&tp, NM_ATT_ARFCN_LIST) > sizeof(ts->hopping.ma)) {
+ if (TLVP_LEN(&tp, NM_ATT_ARFCN_LIST) > sizeof(ts->hopping.arfcn_list)) {
LOGPFOH(DOML, LOGL_ERROR, foh, "SET CHAN ATTR: ARFCN list is too long\n");
return oml_fom_ack_nack(msg, NM_NACK_ATTRLIST_INCONSISTENT);
} else if (TLVP_LEN(&tp, NM_ATT_ARFCN_LIST) % 2 != 0) {
@@ -915,9 +915,9 @@ static int oml_rx_set_chan_attr(struct gsm_bts_trx_ts *ts, struct msgb *msg)
ts->hopping.hsn = *TLVP_VAL(&tp, NM_ATT_HSN);
ts->hopping.maio = *TLVP_VAL(&tp, NM_ATT_MAIO);
- ts->hopping.ma_len = TLVP_LEN(&tp, NM_ATT_ARFCN_LIST) / sizeof(uint16_t);
- for (i = 0; i < ts->hopping.ma_len; i++)
- ts->hopping.ma[i] = osmo_load16be(TLVP_VAL(&tp, NM_ATT_ARFCN_LIST) + i * 2);
+ ts->hopping.arfcn_num = TLVP_LEN(&tp, NM_ATT_ARFCN_LIST) / sizeof(uint16_t);
+ for (i = 0; i < ts->hopping.arfcn_num; i++)
+ ts->hopping.arfcn_list[i] = osmo_load16be(TLVP_VAL(&tp, NM_ATT_ARFCN_LIST) + i * 2);
}
/* 9.4.52 Starting Time */
@@ -968,8 +968,8 @@ static int oml_rx_set_chan_attr(struct gsm_bts_trx_ts *ts, struct msgb *msg)
LOGPFOH(DOML, LOGL_INFO, foh, "SET CHAN ATTR (TSC=%u pchan=%s",
ts->tsc, gsm_pchan_name(ts->pchan));
if (ts->hopping.enabled)
- LOGPC(DOML, LOGL_INFO, " hsn=%u maio=%u ma_len=%u",
- ts->hopping.hsn, ts->hopping.maio, ts->hopping.ma_len);
+ LOGPC(DOML, LOGL_INFO, " hsn=%u maio=%u chan_num=%u",
+ ts->hopping.hsn, ts->hopping.maio, ts->hopping.arfcn_num);
LOGPC(DOML, LOGL_INFO, ")\n");
/* call into BTS driver to apply new attributes to hardware */
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index fd68f635..e79e674c 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -50,7 +50,7 @@
#define SCHED_FH_PARAMS_FMT "hsn=%u, maio=%u, ma_len=%u"
#define SCHED_FH_PARAMS_VALS(ts) \
- (ts)->hopping.hsn, (ts)->hopping.maio, (ts)->hopping.ma_len
+ (ts)->hopping.hsn, (ts)->hopping.maio, (ts)->hopping.arfcn_num
/* an IDLE burst returns nothing. on C0 it is replaced by dummy burst */
int tx_idle_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
@@ -77,7 +77,7 @@ static struct phy_instance *dlfh_route_br(const struct trx_dl_burst_req *br,
/* The "cache" may not be filled yet, lookup the transceiver */
llist_for_each_entry(trx, &ts->trx->bts->trx_list, list) {
- if (trx->arfcn == ts->hopping.ma[idx]) {
+ if (trx->arfcn == ts->hopping.arfcn_list[idx]) {
ts->fh_trx_list[idx] = trx;
return trx->role_bts.l1h;
}
@@ -188,7 +188,7 @@ static struct gsm_bts_trx *ulfh_route_bi(const struct trx_ul_burst_ind *bi,
if (!ts->hopping.enabled)
continue;
- arfcn = gsm0502_hop_seq_gen(&time, SCHED_FH_PARAMS_VALS(ts), ts->hopping.ma);
+ arfcn = gsm0502_hop_seq_gen(&time, SCHED_FH_PARAMS_VALS(ts), ts->hopping.arfcn_list);
if (src_trx->arfcn == arfcn)
return trx;
}