summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-03-21 12:57:28 +0800
committerHarald Welte <laforge@gnumonks.org>2010-03-21 12:57:28 +0800
commitbee63154c4b763b5a6893a4f654ecb8b795325cc (patch)
treefa8c2e4bd332cc9acd603cef97bd3aff6e81ed84 /include
parent7c8ed1a2300147e39437a6e5579b55b389784ff7 (diff)
L1A/L23 interface (L1CTL) cleanup
* introduce a new 'l1ctl_hdr' structure common to all messages on this interface * use struct l1ctl_hdr in both the firmware and layer23 * add a new L1CTL_PM_REQ request for performing layer23-initiated power measurements (firmware does not implement them yet)
Diffstat (limited to 'include')
-rw-r--r--include/l1a_l23_interface.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/include/l1a_l23_interface.h b/include/l1a_l23_interface.h
index 7c756f9a..03f80a53 100644
--- a/include/l1a_l23_interface.h
+++ b/include/l1a_l23_interface.h
@@ -31,20 +31,23 @@
#define L1CTL_DM_EST_REQ 5
#define L1CTL_DATA_REQ 7
#define L1CTL_RESET 8
+#define L1CTL_PM_REQ 9 /* power measurement */
/*
* NOTE: struct size. We do add manual padding out of the believe
* that it will avoid some unaligned access.
*/
+struct l1ctl_hdr {
+ uint8_t msg_type;
+ uint8_t padding;
+ uint8_t data[0];
+} __attribute__((packed));
+
/*
* downlink info ... down from the BTS..
*/
struct l1ctl_info_dl {
- /* common header, should be its own struct */
- uint8_t msg_type;
- uint8_t padding;
-
/* GSM 08.58 channel number (9.3.1) */
uint8_t chan_nr;
/* GSM 08.58 link identifier (9.3.2) */
@@ -57,6 +60,7 @@ struct l1ctl_info_dl {
uint8_t rx_level; /* 0 .. 63 in typical GSM notation (dBm+110) */
uint8_t snr; /* Signal/Noise Ration (dB) */
+ uint8_t payload[0];
} __attribute__((packed));
/* new CCCH was found. This is following the header */
@@ -74,10 +78,6 @@ struct l1ctl_data_ind {
* uplink info
*/
struct l1ctl_info_ul {
- /* common header, should be its own struct */
- uint8_t msg_type;
- uint8_t padding;
-
/* GSM 08.58 channel number (9.3.1) */
uint8_t chan_nr;
/* GSM 08.58 link identifier (9.3.2) */
@@ -124,4 +124,16 @@ struct l1ctl_dm_est_req {
};
} __attribute__((packed));
+struct l1ctl_pm_req {
+ uint8_t type;
+ uint8_t padding2;
+
+ union {
+ struct {
+ uint16_t band_arfcn_from;
+ uint16_t band_arfcn_to;
+ } range;
+ };
+} __attribute__((packed));
+
#endif