MAC NR: align Multiple Entry PHR MAC CE decoding with v15.3.0

Change-Id: I4ca2284c3b0418116e810a7c66d693a3647e4191
Reviewed-on: https://code.wireshark.org/review/30217
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
This commit is contained in:
Pascal Quantin 2018-10-15 10:19:55 +02:00
parent 8bbfed56f4
commit 016f3665d5
2 changed files with 13 additions and 44 deletions

View File

@ -42,7 +42,6 @@ static int hf_mac_nr_context_rnti = -1;
static int hf_mac_nr_context_rnti_type = -1;
static int hf_mac_nr_context_ueid = -1;
static int hf_mac_nr_context_bcch_transport_channel = -1;
static int hf_mac_nr_context_phr_type2_pcell = -1;
static int hf_mac_nr_context_phr_type2_othercell = -1;
@ -104,9 +103,8 @@ static int hf_mac_nr_control_me_phr_entry = -1;
static int hf_mac_nr_control_me_phr_p = -1;
static int hf_mac_nr_control_me_phr_v = -1;
static int hf_mac_nr_control_me_phr_reserved_2 = -1;
static int hf_mac_nr_control_me_phr_ph_type2_pcell = -1;
static int hf_mac_nr_control_me_phr_ph_type2_pscell_or_pucch_scell = -1;
static int hf_mac_nr_control_me_phr_ph_typex_pcell = -1;
static int hf_mac_nr_control_me_phr_ph_type2_spcell = -1;
static int hf_mac_nr_control_me_phr_ph_type1_pcell = -1;
static int hf_mac_nr_control_me_phr_ph_c31 = -1;
static int hf_mac_nr_control_me_phr_ph_c30 = -1;
static int hf_mac_nr_control_me_phr_ph_c29 = -1;
@ -1775,16 +1773,12 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* PCell entries */
guint32 PH;
proto_item *entry_ti;
if (p_mac_nr_info->phr_type2_pcell) {
entry_ti = dissect_me_phr_ph(tvb, pinfo, subheader_ti, &hf_mac_nr_control_me_phr_ph_type2_pcell, &PH, &offset);
proto_item_append_text(entry_ti, " (Type 2 PCell PH=%u)", PH);
}
if (p_mac_nr_info->phr_type2_othercell) {
entry_ti = dissect_me_phr_ph(tvb, pinfo, subheader_ti, &hf_mac_nr_control_me_phr_ph_type2_pscell_or_pucch_scell, &PH, &offset);
proto_item_append_text(entry_ti, " (Type2, PSCell or PUCCH SCell PH=%u)", PH);
entry_ti = dissect_me_phr_ph(tvb, pinfo, subheader_ti, &hf_mac_nr_control_me_phr_ph_type2_spcell, &PH, &offset);
proto_item_append_text(entry_ti, " (Type2, SpCell PH=%u)", PH);
}
entry_ti = dissect_me_phr_ph(tvb, pinfo, subheader_ti, &hf_mac_nr_control_me_phr_ph_typex_pcell, &PH, &offset);
proto_item_append_text(entry_ti, " (TypeX, PCell PH=%u)", PH);
entry_ti = dissect_me_phr_ph(tvb, pinfo, subheader_ti, &hf_mac_nr_control_me_phr_ph_type1_pcell, &PH, &offset);
proto_item_append_text(entry_ti, " (Type1, PCell PH=%u)", PH);
/* SCell entries */
@ -2429,11 +2423,6 @@ static int dissect_mac_nr(tvbuff_t *tvb, packet_info *pinfo,
PROTO_ITEM_SET_GENERATED(ti);
}
/* Type 2 PCell */
ti = proto_tree_add_boolean(context_tree, hf_mac_nr_context_phr_type2_pcell,
tvb, 0, 0, p_mac_nr_info->phr_type2_pcell);
PROTO_ITEM_SET_GENERATED(ti);
/* Type 2 other */
ti = proto_tree_add_boolean(context_tree, hf_mac_nr_context_phr_type2_othercell,
tvb, 0, 0, p_mac_nr_info->phr_type2_othercell);
@ -2532,10 +2521,6 @@ static gboolean dissect_mac_nr_heur(tvbuff_t *tvb, packet_info *pinfo,
p_mac_nr_info->subframeNumber = tvb_get_bits8(tvb, ((offset+1)<<3)+4, 4);
offset += 2;
break;
case MAC_NR_PHR_TYPE2_PCELL_TAG:
p_mac_nr_info->phr_type2_pcell = tvb_get_guint8(tvb, offset);
offset++;
break;
case MAC_NR_PHR_TYPE2_OTHERCELL_TAG:
p_mac_nr_info->phr_type2_othercell = tvb_get_guint8(tvb, offset);
offset++;
@ -2654,12 +2639,6 @@ void proto_register_mac_nr(void)
"Transport channel BCCH data was carried on", HFILL
}
},
{ &hf_mac_nr_context_phr_type2_pcell,
{ "PHR Type2 PCell PHR",
"mac-nr.type2-pcell", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_mac_nr_context_phr_type2_othercell,
{ "PHR Type2 other cell PHR",
"mac-nr.type2-other-cell", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
@ -3128,21 +3107,15 @@ void proto_register_mac_nr(void)
NULL, HFILL
}
},
{ &hf_mac_nr_control_me_phr_ph_type2_pcell,
{ "Power Headroom (Type2, PCell)",
"mac-nr.control.me-phr.ph.type2-pcell", FT_UINT8, BASE_DEC, NULL, 0x3f,
NULL, HFILL
}
},
{ &hf_mac_nr_control_me_phr_ph_type2_pscell_or_pucch_scell,
{ "Power Headroom, (Type2, PSCell or PUCCH SCell)",
{ &hf_mac_nr_control_me_phr_ph_type2_spcell,
{ "Power Headroom, (Type2, SpCell)",
"mac-nr.control.me-phr.ph", FT_UINT8, BASE_DEC, NULL, 0x3f,
NULL, HFILL
}
},
{ &hf_mac_nr_control_me_phr_ph_typex_pcell,
{ "Power Headroom (TypeX, PCell)",
"mac-nr.control.me-phr.ph.typex-pcell", FT_UINT8, BASE_DEC, NULL, 0x3f,
{ &hf_mac_nr_control_me_phr_ph_type1_pcell,
{ "Power Headroom (Type1, PCell)",
"mac-nr.control.me-phr.ph.type1-pcell", FT_UINT8, BASE_DEC, NULL, 0x3f,
NULL, HFILL
}
},

View File

@ -37,8 +37,7 @@ typedef struct mac_nr_info
guint16 rnti;
guint16 ueid;
/* Will these be include in the ME PHR report? */
guint8 phr_type2_pcell;
/* Will these be included in the ME PHR report? */
guint8 phr_type2_othercell;
/* Timing info */
@ -97,10 +96,7 @@ void set_mac_nr_proto_data(packet_info *pinfo, mac_nr_info *p_mac_nr_info);
#define MAC_NR_FRAME_SUBFRAME_TAG 0x04
/* 2 bytes, network order, SFN is stored in 12 MSB and SF in 4 LSB */
#define MAC_NR_PHR_TYPE2_PCELL_TAG 0x05
/* 1 byte, TRUE/FALSE */
#define MAC_NR_PHR_TYPE2_OTHERCELL_TAG 0x06
#define MAC_NR_PHR_TYPE2_OTHERCELL_TAG 0x05
/* 1 byte, TRUE/FALSE */