diff options
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r-- | openbsc/include/openbsc/Makefile.am | 2 | ||||
-rw-r--r-- | openbsc/include/openbsc/debug.h | 1 | ||||
-rw-r--r-- | openbsc/include/openbsc/gsm_data_shared.h | 4 | ||||
-rw-r--r-- | openbsc/include/openbsc/pcu_if.h | 47 |
4 files changed, 43 insertions, 11 deletions
diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 5737a4bb1..9d842efb3 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -62,6 +62,8 @@ noinst_HEADERS = \ osmo_msc_data.h \ osmux.h \ paging.h \ + pcu_if.h \ + pcuif_proto.h \ rest_octets.h \ rrlp.h \ rs232.h \ diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h index ca3d4ad0d..8c0f3fa98 100644 --- a/openbsc/include/openbsc/debug.h +++ b/openbsc/include/openbsc/debug.h @@ -38,6 +38,7 @@ enum { DRANAP, DSUA, DV42BIS, + DPCU, Debug_LastEntry, }; diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 5fd7f5d29..6dfa7218e 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -43,6 +43,7 @@ enum gsm_chreq_reason_t { GSM_CHREQ_REASON_PAG, GSM_CHREQ_REASON_CALL, GSM_CHREQ_REASON_LOCATION_UPD, + GSM_CHREQ_REASON_PBCH, GSM_CHREQ_REASON_OTHER, }; @@ -832,6 +833,9 @@ struct gsm_bts { struct amr_multirate_conf mr_full; struct amr_multirate_conf mr_half; + /* PCU socket state */ + struct pcu_sock_state *pcu_state; + #endif /* ROLE_BSC */ void *role; }; diff --git a/openbsc/include/openbsc/pcu_if.h b/openbsc/include/openbsc/pcu_if.h index a020c050b..604d00636 100644 --- a/openbsc/include/openbsc/pcu_if.h +++ b/openbsc/include/openbsc/pcu_if.h @@ -3,23 +3,48 @@ #define PCU_SOCK_DEFAULT "/tmp/pcu_bts" +#include <osmocom/gsm/l1sap.h> + extern int pcu_direct; -int pcu_tx_info_ind(void); -int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, +struct pcu_sock_state { + struct gsm_network *net; + struct osmo_fd listen_bfd; /* fd for listen socket */ + struct osmo_fd conn_bfd; /* fd for connection to lcr */ + struct llist_head upqueue; /* queue for sending messages */ +}; + +/* PCU relevant information has changed; Inform PCU (if connected) */ +void pcu_info_update(struct gsm_bts *bts); + +/* Forward rach indication to PCU */ +int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, + uint8_t is_11bit, enum ph_burst_type burst_type); + +/* Forward timing intformation (frame number) to PCU */ +int pcu_tx_time_ind(struct gsm_bts *bts, uint32_t fn); + + +int pcu_tx_rts_req(struct gsm_bts *bts, 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, +int pcu_tx_data_ind(struct gsm_bts *bts, 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, int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual); -int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, - uint8_t is_11bit, enum ph_burst_type burst_type); -int pcu_tx_time_ind(uint32_t fn); -int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed); -int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len); -int pcu_sock_init(const char *path); -void pcu_sock_exit(void); -bool pcu_connected(void); + + + +int pcu_tx_pag_req(struct gsm_bts *bts, const uint8_t *identity_lv, uint8_t chan_needed); +int pcu_tx_pch_data_cnf(struct gsm_bts *bts, uint32_t fn, uint8_t *data, uint8_t len); + +/* Open connection to PCU */ +int pcu_sock_init(const char *path, struct gsm_bts *bts); + +/* Close connection to PCU */ +void pcu_sock_exit(struct gsm_bts *bts); + +/* Check if BTS has a PCU connection */ +bool pcu_connected(struct gsm_bts *bts); #endif /* _PCU_IF_H */ |