Improvement of neighbour cell power measurement task.

5 measurements are now performed during a 51 multiframe. They are performed
at one of the 5 FCCH.

Additionally a timeslot offset can be given for each measurement. This way
it is possible to measure each timeslot seperately. The given ARFCN must be in
sync with the serving cell.
This commit is contained in:
Andreas Eversberg 2012-01-29 11:00:53 +01:00 committed by Harald Welte
parent b7c4b9b6f5
commit 7cc4a4b324
5 changed files with 17 additions and 4 deletions

View File

@ -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 */

View File

@ -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;
};

View File

@ -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 */

View File

@ -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 }
};

View File

@ -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;
}