summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-05-20 15:21:43 +0300
committerVadim Yanitskiy <axilirator@gmail.com>2018-11-21 10:48:55 +0700
commitc050ef43b26d29027626a673de2155817be875a5 (patch)
treebd43381ad7d1cc4288d4f388d77e8c6db7327bbc
parentc8de8cb1e126a18c0269571fba38310589dd9273 (diff)
l1ctl_proto.h: add messages for PHY info negotiation
-rw-r--r--include/l1ctl_proto.h90
-rw-r--r--src/host/virt_phy/src/logging.c4
2 files changed, 93 insertions, 1 deletions
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index c6156f5a..bf180729 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -64,6 +64,10 @@ enum {
L1CTL_DATA_TBF_REQ,
L1CTL_DATA_TBF_CONF,
+
+ /* PHY info / features negotiation */
+ L1CTL_PHY_NEGO_REQ,
+ L1CTL_PHY_NEGO_IND,
};
enum ccch_mode {
@@ -358,4 +362,90 @@ struct l1ctl_tbf_cfg_req {
uint8_t usf[8];
} __attribute__((packed));
+
+/**
+ * PHY info negotiation message header, data encoded using TLV.
+ * Tag values defined by l1ctl_phy_feature enum.
+ */
+struct l1ctl_phy_nego_ind {
+ uint16_t len;
+ uint8_t data[0];
+} __attribute__((packed));
+
+enum l1ctl_phy_info_tag {
+ /* PHY feature list defined by l1ctl_phy_feature_tag enum */
+ L1CTL_PHY_INFO_FEATURES = 0,
+ /* PHY name, e.g. 'calypso', 'trxcon' or 'virt_phy' */
+ L1CTL_PHY_INFO_NAME,
+ /* Firmware build target, e.g. e88, e99, etc. */
+ L1CTL_PHY_INFO_FW_TARGET,
+ /* Firmware version */
+ L1CTL_PHY_INFO_FW_VERSION,
+
+ /**
+ * NOTE: please keep the order of enum items
+ * constant and add new ones to the end,
+ * before this comment.
+ */
+ _L1CTL_PHY_INFO_MAX
+};
+
+enum l1ctl_phy_feature_tag {
+ /* Frequency band support */
+ L1CTL_PHY_FEATURE_BAND_400 = 0,
+ L1CTL_PHY_FEATURE_BAND_850,
+ L1CTL_PHY_FEATURE_BAND_900,
+ L1CTL_PHY_FEATURE_BAND_DCS,
+ L1CTL_PHY_FEATURE_BAND_PCS,
+
+ /* Voice codecs support */
+ L1CTL_PHY_FEATURE_CODEC_HR,
+ L1CTL_PHY_FEATURE_CODEC_FR,
+ L1CTL_PHY_FEATURE_CODEC_EFR,
+ L1CTL_PHY_FEATURE_CODEC_HR_AMR,
+ L1CTL_PHY_FEATURE_CODEC_FR_AMR,
+
+ /* Channel coding support */
+ L1CTL_PHY_FEATURE_CHAN_XCCH,
+ L1CTL_PHY_FEATURE_CHAN_TCHF,
+ L1CTL_PHY_FEATURE_CHAN_TCHH,
+ L1CTL_PHY_FEATURE_CHAN_CBCH,
+ L1CTL_PHY_FEATURE_CHAN_PTCH,
+
+ /* A5/X ciphering support */
+ L1CTL_PHY_FEATURE_A5_1,
+ L1CTL_PHY_FEATURE_A5_2,
+ L1CTL_PHY_FEATURE_A5_3,
+ L1CTL_PHY_FEATURE_A5_4,
+ L1CTL_PHY_FEATURE_A5_5,
+ L1CTL_PHY_FEATURE_A5_6,
+ L1CTL_PHY_FEATURE_A5_7,
+
+ /* Transmission enabled? */
+ L1CTL_PHY_FEATURE_TX,
+ /* Frequency hopping */
+ L1CTL_PHY_FEATURE_FH,
+ /* Power measurement for a single ARFCN */
+ L1CTL_PHY_FEATURE_PM,
+ /* Power measurement for neighbour ARFCNs */
+ L1CTL_PHY_FEATURE_NEIGH_PM,
+ /* SIM card support (Calypso based PHYs) */
+ L1CTL_PHY_FEATURE_SIM,
+ /* Measurement processing and reporting by L1 itself */
+ L1CTL_PHY_FEATURE_MEAS_REP,
+ /* Burst transmission support (sylvain/testing) */
+ L1CTL_PHY_FEATURE_BURST_TRX,
+ /* Burst sniffing support (sylvain/burst_ind) */
+ L1CTL_PHY_FEATURE_BURST_IND,
+ /* TCH traffic (voice frames) support */
+ L1CTL_PHY_FEATURE_TRAFFIC,
+
+ /**
+ * NOTE: please keep the order of enum items
+ * constant and add new ones to the end,
+ * before this comment.
+ */
+ _L1CTL_PHY_FEATURE_MAX
+};
+
#endif /* __L1CTL_PROTO_H__ */
diff --git a/src/host/virt_phy/src/logging.c b/src/host/virt_phy/src/logging.c
index a3e63bc5..98f121e4 100644
--- a/src/host/virt_phy/src/logging.c
+++ b/src/host/virt_phy/src/logging.c
@@ -61,7 +61,9 @@ static const char* l1ctlPrimNames[] = {
"L1CTL_TBF_CFG_REQ",
"L1CTL_TBF_CFG_CONF",
"L1CTL_DATA_TBF_REQ",
- "L1CTL_DATA_TBF_CONF"
+ "L1CTL_DATA_TBF_CONF",
+ "L1CTL_PHY_NEGO_REQ",
+ "L1CTL_PHY_NEGO_IND",
};
static const struct log_info_cat default_categories[] = {