aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-17 16:33:11 +0100
committerHarald Welte <laforge@gnumonks.org>2013-03-17 17:11:58 +0100
commit6a32f0499fd5e5d5779abac8902017461cf2800a (patch)
tree467e9815d07fd79c56d658d53fbbf4bb1a6efb85
parenta5608d092db095f1043f7e471a938feb8b45f09d (diff)
Get RSSI from received uplink data and send to PCU0.2.0
This bumps the PCU API version and thus requires a new version of the code on the sysmoBTS side!
-rw-r--r--include/osmo-bts/pcu_if.h3
-rw-r--r--include/osmo-bts/pcuif_proto.h3
-rw-r--r--src/common/pcu_sock.c4
-rw-r--r--src/osmo-bts-sysmo/l1_if.c6
4 files changed, 11 insertions, 5 deletions
diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index d53fa5e..017de48 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -5,7 +5,8 @@ int pcu_tx_info_ind(void);
int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
uint16_t arfcn, uint8_t block_nr);
int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
- uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len);
+ uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
+ int8_t rssi);
int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint8_t ra, uint32_t fn);
int pcu_tx_time_ind(uint32_t fn);
int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index c27bb7d..9d740ac 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -1,7 +1,7 @@
#ifndef _PCUIF_PROTO_H
#define _PCUIF_PROTO_H
-#define PCU_IF_VERSION 0x04
+#define PCU_IF_VERSION 0x05
/* msg_type */
#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */
@@ -49,6 +49,7 @@ struct gsm_pcu_if_data {
uint8_t trx_nr;
uint8_t ts_nr;
uint8_t block_nr;
+ int8_t rssi;
} __attribute__ ((packed));
struct gsm_pcu_if_rts_req {
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 27d0f39..a90caac 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -315,7 +315,8 @@ int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
}
int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
- uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len)
+ uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
+ int8_t rssi)
{
struct msgb *msg;
struct gsm_pcu_if *pcu_prim;
@@ -338,6 +339,7 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
data_ind->trx_nr = ts->trx->nr;
data_ind->ts_nr = ts->nr;
data_ind->block_nr = block_nr;
+ data_ind->rssi = rssi;
memcpy(data_ind->data, data, len);
data_ind->len = len;
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index bdba4c2..d2aecd5 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -787,7 +787,8 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i
data_ind->u32Fn, data_ind->u16Arfcn,
data_ind->u8BlockNbr,
data_ind->msgUnitParam.u8Buffer + 1,
- data_ind->msgUnitParam.u8Size - 1);
+ data_ind->msgUnitParam.u8Size - 1,
+ (int8_t) (data_ind->measParam.fRssi));
break;
case GsmL1_Sapi_Ptcch:
/* PTCCH frame handling */
@@ -795,7 +796,8 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i
data_ind->u32Fn, data_ind->u16Arfcn,
data_ind->u8BlockNbr,
data_ind->msgUnitParam.u8Buffer,
- data_ind->msgUnitParam.u8Size);
+ data_ind->msgUnitParam.u8Size,
+ (int8_t) (data_ind->measParam.fRssi));
break;
default:
LOGP(DL1C, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n",