summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-03-29 09:07:57 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-03-29 09:07:57 +0200
commite7997163b240168301d7d2988f2cd74ae1f397e9 (patch)
tree6c4b754ee17820ec85a843c068f10bd9dc05f572
parent43c588b6c64f84583818ed766c7392dbec9531d1 (diff)
Fixed neighbour cell measurement task for SDCCH/8 multiframes
Only on BCCH's multiframe we are allowed to measure on frames 0, 10, 20, 30, 40. On SDCCH/8 multiframe, measurements are performed on frame 50 only.
-rw-r--r--src/target/firmware/include/layer1/mframe_sched.h1
-rw-r--r--src/target/firmware/layer1/l23_api.c8
-rw-r--r--src/target/firmware/layer1/mframe_sched.c11
3 files changed, 14 insertions, 6 deletions
diff --git a/src/target/firmware/include/layer1/mframe_sched.h b/src/target/firmware/include/layer1/mframe_sched.h
index 3b2039a..ecdb1ec 100644
--- a/src/target/firmware/include/layer1/mframe_sched.h
+++ b/src/target/firmware/include/layer1/mframe_sched.h
@@ -28,6 +28,7 @@ enum mframe_task {
MF_TASK_TCH_H_0,
MF_TASK_TCH_H_1,
+ MF_TASK_NEIGH_PM51_C0T0,
MF_TASK_NEIGH_PM51,
MF_TASK_NEIGH_PM26E,
MF_TASK_NEIGH_PM26O,
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index 1c4459e..ae39e63 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -228,8 +228,8 @@ static void l1ctl_rx_dm_est_req(struct msgb *msg)
printd("L1CTL_DM_EST_REQ (arfcn=%u, chan_nr=0x%02x, tsc=%u)\n",
ntohs(est_req->h0.band_arfcn), ul->chan_nr, est_req->tsc);
- /* disable neighbour cell measurement */
- mframe_disable(MF_TASK_NEIGH_PM51);
+ /* disable neighbour cell measurement of C0 TS 0 */
+ mframe_disable(MF_TASK_NEIGH_PM51_C0T0);
/* configure dedicated channel state */
l1s.dedicated.type = chan_nr2dchan_type(ul->chan_nr);
@@ -539,9 +539,9 @@ static void l1ctl_rx_neigh_pm_req(struct msgb *msg)
printf("L1CTL_NEIGH_PM_REQ new list with %u entries\n", pm_req->n);
l1s.neigh_pm.n = pm_req->n; /* atomic */
- /* on BCCH enable PM on frame 51 */
+ /* on C0 enable PM on frame 51 */
if (l1s.dedicated.type == GSM_DCHAN_NONE)
- mframe_enable(MF_TASK_NEIGH_PM51);
+ mframe_enable(MF_TASK_NEIGH_PM51_C0T0);
}
/* receive a L1CTL_TRAFFIC_REQ from L23 */
diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c
index 2367d42..f3a6b43 100644
--- a/src/target/firmware/layer1/mframe_sched.c
+++ b/src/target/firmware/layer1/mframe_sched.c
@@ -198,8 +198,8 @@ static const struct mframe_sched_item mf_sdcch8_7[] = {
{ .sched_set = NULL }
};
-/* Measurement for MF 51 */
-static const struct mframe_sched_item mf_neigh_pm51[] = {
+/* Measurement for MF 51 C0 */
+static const struct mframe_sched_item mf_neigh_pm51_c0t0[] = {
{ .sched_set = NEIGH_PM , .modulo = 51, .frame_nr = 0 },
{ .sched_set = NEIGH_PM , .modulo = 51, .frame_nr = 10 },
{ .sched_set = NEIGH_PM , .modulo = 51, .frame_nr = 20 },
@@ -208,6 +208,12 @@ static const struct mframe_sched_item mf_neigh_pm51[] = {
{ .sched_set = NULL }
};
+/* Measurement for MF 51 */
+static const struct mframe_sched_item mf_neigh_pm51[] = {
+ { .sched_set = NEIGH_PM , .modulo = 51, .frame_nr = 50 },
+ { .sched_set = NULL }
+};
+
/* TCH */
#define TCH tch_sched_set
#define TCH_A tch_a_sched_set
@@ -326,6 +332,7 @@ static const struct mframe_sched_item *sched_set_for_task[32] = {
[MF_TASK_TCH_H_0] = mf_tch_h_0,
[MF_TASK_TCH_H_1] = mf_tch_h_1,
+ [MF_TASK_NEIGH_PM51_C0T0] = mf_neigh_pm51_c0t0,
[MF_TASK_NEIGH_PM51] = mf_neigh_pm51,
[MF_TASK_NEIGH_PM26E] = mf_neigh_pm26_even,
[MF_TASK_NEIGH_PM26O] = mf_neigh_pm26_odd,