fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31332 )
Change subject: l1ctl_proto.h: rework GPRS related messages ......................................................................
l1ctl_proto.h: rework GPRS related messages
Change-Id: I7c9c28e93dc938dfa76d0ab989d0952675e8b78e --- M include/l1ctl_proto.h 1 file changed, 45 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/32/31332/1
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h index 7e415e9..953abb0 100644 --- a/include/l1ctl_proto.h +++ b/include/l1ctl_proto.h @@ -53,11 +53,10 @@ L1CTL_TRAFFIC_CONF = 0x1d, L1CTL_TRAFFIC_IND = 0x1e, L1CTL_BURST_IND = 0x1f, - /* configure TBF for uplink/downlink */ - L1CTL_TBF_CFG_REQ = 0x20, - L1CTL_TBF_CFG_CONF = 0x21, - L1CTL_DATA_TBF_REQ = 0x22, - L1CTL_DATA_TBF_CONF = 0x23, + L1CTL_GPRS_UL_TBF_CFG_REQ = 0x20, + L1CTL_GPRS_DL_TBF_CFG_REQ = 0x21, + L1CTL_GPRS_UL_BLOCK_REQ = 0x22, + L1CTL_GPRS_DL_BLOCK_IND = 0x23, /* Extended (11-bit) RACH (see 3GPP TS 05.02, section 5.2.7) */ L1CTL_EXT_RACH_REQ = 0x24, }; @@ -372,15 +371,49 @@ uint8_t data[0]; } __attribute__((packed));
-struct l1ctl_tbf_cfg_req { - /* future support for multiple concurrent TBFs. 0 for now */ +/* payload of L1CTL_GPRS_UL_TBF_CFG_REQ */ +struct l1ctl_gprs_ul_tbf_cfg_req { uint8_t tbf_nr; - /* is this about an UL TBF (1) or DL (0) */ - uint8_t is_uplink; - uint8_t padding[2]; + uint8_t tn; + uint8_t active; + uint8_t padding[1]; +} __attribute__((packed));
- /* one USF for each TN, or 255 for invalid/unused */ - uint8_t usf[8]; +/* payload of L1CTL_GPRS_DL_TBF_CFG_REQ */ +struct l1ctl_gprs_dl_tbf_cfg_req { + uint8_t tbf_nr; + uint8_t slotmask; + uint8_t dl_tfi; + uint8_t padding[1]; +} __attribute__((packed)); + +#define L1CTL_GPRS_DL_BLOCK_F_PTCCH (1 << 0) +#define L1CTL_GPRS_DL_BLOCK_F_PART (1 << 1) + +/* part of L1CTL_GPRS_{UL,DL}_BLOCK_{REQ,CONF,IND} */ +struct l1ctl_gprs_block_hdr { + uint32_t fn; + uint8_t tn; + uint8_t flags; /* see L1CTL_GPRS_{UL,DL}_BLOCK_F_* above */ + uint8_t padding[2]; +} __attribute__((packed)); + +/* payload of L1CTL_GPRS_UL_BLOCK_REQ */ +struct l1ctl_gprs_ul_block_req { + struct l1ctl_gprs_block_hdr hdr; + uint8_t data[0]; +} __attribute__((packed)); + +/* payload of L1CTL_GPRS_DL_BLOCK_IND */ +struct l1ctl_gprs_dl_block_ind { + struct l1ctl_gprs_block_hdr hdr; + struct { + uint16_t ber10k; /* Bit Error Rate */ + int16_t ci_cb; /* C/I in centiBels */ + uint8_t rx_lev; /* RxLev 0..63 */ + } meas; + uint8_t usf; + uint8_t data[0]; } __attribute__((packed));
#endif /* __L1CTL_PROTO_H__ */