aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/oml.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-04-19 20:19:21 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-19 20:19:21 +0200
commitbcd08888f9efbfa7c3e401ac0fbbb339059ff4b1 (patch)
tree5f85882705982324b3e796d1abb365a3e5ca023b /src/osmo-bts-sysmo/oml.c
parent9aa6d9496b4e0791c104ae711f0ccb7af7776e85 (diff)
add VTY command to manually alter transmit power
this allows for quick manual tx power changes from the VTY, particularly useful in type approval or other measurements.
Diffstat (limited to 'src/osmo-bts-sysmo/oml.c')
-rw-r--r--src/osmo-bts-sysmo/oml.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 8552887b..403a8e4f 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -762,8 +762,10 @@ static int chmod_modif_compl_cb(struct msgb *l1_msg, void *data)
&cc->cfgParams.setLogChParams.logChParams,
cc->cfgParams.setLogChParams.sapi);
break;
- case GsmL1_ConfigParamId_SetNbTsc:
case GsmL1_ConfigParamId_SetTxPowerLevel:
+ LOGPC(DL1C, LOGL_INFO, "setTxPower %f dBm\n",
+ cc->cfgParams.setTxPowerLevel.fTxPowerLevel);
+ break;
case GsmL1_ConfigParamId_SetCipheringParams:
switch (lchan->ciph_state) {
case LCHAN_CIPH_RX_REQ:
@@ -779,6 +781,7 @@ static int chmod_modif_compl_cb(struct msgb *l1_msg, void *data)
break;
}
break;
+ case GsmL1_ConfigParamId_SetNbTsc:
default:
LOGPC(DL1C, LOGL_INFO, "\n");
break;
@@ -827,6 +830,18 @@ static int tx_confreq_logchpar(struct gsm_lchan *lchan, uint8_t direction)
return l1if_req_compl(fl1h, msg, 0, chmod_modif_compl_cb, lchan);
}
+int l1if_set_txpower(struct femtol1_hdl *fl1h, float tx_power)
+{
+ struct msgb *msg = l1p_msgb_alloc();
+ GsmL1_MphConfigReq_t *conf_req;
+
+ conf_req = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConfigReq, fl1h);
+ conf_req->cfgParamId = GsmL1_ConfigParamId_SetTxPowerLevel;
+ conf_req->cfgParams.setTxPowerLevel.fTxPowerLevel = tx_power;
+
+ return l1if_req_compl(fl1h, msg, 0, NULL, NULL);
+}
+
const enum GsmL1_CipherId_t rsl2l1_ciph[] = {
[0] = GsmL1_CipherId_A50,
[1] = GsmL1_CipherId_A50,