diff --git a/epan/dissectors/packet-oran.c b/epan/dissectors/packet-oran.c index 4e2f53e4aa..fecd589295 100755 --- a/epan/dissectors/packet-oran.c +++ b/epan/dissectors/packet-oran.c @@ -113,6 +113,11 @@ static int hf_oran_rsvd16 = -1; static int hf_oran_exponent = -1; static int hf_oran_iq_user_data = -1; +static int hf_oran_disable_bfws = -1; +static int hf_oran_rad = -1; +static int hf_oran_num_bund_prbs = -1; +static int hf_oran_beam_id = -1; + /* Computed fields */ static int hf_oran_c_eAxC_ID = -1; static int hf_oran_refa = -1; @@ -310,6 +315,13 @@ static const value_string exttype_vals[] = { {9, "Dynamic Spectrum Sharing parameters"}, {10, "Multiple ports grouping"}, {11, "Flexible BF weights"}, + {12, "Non-Contiguous PRB Allocation with Frequency Ranges"}, + {13, "PRB Allocation with Frequency Hopping"}, + {14, "Nulling-layer Info. for ueId-based beamforming"}, + {15, "Mixed-numerology Info. for ueId-based beamforming"}, + {16, "Section description for antenna mapping in UE channel information based UL beamforming"}, + {17, "Section description for indication of user port group"}, + {18, "Section description for Uplink Transmission Management"}, {0, NULL} }; @@ -544,15 +556,17 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info * offset++; /* extLen (number of 32-bit words). - TODO: this field is 2 bytes when for Section Extension=11 TODO: expert_info for value 0, which is reserved! */ + guint32 extlen_len = (exttype==11) ? 2 : 1; /* Extension 11 is special */ guint32 extlen; - proto_item *extlen_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_extlen, tvb, offset, 1, ENC_BIG_ENDIAN, &extlen); + proto_item *extlen_ti = proto_tree_add_item_ret_uint(extension_tree, hf_oran_extlen, tvb, + offset, extlen_len, ENC_BIG_ENDIAN, &extlen); proto_item_append_text(extlen_ti, " (%u bytes)", extlen*4); - offset++; + offset += extlen_len; switch (exttype) { + case 1: /* Beamforming Weights Extension type */ { /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/ @@ -580,7 +594,7 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info * break; } - /* Show num_bf_weights as a generated field */ + /* Show num_bf_weights (from preference) as a generated field */ proto_item *num_bf_weights_ti = proto_tree_add_uint(extension_tree, hf_oran_num_bf_weights, tvb, 0, 0, num_bf_weights); proto_item_set_generated(num_bf_weights_ti); @@ -642,7 +656,7 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info * tvb, bfw_offset, 0, "", "TRX %u: (", n); proto_tree *bfw_tree = proto_item_add_subtree(bfw_ti, ett_oran_bfw); - /* Get these raw, cast them to float and add them as items instead... */ + /* I values */ for (guint m=0; m < num_bf_weights; m++) { /* Get bits, and convert to float. */ guint32 bits = tvb_get_bits(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN); @@ -655,6 +669,8 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info * /* Leave a gap between I and Q values */ proto_item_append_text(bfw_ti, " "); + + /* Q values */ for (guint m=0; m < num_bf_weights; m++) { /* Get bits, and convert to float. */ guint32 bits = tvb_get_bits(tvb, bit_offset, iq_width, ENC_BIG_ENDIAN); @@ -672,6 +688,7 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info * /* pad */ break; } + case 6: /* Non-contiguous PRB allocation in time and frequency domain */ proto_tree_add_item(extension_tree, hf_oran_noncontig_res1, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(extension_tree, hf_oran_rbgSize, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -682,8 +699,86 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info * /* offset += 2; */ break; + case 11: /* Flexible Weights Extension Type */ + { + gboolean disableBFWs; + guint32 numBundPrbs; + + /* disableBFWs */ + proto_tree_add_item_ret_boolean(extension_tree, hf_oran_disable_bfws, + tvb, offset, 1, ENC_BIG_ENDIAN, &disableBFWs); + /* RAD */ + proto_tree_add_item(extension_tree, hf_oran_rad, + tvb, offset, 1, ENC_BIG_ENDIAN); + /* 6 reserved bits */ + offset++; + + /* numBundPrb */ + proto_tree_add_item_ret_uint(extension_tree, hf_oran_num_bund_prbs, + tvb, offset, 1, ENC_BIG_ENDIAN, &numBundPrbs); + + if (!disableBFWs) { + /********************************************/ + /* Table 5-36 */ + /********************************************/ + + /* bfwCompHdr (2 subheaders - bfwIqWidth and bfwCompMeth)*/ + guint32 bfwcomphdr_iq_width, bfwcomphdr_comp_meth; + /*proto_item *iqwidth_ti =*/ proto_tree_add_item_ret_uint(extension_tree, hf_oran_bfwCompHdr_iqWidth, + tvb, offset, 1, ENC_BIG_ENDIAN, &bfwcomphdr_iq_width); + /*proto_item *comp_meth_ti =*/ proto_tree_add_item_ret_uint(extension_tree, hf_oran_bfwCompHdr_compMeth, + tvb, offset, 1, ENC_BIG_ENDIAN, &bfwcomphdr_comp_meth); + offset++; + + + for (guint n=0; n < numBundPrbs; n++) { +#if 0 + + /* bfwCompParam */ + gboolean compression_method_supported = FALSE; + switch (bfwcomphdr_comp_meth) { + case 0: /* no compression */ + compression_method_supported = TRUE; + break; + case 1: /* block fl. point */ + case 2: /* block scaling */ + case 3: /* u-law */ + case 4: /* beamspace */ + default: + /* Not handled */ + break; + } + + /* beamId */ + proto_tree_add_item(extension_tree, hf_oran_beam_id, + tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* TODO: bfwI */ + + /* TODO: bfwQ */ + + /* TODO: remaining BFWs */ +#endif + } + } + else { + /********************************************/ + /* Table 5.37 */ + /********************************************/ + + for (guint n=0; n < numBundPrbs; n++) { + /* beamId */ + proto_tree_add_item(extension_tree, hf_oran_beam_id, + tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + } + } + } + break; + default: - /* TODO: Support other extension types. */ + /* TODO: Support remaining extension types. */ break; } @@ -1369,7 +1464,7 @@ proto_register_oran(void) /* Section 5.4.6.3 */ {&hf_oran_extlen, {"extLen", "oran_fh_cus.extLen", - FT_UINT8, BASE_DEC, + FT_UINT16, BASE_DEC, NULL, 0x0, "Extension length in 32-bit words", HFILL} @@ -1824,7 +1919,37 @@ proto_register_oran(void) "This is a calculated field for the RefA ID, which provides a " "reference in time.", HFILL } - } + }, + + { &hf_oran_disable_bfws, + { "disableBFWs", "oran_fh_cus.disableBFWs", + FT_BOOLEAN, 8, + NULL, 0x80, + "Indicate if BFWs under section extension are disabled.", + HFILL } + }, + { &hf_oran_rad, + { "RAD", "oran_fh_cus.rad", + FT_BOOLEAN, 8, + NULL, 0x40, + "Reset After PRB Discontinuity.", + HFILL } + }, + { &hf_oran_num_bund_prbs, + { "numBundPrb", "oran_fh_cus.numBundPrbs", + FT_UINT8, BASE_DEC, + NULL, 0x0, + "Number of bundled PRBs per BFWs.", + HFILL } + }, + { &hf_oran_beam_id, + { "beamId", "oran_fh_cus.beamId", + FT_UINT16, BASE_DEC, + NULL, 0x7fff, + NULL, + HFILL } + }, + }; /* Setup protocol subtree array */