Add RSSI of data blocks to PCU interface
This bumps the PCU API version to 5 and requires osmo-bts >= 0.2.0.
This commit is contained in:
parent
0b874b64ef
commit
570b44b29b
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue