aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
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/common/oml.c
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/common/oml.c')
-rw-r--r--src/common/oml.c12
1 files changed, 6 insertions, 6 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 */