summaryrefslogtreecommitdiffstats
path: root/include/l1ctl_proto.h
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-05-12 02:04:53 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-11-05 05:13:57 +0000
commit219ed20cb5cbda05d5480d7486b228b994e50b9d (patch)
tree34629be7f718d39c3a11614d4cd2222469009b11 /include/l1ctl_proto.h
parentd350e9f30c3b5f77363124308dfdfbc0ef3bd35c (diff)
l1ctl_proto.h: use flexible array member for traffic messages
Unlike the DATA messages, traffic frames may have different length. Instead of having fixed payload (i.e. TCH frame) length, let's introduce a flexible array member. This would allow one to calculate the frame length using the MSGB API. Change-Id: I119fa36c84e95c3003d57c19e25f8146ed45c3c6
Diffstat (limited to 'include/l1ctl_proto.h')
-rw-r--r--include/l1ctl_proto.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index f1bff860..c6156f5a 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -96,8 +96,6 @@ enum l1ctl_coding_scheme {
L1CTL_MCS9,
};
-#define TRAFFIC_DATA_LEN 40
-
/*
* NOTE: struct size. We do add manual padding out of the believe
* that it will avoid some unaligned access.
@@ -162,7 +160,7 @@ struct l1ctl_data_ind {
/* traffic from the network */
struct l1ctl_traffic_ind {
- uint8_t data[TRAFFIC_DATA_LEN];
+ uint8_t data[0];
} __attribute__((packed));
/*
@@ -346,7 +344,7 @@ struct l1ctl_neigh_pm_ind {
/* traffic data to network */
struct l1ctl_traffic_req {
- uint8_t data[TRAFFIC_DATA_LEN];
+ uint8_t data[0];
} __attribute__((packed));
struct l1ctl_tbf_cfg_req {