aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/common/rsl.c23
-rw-r--r--tests/stubs.c5
2 files changed, 28 insertions, 0 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 5082f2a..5a2befd 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1089,6 +1089,26 @@ static int rsl_rx_mode_modif(struct msgb *msg)
return rc;
}
+/* 8.4.15 MS POWER CONTROL */
+static int rsl_rx_ms_pwr_ctrl(struct msgb *msg)
+{
+ struct gsm_lchan *lchan = msg->lchan;
+ struct tlv_parsed tp;
+
+ rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg));
+ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER)) {
+ uint8_t pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F;
+ lchan->ms_power_ctrl.fixed = 1;
+ lchan->ms_power_ctrl.current = pwr;
+
+ LOGP(DRSL, LOGL_NOTICE, "%s forcing power to %d\n",
+ gsm_lchan_name(lchan), lchan->ms_power_ctrl.current);
+ bts_model_adjst_ms_pwr(lchan);
+ }
+
+ return 0;
+}
+
/* 8.4.20 SACCH INFO MODify */
static int rsl_rx_sacch_inf_mod(struct msgb *msg)
{
@@ -1750,6 +1770,9 @@ static int rsl_rx_dchan(struct gsm_bts_trx *trx, struct msgb *msg)
case RSL_MT_MODE_MODIFY_REQ:
ret = rsl_rx_mode_modif(msg);
break;
+ case RSL_MT_MS_POWER_CONTROL:
+ ret = rsl_rx_ms_pwr_ctrl(msg);
+ break;
case RSL_MT_PHY_CONTEXT_REQ:
case RSL_MT_PREPROC_CONFIG:
case RSL_MT_RTD_REP:
diff --git a/tests/stubs.c b/tests/stubs.c
index 99961aa..260172c 100644
--- a/tests/stubs.c
+++ b/tests/stubs.c
@@ -51,3 +51,8 @@ uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx)
int bts_model_oml_estab(struct gsm_bts *bts)
{ return 0; }
+
+
+
+int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan)
+{ return 0; } \ No newline at end of file