aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-16 16:15:01 +0100
committerHarald Welte <laforge@gnumonks.org>2013-03-17 17:16:18 +0100
commit570b44b29bf1186448e2838a537e1c2e250585fe (patch)
tree929e4e5a4b592eba2f6efc771cb19bfea941c5d9
parent0b874b64ef36fb2abc87ed2c0ea52b6fa582fa4b (diff)
Add RSSI of data blocks to PCU interface0.2.00.2
This bumps the PCU API version to 5 and requires osmo-bts >= 0.2.0.
-rw-r--r--src/gprs_rlcmac.cpp4
-rw-r--r--src/gprs_rlcmac.h4
-rw-r--r--src/gprs_rlcmac_data.cpp2
-rw-r--r--src/pcu_l1_if.cpp7
-rw-r--r--src/pcu_l1_if.h2
-rw-r--r--src/pcuif_proto.h3
-rw-r--r--src/sysmo_l1_if.c3
7 files changed, 14 insertions, 11 deletions
diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp
index 8824fd58..ff4cbddb 100644
--- a/src/gprs_rlcmac.cpp
+++ b/src/gprs_rlcmac.cpp
@@ -1145,7 +1145,7 @@ void gprs_rlcmac_enqueue_block(bitvec *block, int len)
/* received RLC/MAC block from L1 */
int gprs_rlcmac_rcv_block(uint8_t trx, uint8_t ts, uint8_t *data, uint8_t len,
- uint32_t fn)
+ uint32_t fn, int8_t rssi)
{
unsigned payload = data[0] >> 6;
bitvec *block;
@@ -1154,7 +1154,7 @@ int gprs_rlcmac_rcv_block(uint8_t trx, uint8_t ts, uint8_t *data, uint8_t len,
switch (payload) {
case GPRS_RLCMAC_DATA_BLOCK:
rc = gprs_rlcmac_rcv_data_block_acknowledged(trx, ts, data,
- len);
+ len, rssi);
break;
case GPRS_RLCMAC_CONTROL_BLOCK:
block = bitvec_alloc(len);
diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h
index a25eeb35..67edca1a 100644
--- a/src/gprs_rlcmac.h
+++ b/src/gprs_rlcmac.h
@@ -320,7 +320,7 @@ enum gprs_rlcmac_block_type {
};
int gprs_rlcmac_rcv_block(uint8_t trx, uint8_t ts, uint8_t *data, uint8_t len,
- uint32_t fn);
+ uint32_t fn, int8_t rssi);
int write_immediate_assignment(bitvec * dest, uint8_t downlink, uint8_t ra,
uint32_t ref_fn, uint8_t ta, uint16_t arfcn, uint8_t ts, uint8_t tsc,
@@ -374,7 +374,7 @@ unsigned write_repeated_page_info(bitvec * dest, unsigned& wp, uint8_t len,
uint8_t *identity, uint8_t chan_needed);
int gprs_rlcmac_rcv_data_block_acknowledged(uint8_t trx, uint8_t ts,
- uint8_t *data, uint8_t len);
+ uint8_t *data, uint8_t len, int8_t rssi);
struct msgb *gprs_rlcmac_send_data_block_acknowledged(
struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts);
diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp
index 77d5a8a1..e7b29723 100644
--- a/src/gprs_rlcmac_data.cpp
+++ b/src/gprs_rlcmac_data.cpp
@@ -805,7 +805,7 @@ struct msgb *gprs_rlcmac_send_uplink_ack(struct gprs_rlcmac_tbf *tbf,
* The blocks are defragmented and forwarded as LLC frames, if complete.
*/
int gprs_rlcmac_rcv_data_block_acknowledged(uint8_t trx, uint8_t ts,
- uint8_t *data, uint8_t len)
+ uint8_t *data, uint8_t len, int8_t rssi)
{
struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
struct gprs_rlcmac_tbf *tbf;
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 8d98c1ed..75071f27 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -197,9 +197,9 @@ static void pcu_l1if_tx_bcch(uint8_t *data, int len)
}
extern "C" int pcu_rx_data_ind_pdtch(uint8_t trx, uint8_t ts, uint8_t *data,
- uint8_t len, uint32_t fn)
+ uint8_t len, uint32_t fn, int8_t rssi)
{
- return gprs_rlcmac_rcv_block(trx, ts, data, len, fn);
+ return gprs_rlcmac_rcv_block(trx, ts, data, len, fn, rssi);
}
static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind)
@@ -214,7 +214,8 @@ static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind)
switch (data_ind->sapi) {
case PCU_IF_SAPI_PDTCH:
rc = pcu_rx_data_ind_pdtch(data_ind->trx_nr, data_ind->ts_nr,
- data_ind->data, data_ind->len, data_ind->fn);
+ data_ind->data, data_ind->len, data_ind->fn,
+ data_ind->rssi);
break;
default:
LOGP(DL1IF, LOGL_ERROR, "Received PCU data indication with "
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index 6b889e06..715f89fd 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -59,6 +59,6 @@ int pcu_rx_rts_req_pdtch(uint8_t trx, uint8_t ts, uint16_t arfcn,
extern "C"
#endif
int pcu_rx_data_ind_pdtch(uint8_t trx, uint8_t ts, uint8_t *data,
- uint8_t len, uint32_t fn);
+ uint8_t len, uint32_t fn, int8_t rssi);
#endif // PCU_L1_IF_H
diff --git a/src/pcuif_proto.h b/src/pcuif_proto.h
index c27bb7dc..9d740ac1 100644
--- a/src/pcuif_proto.h
+++ b/src/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/sysmo_l1_if.c b/src/sysmo_l1_if.c
index 2e1cb768..a3a59c97 100644
--- a/src/sysmo_l1_if.c
+++ b/src/sysmo_l1_if.c
@@ -190,7 +190,8 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1h,
pcu_rx_data_ind_pdtch((long)fl1h->priv, data_ind->u8Tn,
data_ind->msgUnitParam.u8Buffer + 1,
data_ind->msgUnitParam.u8Size - 1,
- data_ind->u32Fn);
+ data_ind->u32Fn,
+ (int8_t) (data_ind->measParam.fRssi));
break;
case GsmL1_Sapi_Ptcch:
// FIXME