From c7d20dfc41e907c38c015a0bfacb1f79f399b875 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Sun, 24 Apr 2011 10:56:25 +0200 Subject: [PATCH] l1ctl: Add definition for TRAFFIC_{REQ,CONF,IND} Also adapt packet creation length in L1 Signed-off-by: Sylvain Munaut --- include/l1ctl_proto.h | 15 +++++++++++++++ src/target/firmware/layer1/l23_api.c | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h index 2478ff1..3970588 100644 --- a/include/l1ctl_proto.h +++ b/include/l1ctl_proto.h @@ -53,6 +53,9 @@ enum { L1CTL_TCH_MODE_CONF, L1CTL_NEIGH_PM_REQ, L1CTL_NEIGH_PM_IND, + L1CTL_TRAFFIC_REQ, + L1CTL_TRAFFIC_CONF, + L1CTL_TRAFFIC_IND, }; enum ccch_mode { @@ -67,6 +70,8 @@ enum neigh_mode { NEIGH_MODE_SB, }; +#define TRAFFIC_DATA_LEN 40 + /* * NOTE: struct size. We do add manual padding out of the believe * that it will avoid some unaligned access. @@ -128,6 +133,11 @@ struct l1ctl_data_ind { uint8_t data[23]; } __attribute__((packed)); +/* traffic from the network */ +struct l1ctl_traffic_ind { + uint8_t data[TRAFFIC_DATA_LEN]; +} __attribute__((packed)); + /* * uplink info */ @@ -275,4 +285,9 @@ struct l1ctl_neigh_pm_ind { uint8_t pm[2]; } __attribute__((packed)); +/* traffic data to network */ +struct l1ctl_traffic_req { + uint8_t data[TRAFFIC_DATA_LEN]; +} __attribute__((packed)); + #endif /* __L1CTL_PROTO_H__ */ diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c index 0560e44..3baba17 100644 --- a/src/target/firmware/layer1/l23_api.c +++ b/src/target/firmware/layer1/l23_api.c @@ -46,7 +46,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_data_ind) + L3_MSG_HEAD) +#define L3_MSG_SIZE (sizeof(struct l1ctl_hdr)+sizeof(struct l1ctl_info_dl)+sizeof(struct l1ctl_traffic_ind) + L3_MSG_HEAD) void l1_queue_for_l2(struct msgb *msg) { -- 2.20.1