aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-10-30 02:24:19 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-11-04 15:46:04 +0300
commite7144066324bec16ca1bda2c89292dc457bb5fd7 (patch)
treee67e35ca15076b77b4abbd5142fded7028b43df5 /src/common
parent81a4b3c0904dd52b4ffff69034a9ab19b5baf3f8 (diff)
measurement: pass *mr to repeated_dl_facch_active_decision()
Diffstat (limited to 'src/common')
-rw-r--r--src/common/measurement.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c
index 042f8b9a..c5d60b23 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -795,9 +795,8 @@ static inline bool ms_to_valid(const struct gsm_lchan *lchan)
/* Decide if repeated FACCH should be applied or not. If RXQUAL level, that the
* MS reports is high enough, FACCH repetition is not needed. */
static void repeated_dl_facch_active_decision(struct gsm_lchan *lchan,
- const struct gsm48_hdr *gh)
+ const struct gsm48_meas_res *meas_res)
{
- const struct gsm48_meas_res *meas_res;
uint8_t upper;
uint8_t lower;
uint8_t rxqual;
@@ -828,14 +827,8 @@ static void repeated_dl_facch_active_decision(struct gsm_lchan *lchan,
}
/* Parse MS measurement results */
- if (gh == NULL)
+ if (meas_res == NULL)
goto out;
- /* Check if this is a Measurement Report */
- if (gh->proto_discr != GSM48_PDISC_RR)
- goto out;
- if (gh->msg_type != GSM48_MT_RR_MEAS_REP)
- goto out;
- meas_res = (const struct gsm48_meas_res *) gh->data;
if (meas_res->meas_valid != 0) /* 0 = valid */
goto out;
@@ -964,7 +957,7 @@ void lchan_meas_handle_sacch(struct gsm_lchan *lchan, struct msgb *msg)
if (gh)
lchan_bs_pwr_ctrl(lchan, gh);
- repeated_dl_facch_active_decision(lchan, gh);
+ repeated_dl_facch_active_decision(lchan, mr);
/* Reset state for next iteration */
lchan->tch.dtx.dl_active = false;