layer1/sync: Add msgb queues for transmit/uplink to l1s data structure
authorHarald Welte <laforge@gnumonks.org>
Sun, 28 Feb 2010 09:39:51 +0000 (10:39 +0100)
committerHarald Welte <laforge@gnumonks.org>
Mon, 1 Mar 2010 22:48:44 +0000 (23:48 +0100)
src/target/firmware/include/layer1/sync.h
src/target/firmware/layer1/sync.c

index 6462467..a50969b 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _L1_SYNC_H
 #define _L1_SYNC_H
 
+#include <linuxlist.h>
 #include <layer1/tdma_sched.h>
 #include <l1a_l23_interface.h>
 
@@ -11,6 +12,13 @@ struct l1_cell_info {
        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 */
@@ -23,6 +31,9 @@ struct l1s_state {
 
        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;
 };
index a885c44..7b39685 100644 (file)
@@ -903,6 +903,11 @@ static void frame_irq(enum irq_nr nr)
 
 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);