summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-11-14 16:14:01 +0100
committerHarald Welte <laforge@gnumonks.org>2017-01-15 09:25:22 +0100
commitec2d58c44b9231380271c51125bafb4a58be2930 (patch)
tree7b5a243b6994f46a8e7a5cf8aba102bd84face65
parent19299e5a2d81f4eb42121606f3e338cc2d4ef631 (diff)
fw/layer1: Replace all dedicated multiframe task with sniff code
This way, a dedicated mode assign makes it dump all the data Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/target/firmware/layer1/mframe_sched.c192
1 files changed, 92 insertions, 100 deletions
diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c
index f3a6b43..bdc849a 100644
--- a/src/target/firmware/layer1/mframe_sched.c
+++ b/src/target/firmware/layer1/mframe_sched.c
@@ -52,6 +52,10 @@ struct mframe_sched_item {
#define NB_QUAD_FH_UL NB_QUAD_UL
#define NEIGH_PM neigh_pm_sched_set
+#define SNIFF_QUAD_DL sniff_xcch_dl_sched_set
+#define SNIFF_QUAD_UL sniff_xcch_ul_sched_set
+#define SNIFF_TCH sniff_tch_sched_set
+
/* BCCH Normal */
static const struct mframe_sched_item mf_bcch_norm[] = {
{ .sched_set = NB_QUAD_DL, .modulo = 51, .frame_nr = 2 },
@@ -88,112 +92,112 @@ static const struct mframe_sched_item mf_ccch_comb[] = {
/* SDCCH/4 in a combined CCCH on C0T0, cannot be FH */
static const struct mframe_sched_item mf_sdcch4_0[] = {
- { .sched_set = NB_QUAD_DL, .modulo = 51, .frame_nr = 22 },
- { .sched_set = NB_QUAD_UL, .modulo = 51, .frame_nr = 22+15 },
- { .sched_set = NB_QUAD_DL, .modulo = 2*51, .frame_nr = 42,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 22 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 22+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 42,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_UL, .modulo = 2*51, .frame_nr = 42+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 42+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch4_1[] = {
- { .sched_set = NB_QUAD_DL, .modulo = 51, .frame_nr = 26 },
- { .sched_set = NB_QUAD_UL, .modulo = 51, .frame_nr = 26+15 },
- { .sched_set = NB_QUAD_DL, .modulo = 2*51, .frame_nr = 46,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 26 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 26+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 46,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_UL, .modulo = 2*51, .frame_nr = 46+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 46+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch4_2[] = {
- { .sched_set = NB_QUAD_DL, .modulo = 51, .frame_nr = 32 },
- { .sched_set = NB_QUAD_UL, .modulo = 51, .frame_nr = 32+15 },
- { .sched_set = NB_QUAD_DL, .modulo = 2*51, .frame_nr = 51+42,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 32 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 32+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 51+42,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_UL, .modulo = 2*51, .frame_nr = 51+42+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 51+42+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch4_3[] = {
- { .sched_set = NB_QUAD_DL, .modulo = 51, .frame_nr = 36 },
- { .sched_set = NB_QUAD_UL, .modulo = 51, .frame_nr = 36+15 },
- { .sched_set = NB_QUAD_DL, .modulo = 2*51, .frame_nr = 51+46,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 36 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 36+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 51+46,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_UL, .modulo = 2*51, .frame_nr = 51+46+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 51+46+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
/* SDCCH/8, can be frequency hopping (FH) */
static const struct mframe_sched_item mf_sdcch8_0[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 0 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 0+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 32,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 0 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 0+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 32,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 32+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 32+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch8_1[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 4 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 4+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 36,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 4 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 4+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 36,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 36+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 36+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch8_2[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 8 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 8+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 40,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 8 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 8+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 40,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 40+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 40+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch8_3[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 12 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 12+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 44,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 12 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 12+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 44,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 44+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 44+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch8_4[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 16 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 16+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 51+32,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 16 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 16+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 51+32,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 51+32+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 51+32+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch8_5[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 20 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 20+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 51+36,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 20 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 20+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 51+36,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 51+36+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 51+36+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch8_6[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 24 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 24+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 51+40,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 24 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 24+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 51+40,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 51+40+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 51+40+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_sdcch8_7[] = {
- { .sched_set = NB_QUAD_FH_DL, .modulo = 51, .frame_nr = 28 },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 51, .frame_nr = 28+15 },
- { .sched_set = NB_QUAD_FH_DL, .modulo = 2*51, .frame_nr = 51+44,
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 51, .frame_nr = 28 },
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 51, .frame_nr = 28+15 },
+ { .sched_set = SNIFF_QUAD_DL, .modulo = 2*51, .frame_nr = 51+44,
.flags = MF_F_SACCH },
- { .sched_set = NB_QUAD_FH_UL, .modulo = 2*51, .frame_nr = 51+44+15,
+ { .sched_set = SNIFF_QUAD_UL, .modulo = 2*51, .frame_nr = 51+44+15,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
@@ -220,73 +224,61 @@ static const struct mframe_sched_item mf_neigh_pm51[] = {
#define TCH_D tch_d_sched_set
static const struct mframe_sched_item mf_tch_f_even[] = {
- { .sched_set = TCH, .modulo = 13, .frame_nr = 0 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 1 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 2 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 3 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 4 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 5 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 6 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 7 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 8 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 9 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 10 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 11 },
- { .sched_set = TCH_A, .modulo = 26, .frame_nr = 12,
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 0 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 1 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 2 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 3 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 4 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 5 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 6 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 7 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 8 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 9 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 10 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 11 },
+ { .sched_set = SNIFF_TCH, .modulo = 26, .frame_nr = 12,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_tch_f_odd[] = {
- { .sched_set = TCH, .modulo = 13, .frame_nr = 0 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 1 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 2 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 3 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 4 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 5 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 6 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 7 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 8 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 9 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 10 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 11 },
- { .sched_set = TCH_A, .modulo = 26, .frame_nr = 25,
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 0 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 1 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 2 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 3 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 4 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 5 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 6 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 7 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 8 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 9 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 10 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 11 },
+ { .sched_set = SNIFF_TCH, .modulo = 26, .frame_nr = 25,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_tch_h_0[] = {
- { .sched_set = TCH, .modulo = 13, .frame_nr = 0 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 1 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 2 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 3 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 4 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 5 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 6 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 7 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 8 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 9 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 10 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 11 },
- { .sched_set = TCH_A, .modulo = 26, .frame_nr = 12,
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 0 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 2 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 4 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 6 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 8 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 10 },
+ { .sched_set = SNIFF_TCH, .modulo = 26, .frame_nr = 12,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};
static const struct mframe_sched_item mf_tch_h_1[] = {
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 0 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 1 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 2 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 3 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 4 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 5 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 6 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 7 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 8 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 9 },
- { .sched_set = TCH_D, .modulo = 13, .frame_nr = 10 },
- { .sched_set = TCH, .modulo = 13, .frame_nr = 11 },
- { .sched_set = TCH_A, .modulo = 26, .frame_nr = 25,
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 1 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 3 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 5 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 7 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 9 },
+ { .sched_set = SNIFF_TCH, .modulo = 13, .frame_nr = 11 },
+ { .sched_set = SNIFF_TCH, .modulo = 26, .frame_nr = 25,
.flags = MF_F_SACCH },
{ .sched_set = NULL }
};