diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-07-26 20:28:53 +0600 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2017-11-19 17:35:07 +0700 |
commit | 6c3ce20d758cff3b7867a32490ae38a1eaaf2e9d (patch) | |
tree | c2c718deb23b62b946ff981a66b54d5ad4222a0c /src | |
parent | 4fa6694006825376bac9299ebbd112b4ac1e16a6 (diff) |
host/trxcon/l1ctl.c: handle L1CTL_PARAM_REQ
Change-Id: I5c23520dc0f19147b41ad2e13681bf0a62e9facd
Diffstat (limited to 'src')
-rw-r--r-- | src/host/trxcon/l1ctl.c | 20 | ||||
-rw-r--r-- | src/host/trxcon/trx_if.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index cbe037ad..2c82e11a 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -633,6 +633,24 @@ exit: return rc; } +static int l1ctl_rx_param_req(struct l1ctl_link *l1l, struct msgb *msg) +{ + struct l1ctl_par_req *par_req; + struct l1ctl_info_ul *ul; + + ul = (struct l1ctl_info_ul *) msg->l1h; + par_req = (struct l1ctl_par_req *) ul->payload; + + LOGP(DL1C, LOGL_NOTICE, "Received L1CTL_PARAM_REQ " + "(ta=%d, tx_power=%u)\n", par_req->ta, par_req->tx_power); + + l1l->trx->ta = par_req->ta; + l1l->trx->tx_power = par_req->tx_power; + + msgb_free(msg); + return 0; +} + int l1ctl_rx_cb(struct l1ctl_link *l1l, struct msgb *msg) { struct l1ctl_hdr *l1h; @@ -659,6 +677,8 @@ int l1ctl_rx_cb(struct l1ctl_link *l1l, struct msgb *msg) return l1ctl_rx_dm_rel_req(l1l, msg); case L1CTL_DATA_REQ: return l1ctl_rx_data_req(l1l, msg); + case L1CTL_PARAM_REQ: + return l1ctl_rx_param_req(l1l, msg); default: LOGP(DL1C, LOGL_ERROR, "Unknown MSG: %u\n", l1h->msg_type); msgb_free(msg); diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h index 7278bc11..f09a2562 100644 --- a/src/host/trxcon/trx_if.h +++ b/src/host/trxcon/trx_if.h @@ -31,8 +31,10 @@ struct trx_instance { uint16_t pm_arfcn_start; uint16_t pm_arfcn_stop; uint16_t band_arfcn; + uint8_t tx_power; uint8_t bsic; uint8_t tsc; + int8_t ta; /* Scheduler stuff */ struct trx_sched sched; |