trxcon: use 'l1sched_' prefix for scheduler API

Change-Id: I370aa5084a4e3eb94168b96df94dbbee606adaab
Related: OS#5599, OS#3761
changes/46/28546/3
Vadim Yanitskiy 7 months ago
parent f73db50f6b
commit 38373ee20f
  1. 200
      src/host/trxcon/include/osmocom/bb/trxcon/sched_trx.h
  2. 18
      src/host/trxcon/include/osmocom/bb/trxcon/scheduler.h
  3. 6
      src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h
  4. 42
      src/host/trxcon/src/l1ctl.c
  5. 26
      src/host/trxcon/src/sched_clck.c
  6. 34
      src/host/trxcon/src/sched_lchan_common.c
  7. 198
      src/host/trxcon/src/sched_lchan_desc.c
  8. 36
      src/host/trxcon/src/sched_lchan_pdtch.c
  9. 30
      src/host/trxcon/src/sched_lchan_rach.c
  10. 10
      src/host/trxcon/src/sched_lchan_sch.c
  11. 52
      src/host/trxcon/src/sched_lchan_tchf.c
  12. 74
      src/host/trxcon/src/sched_lchan_tchh.c
  13. 40
      src/host/trxcon/src/sched_lchan_xcch.c
  14. 40
      src/host/trxcon/src/sched_mframe.c
  15. 96
      src/host/trxcon/src/sched_prim.c
  16. 208
      src/host/trxcon/src/sched_trx.c
  17. 10
      src/host/trxcon/src/trx_if.c
  18. 6
      src/host/trxcon/src/trxcon.c

@ -21,32 +21,32 @@
#define GPRS_L2_MAX_LEN 54
#define EDGE_L2_MAX_LEN 155
#define TRX_CH_LID_DEDIC 0x00
#define TRX_CH_LID_SACCH 0x40
#define L1SCHED_CH_LID_DEDIC 0x00
#define L1SCHED_CH_LID_SACCH 0x40
/* Osmocom-specific extension for PTCCH (see 3GPP TS 45.002, section 3.3.4.2).
* Shall be used to distinguish PTCCH and PDTCH channels on a PDCH time-slot. */
#define TRX_CH_LID_PTCCH 0x80
#define L1SCHED_CH_LID_PTCCH 0x80
/* Is a channel related to PDCH (GPRS) */
#define TRX_CH_FLAG_PDCH (1 << 0)
#define L1SCHED_CH_FLAG_PDCH (1 << 0)
/* Should a channel be activated automatically */
#define TRX_CH_FLAG_AUTO (1 << 1)
#define L1SCHED_CH_FLAG_AUTO (1 << 1)
/* Is continuous burst transmission assumed */
#define TRX_CH_FLAG_CBTX (1 << 2)
#define L1SCHED_CH_FLAG_CBTX (1 << 2)
#define MAX_A5_KEY_LEN (128 / 8)
#define TRX_TS_COUNT 8
/* Forward declaration to avoid mutual include */
struct trx_lchan_state;
struct trx_meas_set;
struct l1sched_lchan_state;
struct l1sched_meas_set;
struct trx_instance;
struct trx_ts;
struct l1sched_ts;
enum trx_burst_type {
TRX_BURST_GMSK,
TRX_BURST_8PSK,
enum l1sched_burst_type {
L1SCHED_BURST_GMSK,
L1SCHED_BURST_8PSK,
};
/**
@ -98,7 +98,7 @@ enum l1sched_lchan_type {
};
/* Represents a burst to be transmitted */
struct sched_burst_req {
struct l1sched_burst_req {
uint32_t fn;
uint8_t tn;
uint8_t pwr;
@ -110,16 +110,16 @@ struct sched_burst_req {
size_t burst_len;
};
typedef int trx_lchan_rx_func(struct trx_instance *trx,
struct trx_ts *ts, struct trx_lchan_state *lchan,
uint32_t fn, uint8_t bid, const sbit_t *bits,
const struct trx_meas_set *meas);
typedef int l1sched_lchan_rx_func(struct trx_instance *trx,
struct l1sched_ts *ts, struct l1sched_lchan_state *lchan,
uint32_t fn, uint8_t bid, const sbit_t *bits,
const struct l1sched_meas_set *meas);
typedef int trx_lchan_tx_func(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan,
struct sched_burst_req *br);
typedef int l1sched_lchan_tx_func(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan,
struct l1sched_burst_req *br);
struct trx_lchan_desc {
struct l1sched_lchan_desc {
/*! Human-readable name */
const char *name;
/*! Human-readable description */
@ -140,12 +140,12 @@ struct trx_lchan_desc {
uint8_t flags;
/*! Function to call when burst received from PHY */
trx_lchan_rx_func *rx_fn;
l1sched_lchan_rx_func *rx_fn;
/*! Function to call when data received from L2 */
trx_lchan_tx_func *tx_fn;
l1sched_lchan_tx_func *tx_fn;
};
struct trx_frame {
struct l1sched_tdma_frame {
/*! Downlink channel (slot) type */
enum l1sched_lchan_type dl_chan;
/*! Downlink block ID */
@ -156,7 +156,7 @@ struct trx_frame {
uint8_t ul_bid;
};
struct trx_multiframe {
struct l1sched_tdma_multiframe {
/*! Channel combination */
enum gsm_phys_chan_config chan_config;
/*! Human-readable name */
@ -168,10 +168,10 @@ struct trx_multiframe {
/*! Contains which lchans */
uint64_t lchan_mask;
/*! Pointer to scheduling structure */
const struct trx_frame *frames;
const struct l1sched_tdma_frame *frames;
};
struct trx_meas_set {
struct l1sched_meas_set {
/*! TDMA frame number of the first burst this set belongs to */
uint32_t fn;
/*! ToA256 (Timing of Arrival, 1/256 of a symbol) */
@ -181,13 +181,13 @@ struct trx_meas_set {
};
/* Simple ring buffer (up to 8 unique measurements) */
struct trx_lchan_meas_hist {
struct trx_meas_set buf[8];
struct trx_meas_set *head;
struct l1sched_lchan_meas_hist {
struct l1sched_meas_set buf[8];
struct l1sched_meas_set *head;
};
/* States each channel on a multiframe */
struct trx_lchan_state {
struct l1sched_lchan_state {
/*! Channel type */
enum l1sched_lchan_type type;
/*! Channel status */
@ -196,7 +196,7 @@ struct trx_lchan_state {
struct llist_head list;
/*! Burst type: GMSK or 8PSK */
enum trx_burst_type burst_type;
enum l1sched_burst_type burst_type;
/*! Mask of received bursts */
uint8_t rx_burst_mask;
/*! Mask of transmitted bursts */
@ -207,7 +207,7 @@ struct trx_lchan_state {
ubit_t *tx_bursts;
/*! A primitive being sent */
struct trx_ts_prim *prim;
struct l1sched_ts_prim *prim;
/*! Mode for TCH channels (see GSM48_CMODE_*) */
uint8_t tch_mode;
@ -218,9 +218,9 @@ struct trx_lchan_state {
uint8_t ul_facch_blocks;
/*! Downlink measurements history */
struct trx_lchan_meas_hist meas_hist;
struct l1sched_lchan_meas_hist meas_hist;
/*! AVG measurements of the last received block */
struct trx_meas_set meas_avg;
struct l1sched_meas_set meas_avg;
/*! TDMA loss detection state */
struct {
@ -272,15 +272,15 @@ struct trx_lchan_state {
} a5;
/* TS that this lchan belongs to */
struct trx_ts *ts;
struct l1sched_ts *ts;
};
struct trx_ts {
struct l1sched_ts {
/*! Timeslot index within a frame (0..7) */
uint8_t index;
/*! Pointer to multiframe layout */
const struct trx_multiframe *mf_layout;
const struct l1sched_tdma_multiframe *mf_layout;
/*! Channel states for logical channels */
struct llist_head lchans;
/*! Queue primitives for TX */
@ -289,8 +289,8 @@ struct trx_ts {
struct trx_instance *trx;
};
/* Represents one TX primitive in the queue of trx_ts */
struct trx_ts_prim {
/* Represents one TX primitive in the queue of l1sched_ts */
struct l1sched_ts_prim {
/*! Link to queue of TS */
struct llist_head list;
/*! Logical channel type */
@ -301,115 +301,115 @@ struct trx_ts_prim {
uint8_t payload[0];
};
extern const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX];
const struct trx_multiframe *sched_mframe_layout(
extern const struct l1sched_lchan_desc l1sched_lchan_desc[_L1SCHED_CHAN_MAX];
const struct l1sched_tdma_multiframe *l1sched_mframe_layout(
enum gsm_phys_chan_config config, int tn);
/* Scheduler management functions */
int sched_trx_init(struct trx_instance *trx, uint32_t fn_advance);
int sched_trx_reset(struct trx_instance *trx, bool reset_clock);
int sched_trx_shutdown(struct trx_instance *trx);
int l1sched_init(struct trx_instance *trx, uint32_t fn_advance);
int l1sched_reset(struct trx_instance *trx, bool reset_clock);
int l1sched_shutdown(struct trx_instance *trx);
/* Timeslot management functions */
struct trx_ts *sched_trx_add_ts(struct trx_instance *trx, int tn);
void sched_trx_del_ts(struct trx_instance *trx, int tn);
int sched_trx_reset_ts(struct trx_instance *trx, int tn);
int sched_trx_configure_ts(struct trx_instance *trx, int tn,
struct l1sched_ts *l1sched_add_ts(struct trx_instance *trx, int tn);
void l1sched_del_ts(struct trx_instance *trx, int tn);
int l1sched_reset_ts(struct trx_instance *trx, int tn);
int l1sched_configure_ts(struct trx_instance *trx, int tn,
enum gsm_phys_chan_config config);
int sched_trx_start_ciphering(struct trx_ts *ts, uint8_t algo,
int l1sched_start_ciphering(struct l1sched_ts *ts, uint8_t algo,
uint8_t *key, uint8_t key_len);
/* Logical channel management functions */
enum gsm_phys_chan_config sched_trx_chan_nr2pchan_config(uint8_t chan_nr);
enum l1sched_lchan_type sched_trx_chan_nr2lchan_type(uint8_t chan_nr,
enum gsm_phys_chan_config l1sched_chan_nr2pchan_config(uint8_t chan_nr);
enum l1sched_lchan_type l1sched_chan_nr2lchan_type(uint8_t chan_nr,
uint8_t link_id);
void sched_trx_deactivate_all_lchans(struct trx_ts *ts);
int sched_trx_set_lchans(struct trx_ts *ts, uint8_t chan_nr, int active, uint8_t tch_mode);
int sched_trx_activate_lchan(struct trx_ts *ts, enum l1sched_lchan_type chan);
int sched_trx_deactivate_lchan(struct trx_ts *ts, enum l1sched_lchan_type chan);
struct trx_lchan_state *sched_trx_find_lchan(struct trx_ts *ts,
void l1sched_deactivate_all_lchans(struct l1sched_ts *ts);
int l1sched_set_lchans(struct l1sched_ts *ts, uint8_t chan_nr, int active, uint8_t tch_mode);
int l1sched_activate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan);
int l1sched_deactivate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan);
struct l1sched_lchan_state *l1sched_find_lchan(struct l1sched_ts *ts,
enum l1sched_lchan_type chan);
/* Primitive management functions */
int sched_prim_init(void *ctx, struct trx_ts_prim **prim,
int l1sched_prim_init(void *ctx, struct l1sched_ts_prim **prim,
size_t pl_len, uint8_t chan_nr, uint8_t link_id);
int sched_prim_push(struct trx_instance *trx,
struct trx_ts_prim *prim, uint8_t chan_nr);
int l1sched_prim_push(struct trx_instance *trx,
struct l1sched_ts_prim *prim, uint8_t chan_nr);
#define TCH_MODE_IS_SPEECH(mode) \
#define L1SCHED_TCH_MODE_IS_SPEECH(mode) \
(mode == GSM48_CMODE_SPEECH_V1 \
|| mode == GSM48_CMODE_SPEECH_EFR \
|| mode == GSM48_CMODE_SPEECH_AMR)
#define TCH_MODE_IS_DATA(mode) \
#define L1SCHED_TCH_MODE_IS_DATA(mode) \
(mode == GSM48_CMODE_DATA_14k5 \
|| mode == GSM48_CMODE_DATA_12k0 \
|| mode == GSM48_CMODE_DATA_6k0 \
|| mode == GSM48_CMODE_DATA_3k6)
#define CHAN_IS_TCH(chan) \
#define L1SCHED_CHAN_IS_TCH(chan) \
(chan == L1SCHED_TCHF || chan == L1SCHED_TCHH_0 || chan == L1SCHED_TCHH_1)
#define CHAN_IS_SACCH(chan) \
(trx_lchan_desc[chan].link_id & TRX_CH_LID_SACCH)
#define L1SCHED_CHAN_IS_SACCH(chan) \
(l1sched_lchan_desc[chan].link_id & L1SCHED_CH_LID_SACCH)
/* FIXME: we need a better way to identify / distinguish primitives */
#define PRIM_IS_RACH11(prim) \
#define L1SCHED_PRIM_IS_RACH11(prim) \
(prim->payload_len == sizeof(struct l1ctl_ext_rach_req))
#define PRIM_IS_RACH8(prim) \
#define L1SCHED_PRIM_IS_RACH8(prim) \
(prim->payload_len == sizeof(struct l1ctl_rach_req))
#define PRIM_IS_RACH(prim) \
(PRIM_IS_RACH8(prim) || PRIM_IS_RACH11(prim))
#define L1SCHED_PRIM_IS_RACH(prim) \
(L1SCHED_PRIM_IS_RACH8(prim) || L1SCHED_PRIM_IS_RACH11(prim))
#define PRIM_IS_TCH(prim) \
(CHAN_IS_TCH(prim->chan) && prim->payload_len != GSM_MACBLOCK_LEN)
#define L1SCHED_PRIM_IS_TCH(prim) \
(L1SCHED_CHAN_IS_TCH(prim->chan) && prim->payload_len != GSM_MACBLOCK_LEN)
#define PRIM_IS_FACCH(prim) \
(CHAN_IS_TCH(prim->chan) && prim->payload_len == GSM_MACBLOCK_LEN)
#define L1SCHED_PRIM_IS_FACCH(prim) \
(L1SCHED_CHAN_IS_TCH(prim->chan) && prim->payload_len == GSM_MACBLOCK_LEN)
struct trx_ts_prim *sched_prim_dequeue(struct llist_head *queue,
uint32_t fn, struct trx_lchan_state *lchan);
int sched_prim_dummy(struct trx_lchan_state *lchan);
void sched_prim_drop(struct trx_lchan_state *lchan);
void sched_prim_flush_queue(struct llist_head *list);
struct l1sched_ts_prim *l1sched_prim_dequeue(struct llist_head *queue,
uint32_t fn, struct l1sched_lchan_state *lchan);
int l1sched_prim_dummy(struct l1sched_lchan_state *lchan);
void l1sched_prim_drop(struct l1sched_lchan_state *lchan);
void l1sched_prim_flush_queue(struct llist_head *list);
int sched_trx_handle_rx_burst(struct trx_instance *trx, uint8_t tn,
int l1sched_handle_rx_burst(struct trx_instance *trx, uint8_t tn,
uint32_t fn, sbit_t *bits, uint16_t nbits,
const struct trx_meas_set *meas);
const struct l1sched_meas_set *meas);
/* Shared declarations for lchan handlers */
extern const uint8_t sched_nb_training_bits[8][26];
extern const uint8_t l1sched_nb_training_bits[8][26];
const char *burst_mask2str(const uint8_t *mask, int bits);
size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan);
int sched_send_dt_ind(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint8_t *l2, size_t l2_len,
const char *l1sched_burst_mask2str(const uint8_t *mask, int bits);
size_t l1sched_bad_frame_ind(uint8_t *l2, struct l1sched_lchan_state *lchan);
int l1sched_send_dt_ind(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint8_t *l2, size_t l2_len,
int bit_error_count, bool dec_failed, bool traffic);
int sched_send_dt_conf(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, bool traffic);
int sched_gsmtap_send(enum l1sched_lchan_type lchan_type, uint32_t fn, uint8_t tn,
int l1sched_send_dt_conf(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint32_t fn, bool traffic);
int l1sched_gsmtap_send(enum l1sched_lchan_type lchan_type, uint32_t fn, uint8_t tn,
uint16_t band_arfcn, int8_t signal_dbm, uint8_t snr,
const uint8_t *data, size_t data_len);
/* Interleaved TCH/H block TDMA frame mapping */
uint32_t sched_tchh_block_dl_first_fn(enum l1sched_lchan_type chan,
uint32_t l1sched_tchh_block_dl_first_fn(enum l1sched_lchan_type chan,
uint32_t last_fn, bool facch);
bool sched_tchh_block_map_fn(enum l1sched_lchan_type chan,
bool l1sched_tchh_block_map_fn(enum l1sched_lchan_type chan,
uint32_t fn, bool ul, bool facch, bool start);
#define sched_tchh_traffic_start(chan, fn, ul) \
sched_tchh_block_map_fn(chan, fn, ul, 0, 1)
#define sched_tchh_traffic_end(chan, fn, ul) \
sched_tchh_block_map_fn(chan, fn, ul, 0, 0)
#define l1sched_tchh_traffic_start(chan, fn, ul) \
l1sched_tchh_block_map_fn(chan, fn, ul, 0, 1)
#define l1sched_tchh_traffic_end(chan, fn, ul) \
l1sched_tchh_block_map_fn(chan, fn, ul, 0, 0)
#define sched_tchh_facch_start(chan, fn, ul) \
sched_tchh_block_map_fn(chan, fn, ul, 1, 1)
#define sched_tchh_facch_end(chan, fn, ul) \
sched_tchh_block_map_fn(chan, fn, ul, 1, 0)
#define l1sched_tchh_facch_start(chan, fn, ul) \
l1sched_tchh_block_map_fn(chan, fn, ul, 1, 1)
#define l1sched_tchh_facch_end(chan, fn, ul) \
l1sched_tchh_block_map_fn(chan, fn, ul, 1, 0)
/* Measurement history */
void sched_trx_meas_push(struct trx_lchan_state *lchan, const struct trx_meas_set *meas);
void sched_trx_meas_avg(struct trx_lchan_state *lchan, unsigned int n);
void l1sched_lchan_meas_push(struct l1sched_lchan_state *lchan, const struct l1sched_meas_set *meas);
void l1sched_lchan_meas_avg(struct l1sched_lchan_state *lchan, unsigned int n);

@ -6,18 +6,18 @@
#include <osmocom/core/timer.h>
#include <osmocom/gsm/gsm0502.h>
enum tdma_sched_clck_state {
SCH_CLCK_STATE_WAIT,
SCH_CLCK_STATE_OK,
enum l1sched_clck_state {
L1SCHED_CLCK_ST_WAIT,
L1SCHED_CLCK_ST_OK,
};
/* Forward structure declaration */
struct trx_sched;
struct l1sched_state;
/*! One scheduler instance */
struct trx_sched {
struct l1sched_state {
/*! Clock state */
enum tdma_sched_clck_state state;
enum l1sched_clck_state state;
/*! Local clock source */
struct timespec clock;
/*! Count of processed frames */
@ -29,10 +29,10 @@ struct trx_sched {
/*! Frame callback timer */
struct osmo_timer_list clock_timer;
/*! Frame callback */
void (*clock_cb)(struct trx_sched *sched);
void (*clock_cb)(struct l1sched_state *sched);
/*! Private data (e.g. pointer to trx instance) */
void *data;
};
int sched_clck_handle(struct trx_sched *sched, uint32_t fn);
void sched_clck_reset(struct trx_sched *sched);
int l1sched_clck_handle(struct l1sched_state *sched, uint32_t fn);
void l1sched_clck_reset(struct l1sched_state *sched);

@ -43,8 +43,8 @@ struct trx_instance {
int8_t ta;
/* Scheduler stuff */
struct trx_sched sched;
struct trx_ts *ts_list[TRX_TS_COUNT];
struct l1sched_state sched;
struct l1sched_ts *ts_list[TRX_TS_COUNT];
/* Bind L1CTL link */
struct l1ctl_link *l1l;
@ -80,4 +80,4 @@ int trx_if_cmd_measure(struct trx_instance *trx,
uint16_t band_arfcn_start, uint16_t band_arfcn_stop);
int trx_if_tx_burst(struct trx_instance *trx,
const struct sched_burst_req *br);
const struct l1sched_burst_req *br);

@ -340,10 +340,10 @@ static int l1ctl_rx_fbsb_req(struct l1ctl_link *l1l, struct msgb *msg)
band_arfcn &~ ARFCN_FLAG_MASK);
/* Reset scheduler and clock counter */
sched_trx_reset(l1l->trx, true);
l1sched_reset(l1l->trx, true);
/* Configure a single timeslot */
sched_trx_configure_ts(l1l->trx, 0, ch_config);
l1sched_configure_ts(l1l->trx, 0, ch_config);
/* Ask SCH handler to send L1CTL_FBSB_CONF */
l1l->fbsb_conf_sent = false;
@ -430,7 +430,7 @@ static int l1ctl_rx_reset_req(struct l1ctl_link *l1l, struct msgb *msg)
/* Fall through */
case L1CTL_RES_T_SCHED:
sched_trx_reset(l1l->trx, true);
l1sched_reset(l1l->trx, true);
break;
default:
LOGP(DL1C, LOGL_ERROR, "Unknown L1CTL_RESET_REQ type\n");
@ -464,7 +464,7 @@ static int l1ctl_rx_ccch_mode_req(struct l1ctl_link *l1l, struct msgb *msg)
{
enum gsm_phys_chan_config ch_config;
struct l1ctl_ccch_mode_req *req;
struct trx_ts *ts;
struct l1sched_ts *ts;
int rc = 0;
req = (struct l1ctl_ccch_mode_req *) msg->l1h;
@ -491,7 +491,7 @@ static int l1ctl_rx_ccch_mode_req(struct l1ctl_link *l1l, struct msgb *msg)
/* Do nothing if the current mode matches required */
if (ts->mf_layout->chan_config != ch_config)
rc = sched_trx_configure_ts(l1l->trx, 0, ch_config);
rc = l1sched_configure_ts(l1l->trx, 0, ch_config);
/* Confirm reconfiguration */
if (!rc)
@ -507,7 +507,7 @@ static int l1ctl_rx_rach_req(struct l1ctl_link *l1l, struct msgb *msg, bool ext)
struct l1ctl_ext_rach_req *ext_req;
struct l1ctl_rach_req *req;
struct l1ctl_info_ul *ul;
struct trx_ts_prim *prim;
struct l1sched_ts_prim *prim;
size_t len;
int rc;
@ -541,7 +541,7 @@ static int l1ctl_rx_rach_req(struct l1ctl_link *l1l, struct msgb *msg, bool ext)
}
/* Init a new primitive */
rc = sched_prim_init(l1l->trx, &prim, len, ul->chan_nr, ul->link_id);
rc = l1sched_prim_init(l1l->trx, &prim, len, ul->chan_nr, ul->link_id);
if (rc)
goto exit;
@ -549,7 +549,7 @@ static int l1ctl_rx_rach_req(struct l1ctl_link *l1l, struct msgb *msg, bool ext)
* Push this primitive to the transmit queue.
* Indicated timeslot needs to be configured.
*/
rc = sched_prim_push(l1l->trx, prim, ul->chan_nr);
rc = l1sched_prim_push(l1l->trx, prim, ul->chan_nr);
if (rc) {
talloc_free(prim);
goto exit;
@ -628,7 +628,7 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg)
enum gsm_phys_chan_config config;
struct l1ctl_dm_est_req *est_req;
struct l1ctl_info_ul *ul;
struct trx_ts *ts;
struct l1sched_ts *ts;
uint8_t chan_nr, tn;
int rc;
@ -643,7 +643,7 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg)
tn, chan_nr, est_req->tsc, est_req->tch_mode);
/* Determine channel config */
config = sched_trx_chan_nr2pchan_config(chan_nr);
config = l1sched_chan_nr2pchan_config(chan_nr);
if (config == GSM_PCHAN_NONE) {
LOGP(DL1C, LOGL_ERROR, "Couldn't determine channel config\n");
rc = -EINVAL;
@ -662,7 +662,7 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg)
l1l->trx->tsc = est_req->tsc;
/* Configure requested TS */
rc = sched_trx_configure_ts(l1l->trx, tn, config);
rc = l1sched_configure_ts(l1l->trx, tn, config);
ts = l1l->trx->ts_list[tn];
if (rc) {
rc = -EINVAL;
@ -670,10 +670,10 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg)
}
/* Deactivate all lchans */
sched_trx_deactivate_all_lchans(ts);
l1sched_deactivate_all_lchans(ts);
/* Activate only requested lchans */
rc = sched_trx_set_lchans(ts, chan_nr, 1, est_req->tch_mode);
rc = l1sched_set_lchans(ts, chan_nr, 1, est_req->tch_mode);
if (rc) {
LOGP(DL1C, LOGL_ERROR, "Couldn't activate requested lchans\n");
rc = -EINVAL;
@ -690,7 +690,7 @@ static int l1ctl_rx_dm_rel_req(struct l1ctl_link *l1l, struct msgb *msg)
LOGP(DL1C, LOGL_NOTICE, "Received L1CTL_DM_REL_REQ, resetting scheduler\n");
/* Reset scheduler */
sched_trx_reset(l1l->trx, false);
l1sched_reset(l1l->trx, false);
msgb_free(msg);
return 0;
@ -703,7 +703,7 @@ static int l1ctl_rx_dt_req(struct l1ctl_link *l1l,
struct msgb *msg, bool traffic)
{
struct l1ctl_info_ul *ul;
struct trx_ts_prim *prim;
struct l1sched_ts_prim *prim;
uint8_t chan_nr, link_id;
size_t payload_len;
int rc;
@ -724,13 +724,13 @@ static int l1ctl_rx_dt_req(struct l1ctl_link *l1l,
chan_nr, link_id, payload_len);
/* Init a new primitive */
rc = sched_prim_init(l1l->trx, &prim, payload_len,
rc = l1sched_prim_init(l1l->trx, &prim, payload_len,
chan_nr, link_id);
if (rc)
goto exit;
/* Push this primitive to transmit queue */
rc = sched_prim_push(l1l->trx, prim, chan_nr);
rc = l1sched_prim_push(l1l->trx, prim, chan_nr);
if (rc) {
talloc_free(prim);
goto exit;
@ -770,8 +770,8 @@ static int l1ctl_rx_param_req(struct l1ctl_link *l1l, struct msgb *msg)
static int l1ctl_rx_tch_mode_req(struct l1ctl_link *l1l, struct msgb *msg)
{
struct l1ctl_tch_mode_req *req;
struct trx_lchan_state *lchan;
struct trx_ts *ts;
struct l1sched_lchan_state *lchan;
struct l1sched_ts *ts;
int i;
req = (struct l1ctl_tch_mode_req *) msg->l1h;
@ -814,7 +814,7 @@ static int l1ctl_rx_crypto_req(struct l1ctl_link *l1l, struct msgb *msg)
{
struct l1ctl_crypto_req *req;
struct l1ctl_info_ul *ul;
struct trx_ts *ts;
struct l1sched_ts *ts;
uint8_t tn;
int rc = 0;
@ -836,7 +836,7 @@ static int l1ctl_rx_crypto_req(struct l1ctl_link *l1l, struct msgb *msg)
}
/* Poke scheduler */
rc = sched_trx_start_ciphering(ts, req->algo, req->key, req->key_len);
rc = l1sched_start_ciphering(ts, req->algo, req->key, req->key_len);
if (rc) {
LOGP(DL1C, LOGL_ERROR, "Couldn't configure ciphering\n");
rc = -EINVAL;

@ -45,9 +45,9 @@
#define MAX_FN_SKEW 50
#define TRX_LOSS_FRAMES 400
static void sched_clck_tick(void *data)
static void l1sched_clck_tick(void *data)
{
struct trx_sched *sched = (struct trx_sched *) data;
struct l1sched_state *sched = (struct l1sched_state *) data;
struct timespec tv_now, *tv_clock, elapsed;
int64_t elapsed_us;
const struct timespec frame_duration = { .tv_sec = 0, .tv_nsec = GSM_TDMA_FN_DURATION_nS };
@ -55,7 +55,7 @@ static void sched_clck_tick(void *data)
/* Check if transceiver is still alive */
if (sched->fn_counter_lost++ == TRX_LOSS_FRAMES) {
LOGP(DSCH, LOGL_DEBUG, "No more clock from transceiver\n");
sched->state = SCH_CLCK_STATE_WAIT;
sched->state = L1SCHED_CLCK_ST_WAIT;
return;
}
@ -72,7 +72,7 @@ static void sched_clck_tick(void *data)
LOGP(DSCH, LOGL_NOTICE, "PC clock skew: "
"elapsed uS %" PRId64 "\n", elapsed_us);
sched->state = SCH_CLCK_STATE_WAIT;
sched->state = L1SCHED_CLCK_ST_WAIT;
return;
}
@ -93,7 +93,7 @@ static void sched_clck_tick(void *data)
GSM_TDMA_FN_DURATION_uS - elapsed_us);
}
static void sched_clck_correct(struct trx_sched *sched,
static void l1sched_clck_correct(struct l1sched_state *sched,
struct timespec *tv_now, uint32_t fn)
{
sched->fn_counter_proc = fn;
@ -106,12 +106,12 @@ static void sched_clck_correct(struct trx_sched *sched,
sched->clock = *tv_now;
memset(&sched->clock_timer, 0, sizeof(sched->clock_timer));
sched->clock_timer.cb = sched_clck_tick;
sched->clock_timer.cb = l1sched_clck_tick;
sched->clock_timer.data = sched;
osmo_timer_schedule(&sched->clock_timer, 0, GSM_TDMA_FN_DURATION_uS);
}
int sched_clck_handle(struct trx_sched *sched, uint32_t fn)
int l1sched_clck_handle(struct l1sched_state *sched, uint32_t fn)
{
struct timespec tv_now, *tv_clock, elapsed;
int64_t elapsed_us, elapsed_fn;
@ -124,11 +124,11 @@ int sched_clck_handle(struct trx_sched *sched, uint32_t fn)
tv_clock = &sched->clock;
/* If this is the first CLCK IND */
if (sched->state == SCH_CLCK_STATE_WAIT) {
sched_clck_correct(sched, &tv_now, fn);
if (sched->state == L1SCHED_CLCK_ST_WAIT) {
l1sched_clck_correct(sched, &tv_now, fn);
LOGP(DSCH, LOGL_DEBUG, "Initial clock received: fn=%u\n", fn);
sched->state = SCH_CLCK_STATE_OK;
sched->state = L1SCHED_CLCK_ST_OK;
return 0;
}
@ -150,7 +150,7 @@ int sched_clck_handle(struct trx_sched *sched, uint32_t fn)
LOGP(DSCH, LOGL_NOTICE, "GSM clock skew: old fn=%u, "
"new fn=%u\n", sched->fn_counter_proc, fn);
sched_clck_correct(sched, &tv_now, fn);
l1sched_clck_correct(sched, &tv_now, fn);
return 0;
}
@ -192,10 +192,10 @@ int sched_clck_handle(struct trx_sched *sched, uint32_t fn)
return 0;
}
void sched_clck_reset(struct trx_sched *sched)
void l1sched_clck_reset(struct l1sched_state *sched)
{
/* Reset internal state */
sched->state = SCH_CLCK_STATE_WAIT;
sched->state = L1SCHED_CLCK_ST_WAIT;
/* Stop clock timer */
osmo_timer_del(&sched->clock_timer);

@ -45,7 +45,7 @@
#include <osmocom/bb/trxcon/l1ctl.h>
/* GSM 05.02 Chapter 5.2.3 Normal Burst (NB) */
const uint8_t sched_nb_training_bits[8][26] = {
const uint8_t l1sched_nb_training_bits[8][26] = {
{
0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0,
0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1,
@ -84,7 +84,7 @@ const uint8_t sched_nb_training_bits[8][26] = {
* Examples: " ****.." (incomplete, 4/6 bursts)
* " ****" (complete, all 4 bursts)
* "**.***.." (incomplete, 5/8 bursts) */
const char *burst_mask2str(const uint8_t *mask, int bits)
const char *l1sched_burst_mask2str(const uint8_t *mask, int bits)
{
/* TODO: CSD is interleaved over 22 bursts, so the mask needs to be extended */
static char buf[8 + 1];
@ -99,11 +99,11 @@ const char *burst_mask2str(const uint8_t *mask, int bits)
return buf;
}
int sched_gsmtap_send(enum l1sched_lchan_type lchan_type, uint32_t fn, uint8_t tn,
int l1sched_gsmtap_send(enum l1sched_lchan_type lchan_type, uint32_t fn, uint8_t tn,
uint16_t band_arfcn, int8_t signal_dbm, uint8_t snr,
const uint8_t *data, size_t data_len)
{
const struct trx_lchan_desc *lchan_desc = &trx_lchan_desc[lchan_type];
const struct l1sched_lchan_desc *lchan_desc = &l1sched_lchan_desc[lchan_type];
/* GSMTAP logging may not be enabled */
if (gsmtap == NULL)
@ -118,16 +118,16 @@ int sched_gsmtap_send(enum l1sched_lchan_type lchan_type, uint32_t fn, uint8_t t
lchan_desc->ss_nr, fn, signal_dbm, snr, data, data_len);
}
int sched_send_dt_ind(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint8_t *l2, size_t l2_len,
int l1sched_send_dt_ind(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint8_t *l2, size_t l2_len,
int bit_error_count, bool dec_failed, bool traffic)
{
const struct trx_meas_set *meas = &lchan->meas_avg;
const struct trx_lchan_desc *lchan_desc;
const struct l1sched_meas_set *meas = &lchan->meas_avg;
const struct l1sched_lchan_desc *lchan_desc;
struct l1ctl_info_dl dl_hdr;
/* Set up pointers */
lchan_desc = &trx_lchan_desc[lchan->type];
lchan_desc = &l1sched_lchan_desc[lchan->type];
/* Fill in known downlink info */
dl_hdr.chan_nr = lchan_desc->chan_nr | ts->index;
@ -135,7 +135,7 @@ int sched_send_dt_ind(struct trx_instance *trx, struct trx_ts *ts,
dl_hdr.band_arfcn = htons(trx->band_arfcn);
dl_hdr.num_biterr = bit_error_count;
/* sched_trx_meas_avg() gives us TDMA frame number of the first burst */
/* l1sched_lchan_meas_avg() gives us TDMA frame number of the first burst */
dl_hdr.frame_nr = htonl(meas->fn);
/* RX level: 0 .. 63 in typical GSM notation (dBm + 110) */
@ -152,21 +152,21 @@ int sched_send_dt_ind(struct trx_instance *trx, struct trx_ts *ts,
/* Optional GSMTAP logging */
if (l2_len > 0 && (!traffic || lchan_desc->chan_nr == RSL_CHAN_OSMO_PDCH)) {
sched_gsmtap_send(lchan->type, meas->fn, ts->index,
l1sched_gsmtap_send(lchan->type, meas->fn, ts->index,
trx->band_arfcn, meas->rssi, 0, l2, l2_len);
}
return 0;
}
int sched_send_dt_conf(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, bool traffic)
int l1sched_send_dt_conf(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint32_t fn, bool traffic)
{
const struct trx_lchan_desc *lchan_desc;
const struct l1sched_lchan_desc *lchan_desc;
struct l1ctl_info_dl dl_hdr;
/* Set up pointers */
lchan_desc = &trx_lchan_desc[lchan->type];
lchan_desc = &l1sched_lchan_desc[lchan->type];
/* Zero-initialize DL header, because we don't set all fields */
memset(&dl_hdr, 0x00, sizeof(struct l1ctl_info_dl));
@ -181,7 +181,7 @@ int sched_send_dt_conf(struct trx_instance *trx, struct trx_ts *ts,
/* Optional GSMTAP logging */
if (!traffic || lchan_desc->chan_nr == RSL_CHAN_OSMO_PDCH) {
sched_gsmtap_send(lchan->type, fn, ts->index,
l1sched_gsmtap_send(lchan->type, fn, ts->index,
trx->band_arfcn | ARFCN_UPLINK,
0, 0, lchan->prim->payload,
lchan->prim->payload_len);
@ -198,7 +198,7 @@ int sched_send_dt_conf(struct trx_instance *trx, struct trx_ts *ts,
* @param lchan Logical channel to generate BFI for
* @return How much bytes were written
*/
size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan)
size_t l1sched_bad_frame_ind(uint8_t *l2, struct l1sched_lchan_state *lchan)
{
switch (lchan->tch_mode) {
case GSM48_CMODE_SPEECH_V1:

@ -29,47 +29,47 @@
#include <osmocom/bb/trxcon/sched_trx.h>
/* Forward declaration of handlers */
int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct trx_meas_set *meas);
int rx_data_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct l1sched_meas_set *meas);
int tx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan,
struct sched_burst_req *br);
int tx_data_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan,
struct l1sched_burst_req *br);
int rx_sch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct trx_meas_set *meas);
int rx_sch_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct l1sched_meas_set *meas);
int tx_rach_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan,
struct sched_burst_req *br);
int tx_rach_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan,
struct l1sched_burst_req *br);
int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct trx_meas_set *meas);
int rx_tchf_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct l1sched_meas_set *meas);
int tx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan,
struct sched_burst_req *br);
int tx_tchf_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan,
struct l1sched_burst_req *br);
int rx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct trx_meas_set *meas);
int rx_tchh_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct l1sched_meas_set *meas);
int tx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan,
struct sched_burst_req *br);
int tx_tchh_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan,
struct l1sched_burst_req *br);
int rx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct trx_meas_set *meas);
int rx_pdtch_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan, uint32_t fn, uint8_t bid,
const sbit_t *bits, const struct l1sched_meas_set *meas);
int tx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan,
struct sched_burst_req *br);
int tx_pdtch_fn(struct trx_instance *trx, struct l1sched_ts *ts,
struct l1sched_lchan_state *lchan,
struct l1sched_burst_req *br);
const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
const struct l1sched_lchan_desc l1sched_lchan_desc[_L1SCHED_CHAN_MAX] = {
[L1SCHED_IDLE] = {
.name = "IDLE",
.desc = "Idle channel",
@ -87,7 +87,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
/* 3GPP TS 05.03, section 4.7. Handled by transceiver,
* however we still need to parse BSIC (BCC / NCC). */
.flags = TRX_CH_FLAG_AUTO,
.flags = L1SCHED_CH_FLAG_AUTO,
.rx_fn = rx_sch_fn,
},
[L1SCHED_BCCH] = {
@ -100,7 +100,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
* regular interleaving (3GPP TS 05.02, clause 7, table 3):
* a L2 frame is interleaved over 4 consecutive bursts. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_AUTO,
.flags = L1SCHED_CH_FLAG_AUTO,
.rx_fn = rx_data_fn,
},
[L1SCHED_RACH] = {
@ -110,7 +110,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.chan_nr = RSL_CHAN_RACH,
/* Tx only, RACH convolutional coding (3GPP TS 05.03, section 4.6). */
.flags = TRX_CH_FLAG_AUTO,
.flags = L1SCHED_CH_FLAG_AUTO,
.tx_fn = tx_rach_fn,
},
[L1SCHED_CCCH] = {
@ -123,7 +123,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
* regular interleaving (3GPP TS 05.02, clause 7, table 3):
* a L2 frame is interleaved over 4 consecutive bursts. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_AUTO,
.flags = L1SCHED_CH_FLAG_AUTO,
.rx_fn = rx_data_fn,
},
[L1SCHED_TCHF] = {
@ -131,7 +131,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Full Rate traffic channel",
.gsmtap_chan_type = GSMTAP_CHANNEL_TCH_F,
.chan_nr = RSL_CHAN_Bm_ACCHs,
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
/* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03,
* chapter 3), block diagonal interleaving (3GPP TS 05.02, clause 7):
@ -145,7 +145,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
* The MS shall continuously transmit bursts, even if there is nothing
* to send, unless DTX (Discontinuous Transmission) is used. */
.burst_buf_size = 8 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_tchf_fn,
.tx_fn = tx_tchf_fn,
},
@ -154,7 +154,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Half Rate traffic channel (sub-channel 0)",
.gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H,
.chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 0,
/* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03,
@ -174,7 +174,7 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
* The MS shall continuously transmit bursts, even if there is nothing
* to send, unless DTX (Discontinuous Transmission) is used. */
.burst_buf_size = 6 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_tchh_fn,
.tx_fn = tx_tchh_fn,
},
@ -183,12 +183,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Half Rate traffic channel (sub-channel 1)",
.gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H,
.chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 1,
/* Same as for L1SCHED_TCHH_0, see above. */
.burst_buf_size = 6 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_tchh_fn,
.tx_fn = tx_tchh_fn,
},
@ -197,12 +197,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 0)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
.chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 0,
/* Same as for L1SCHED_BCCH (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -211,12 +211,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 1)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
.chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 1,
/* Same as for L1SCHED_BCCH (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -225,12 +225,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 2)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
.chan_nr = RSL_CHAN_SDCCH4_ACCH + (2 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 2,
/* Same as for L1SCHED_BCCH (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -239,12 +239,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 3)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
.chan_nr = RSL_CHAN_SDCCH4_ACCH + (3 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 3,
/* Same as for L1SCHED_BCCH (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -253,12 +253,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 0)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (0 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 0,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -267,12 +267,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 1)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (1 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 1,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -281,12 +281,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 2)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (2 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 2,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -295,12 +295,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 3)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (3 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 3,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -309,12 +309,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 4)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (4 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 4,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -323,12 +323,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 5)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (5 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 5,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -337,12 +337,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 6)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (6 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 6,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -351,12 +351,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Stand-alone dedicated control channel (sub-channel 7)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
.chan_nr = RSL_CHAN_SDCCH8_ACCH + (7 << 3),
.link_id = TRX_CH_LID_DEDIC,
.link_id = L1SCHED_CH_LID_DEDIC,
.ss_nr = 7,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -365,11 +365,11 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Slow TCH/F associated control channel",
.gsmtap_chan_type = GSMTAP_CHANNEL_TCH_F | GSMTAP_CHANNEL_ACCH,
.chan_nr = RSL_CHAN_Bm_ACCHs,
.link_id = TRX_CH_LID_SACCH,
.link_id = L1SCHED_CH_LID_SACCH,
/* Same as for L1SCHED_BCCH (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -378,12 +378,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Slow TCH/H associated control channel (sub-channel 0)",
.gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H | GSMTAP_CHANNEL_ACCH,
.chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3),
.link_id = TRX_CH_LID_SACCH,
.link_id = L1SCHED_CH_LID_SACCH,
.ss_nr = 0,
/* Same as for L1SCHED_BCCH (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -392,12 +392,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Slow TCH/H associated control channel (sub-channel 1)",
.gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H | GSMTAP_CHANNEL_ACCH,
.chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3),
.link_id = TRX_CH_LID_SACCH,
.link_id = L1SCHED_CH_LID_SACCH,
.ss_nr = 1,
/* Same as for L1SCHED_BCCH (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -406,12 +406,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Slow SDCCH/4 associated control channel (sub-channel 0)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4 | GSMTAP_CHANNEL_ACCH,
.chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3),
.link_id = TRX_CH_LID_SACCH,
.link_id = L1SCHED_CH_LID_SACCH,
.ss_nr = 0,
/* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
.burst_buf_size = 4 * GSM_BURST_PL_LEN,
.flags = TRX_CH_FLAG_CBTX,
.flags = L1SCHED_CH_FLAG_CBTX,
.rx_fn = rx_data_fn,
.tx_fn = tx_data_fn,
},
@ -420,12 +420,12 @@ const struct trx_lchan_desc trx_lchan_desc[_L1SCHED_CHAN_MAX] = {
.desc = "Slow SDCCH/4 associated control channel (sub-channel 1)",
.gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4 | GSMTAP_CHANNEL_ACCH,
.chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3),