#ifndef _L1_SYNC_H
#define _L1_SYNC_H
+#include <linuxlist.h>
#include <layer1/tdma_sched.h>
#include <l1a_l23_interface.h>
uint32_t time_alignment;
};
+enum l1s_chan {
+ L1S_CHAN_MAIN,
+ L1S_CHAN_SACCH,
+ _NUM_L1S_CHAN
+};
+
+
struct l1s_state {
struct gsm_time current_time; /* current time */
struct gsm_time next_time; /* time at next TMDMA irq */
int task;
+ /* Transmit queues of pending packets for main DCCH and ACCH */
+ struct llist_head tx_queue[_NUM_L1S_CHAN];
+
/* bit-mask of multi-frame tasks that are currently active */
uint32_t mf_tasks;
};
void l1s_init(void)
{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(l1s.tx_queue); i++)
+ INIT_LLIST_HEAD(&l1s.tx_queue[i]);
+
/* register FRAME interrupt as FIQ so it can interrupt normal IRQs */
irq_register_handler(IRQ_TPU_FRAME, &frame_irq);
irq_config(IRQ_TPU_FRAME, 1, 1, 0);