summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/l1ctl_proto.h3
-rw-r--r--src/target/firmware/include/layer1/sync.h1
-rw-r--r--src/target/firmware/layer1/l23_api.c7
-rw-r--r--src/target/firmware/layer1/mframe_sched.c6
-rw-r--r--src/target/firmware/layer1/prim_pm.c4
5 files changed, 17 insertions, 4 deletions
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index c1220d60..4b9540e9 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -283,12 +283,15 @@ struct l1ctl_neigh_pm_req {
uint8_t n;
uint8_t padding[1];
uint16_t band_arfcn[64];
+ uint8_t tn[64];
} __attribute__((packed));
/* neighbour cell measurement results */
struct l1ctl_neigh_pm_ind {
uint16_t band_arfcn;
uint8_t pm[2];
+ uint8_t tn;
+ uint8_t padding;
} __attribute__((packed));
/* traffic data to network */
diff --git a/src/target/firmware/include/layer1/sync.h b/src/target/firmware/include/layer1/sync.h
index aa03c827..dae85a1a 100644
--- a/src/target/firmware/include/layer1/sync.h
+++ b/src/target/firmware/include/layer1/sync.h
@@ -151,6 +151,7 @@ struct l1s_state {
uint8_t pos;
uint8_t running;
uint16_t band_arfcn[64];
+ uint8_t tn[64];
uint8_t level[64];
} neigh_pm;
};
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index 2581b5bb..659f3173 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -49,7 +49,8 @@
/* the size we will allocate struct msgb* for HDLC */
#define L3_MSG_HEAD 4
-#define L3_MSG_SIZE (sizeof(struct l1ctl_hdr)+sizeof(struct l1ctl_info_dl)+sizeof(struct l1ctl_traffic_ind) + L3_MSG_HEAD)
+#define L3_MSG_DATA 200
+#define L3_MSG_SIZE (L3_MSG_HEAD + sizeof(struct l1ctl_hdr) + L3_MSG_DATA)
void (*l1a_l23_tx_cb)(struct msgb *msg) = NULL;
@@ -529,8 +530,10 @@ static void l1ctl_rx_neigh_pm_req(struct msgb *msg)
/* now reset pointer and fill list */
l1s.neigh_pm.pos = 0;
l1s.neigh_pm.running = 0;
- for (i = 0; i < pm_req->n; i++)
+ for (i = 0; i < pm_req->n; i++) {
l1s.neigh_pm.band_arfcn[i] = ntohs(pm_req->band_arfcn[i]);
+ l1s.neigh_pm.tn[i] = pm_req->tn[i];
+ }
printf("L1CTL_NEIGH_PM_REQ new list with %u entries\n", pm_req->n);
l1s.neigh_pm.n = pm_req->n; /* atomic */
diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c
index 6281c3d6..2367d425 100644
--- a/src/target/firmware/layer1/mframe_sched.c
+++ b/src/target/firmware/layer1/mframe_sched.c
@@ -200,7 +200,11 @@ static const struct mframe_sched_item mf_sdcch8_7[] = {
/* Measurement for MF 51 */
static const struct mframe_sched_item mf_neigh_pm51[] = {
- { .sched_set = NEIGH_PM , .modulo = 51, .frame_nr = 50 },
+ { .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 },
+ { .sched_set = NEIGH_PM , .modulo = 51, .frame_nr = 30 },
+ { .sched_set = NEIGH_PM , .modulo = 51, .frame_nr = 40 },
{ .sched_set = NULL }
};
diff --git a/src/target/firmware/layer1/prim_pm.c b/src/target/firmware/layer1/prim_pm.c
index 07b72097..1630600a 100644
--- a/src/target/firmware/layer1/prim_pm.c
+++ b/src/target/firmware/layer1/prim_pm.c
@@ -175,7 +175,8 @@ static int l1s_neigh_pm_cmd(uint8_t num_meas,
* num_meas > 1 */
/* do measurement dummy, in case l1s.neigh_pm.n == 0 */
l1s_rx_win_ctrl((l1s.neigh_pm.n) ?
- l1s.neigh_pm.band_arfcn[l1s.neigh_pm.pos] : 0, L1_RXWIN_PW, 0);
+ l1s.neigh_pm.band_arfcn[l1s.neigh_pm.pos] : 0,
+ L1_RXWIN_PW, l1s.neigh_pm.tn[l1s.neigh_pm.pos]);
/* restore last gain */
rffe_set_gain(last_gain);
@@ -218,6 +219,7 @@ static int l1s_neigh_pm_resp(__unused uint8_t p1, __unused uint8_t p2,
mi = (struct l1ctl_neigh_pm_ind *)
msgb_put(msg, sizeof(*mi));
mi->band_arfcn = htons(l1s.neigh_pm.band_arfcn[i]);
+ mi->tn = l1s.neigh_pm.tn[i];
mi->pm[0] = l1s.neigh_pm.level[i];
mi->pm[1] = 0;
}