2010-03-03 13:22:04 +00:00
|
|
|
#ifndef osmocom_l1ctl_h
|
|
|
|
#define osmocom_l1ctl_h
|
|
|
|
|
2011-04-26 00:55:30 +00:00
|
|
|
#include <osmocom/core/msgb.h>
|
2010-07-27 18:44:46 +00:00
|
|
|
#include <osmocom/bb/common/osmocom_data.h>
|
2010-03-03 13:22:04 +00:00
|
|
|
|
|
|
|
struct osmocom_ms;
|
|
|
|
|
|
|
|
/* Receive incoming data from L1 using L1CTL format */
|
|
|
|
int l1ctl_recv(struct osmocom_ms *ms, struct msgb *msg);
|
|
|
|
|
|
|
|
/* Transmit L1CTL_DATA_REQ */
|
2010-07-25 22:26:11 +00:00
|
|
|
int l1ctl_tx_data_req(struct osmocom_ms *ms, struct msgb *msg, uint8_t chan_nr,
|
2010-07-13 14:12:54 +00:00
|
|
|
uint8_t link_id);
|
|
|
|
|
|
|
|
/* Transmit L1CTL_PARAM_REQ */
|
2010-07-25 22:26:11 +00:00
|
|
|
int l1ctl_tx_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power);
|
2010-03-03 13:22:04 +00:00
|
|
|
|
2010-09-11 12:10:31 +00:00
|
|
|
int l1ctl_tx_crypto_req(struct osmocom_ms *ms, uint8_t algo, uint8_t *key,
|
|
|
|
uint8_t len);
|
|
|
|
|
2010-03-03 13:22:04 +00:00
|
|
|
/* Transmit L1CTL_RACH_REQ */
|
2010-10-30 15:30:59 +00:00
|
|
|
int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint16_t offset,
|
|
|
|
uint8_t combined);
|
2010-03-03 13:22:04 +00:00
|
|
|
|
|
|
|
/* Transmit L1CTL_DM_EST_REQ */
|
2010-07-25 22:26:11 +00:00
|
|
|
int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
|
2010-09-26 20:55:02 +00:00
|
|
|
uint8_t chan_nr, uint8_t tsc, uint8_t tch_mode);
|
2010-07-25 22:26:11 +00:00
|
|
|
int l1ctl_tx_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
|
2010-09-26 20:55:02 +00:00
|
|
|
uint16_t *ma, uint8_t ma_len, uint8_t chan_nr, uint8_t tsc,
|
|
|
|
uint8_t tch_mode);
|
2010-06-26 09:35:27 +00:00
|
|
|
|
2010-08-21 15:09:48 +00:00
|
|
|
/* Transmit L1CTL_DM_FREQ_REQ */
|
|
|
|
int l1ctl_tx_dm_freq_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
|
|
|
|
uint8_t tsc, uint16_t fn);
|
|
|
|
int l1ctl_tx_dm_freq_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
|
|
|
|
uint16_t *ma, uint8_t ma_len, uint8_t tsc, uint16_t fn);
|
|
|
|
|
2010-06-26 09:35:27 +00:00
|
|
|
/* Transmit L1CTL_DM_REL_REQ */
|
2010-07-25 22:26:11 +00:00
|
|
|
int l1ctl_tx_dm_rel_req(struct osmocom_ms *ms);
|
2010-06-26 09:35:27 +00:00
|
|
|
|
2010-05-19 19:41:24 +00:00
|
|
|
/* Transmit FBSB_REQ */
|
|
|
|
int l1ctl_tx_fbsb_req(struct osmocom_ms *ms, uint16_t arfcn,
|
2010-06-20 20:40:03 +00:00
|
|
|
uint8_t flags, uint16_t timeout, uint8_t sync_info_idx,
|
|
|
|
uint8_t ccch_mode);
|
|
|
|
|
2010-07-25 22:26:11 +00:00
|
|
|
/* Transmit CCCH_MODE_REQ */
|
2010-06-20 20:40:03 +00:00
|
|
|
int l1ctl_tx_ccch_mode_req(struct osmocom_ms *ms, uint8_t ccch_mode);
|
2010-03-03 13:22:04 +00:00
|
|
|
|
2010-09-26 17:06:06 +00:00
|
|
|
/* Transmit TCH_MODE_REQ */
|
|
|
|
int l1ctl_tx_tch_mode_req(struct osmocom_ms *ms, uint8_t tch_mode);
|
|
|
|
|
2010-07-25 22:26:11 +00:00
|
|
|
/* Transmit ECHO_REQ */
|
2010-03-27 04:32:10 +00:00
|
|
|
int l1ctl_tx_echo_req(struct osmocom_ms *ms, unsigned int len);
|
|
|
|
|
2010-06-26 11:12:25 +00:00
|
|
|
/* Transmit L1CTL_RESET_REQ */
|
|
|
|
int l1ctl_tx_reset_req(struct osmocom_ms *ms, uint8_t type);
|
|
|
|
|
2010-03-27 10:40:21 +00:00
|
|
|
/* Transmit L1CTL_PM_REQ */
|
|
|
|
int l1ctl_tx_pm_req_range(struct osmocom_ms *ms, uint16_t arfcn_from,
|
|
|
|
uint16_t arfcm_to);
|
|
|
|
|
2010-09-18 19:15:15 +00:00
|
|
|
int l1ctl_tx_sim_req(struct osmocom_ms *ms, uint8_t *data, uint16_t length);
|
|
|
|
|
2010-03-03 13:22:04 +00:00
|
|
|
#endif
|