summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-11-14 16:12:24 +0100
committerSylvain Munaut <tnt@246tNt.com>2011-11-13 20:26:22 +0100
commit224552fa540fa44e80bca007d999eb43aae4964c (patch)
tree6e005b709c3b2a2235208e0a36752a41e01d4d60
parent0ce6d0522f476b7bbf3e5baa7a10f4ba9ce90edc (diff)
l1ctl: Add definition for BURST INDICATION messages
(as a side effect data_ind is no longer the biggest message, so need to update L3_MSG_SIZE) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--include/l1ctl_proto.h15
-rw-r--r--src/target/firmware/layer1/l23_api.c2
2 files changed, 16 insertions, 1 deletions
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index c1220d60..a4cbf55b 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -56,6 +56,7 @@ enum {
L1CTL_TRAFFIC_REQ,
L1CTL_TRAFFIC_CONF,
L1CTL_TRAFFIC_IND,
+ L1CTL_BURST_IND,
};
enum ccch_mode {
@@ -139,6 +140,20 @@ struct l1ctl_traffic_ind {
uint8_t data[TRAFFIC_DATA_LEN];
} __attribute__((packed));
+/* raw burst data. This is following the header */
+#define BI_FLG_DUMMY (1<<4)
+#define BI_FLG_SACCH (1<<5)
+
+struct l1ctl_burst_ind {
+ uint32_t frame_nr;
+ uint16_t band_arfcn; /* ARFCN + band + ul indicator */
+ uint8_t chan_nr; /* GSM 08.58 channel number (9.3.1) */
+ uint8_t flags; /* BI_FLG_xxx + burst_id = 2LSBs */
+ uint8_t rx_level; /* 0 .. 63 in typical GSM notation (dBm+110) */
+ uint8_t snr; /* Reported SNR >> 8 (0-255) */
+ uint8_t bits[15]; /* 114 bits + 2 steal bits. Filled MSB first */
+} __attribute__((packed));
+
/*
* uplink info
*/
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index ed43e142..3c2256dc 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -47,7 +47,7 @@
/* 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_SIZE (sizeof(struct l1ctl_hdr)+sizeof(struct l1ctl_info_dl)+sizeof(struct l1ctl_burst_ind) + L3_MSG_HEAD)
void l1_queue_for_l2(struct msgb *msg)
{