aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mac-nr.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2018-10-23 10:37:25 +0200
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2018-10-23 09:01:15 +0000
commit1a0d82583d835e4b241e8cb0885ffbac4c278842 (patch)
tree24ffcd6ab20b195227a694e4569e2833c671f631 /epan/dissectors/packet-mac-nr.c
parentafb96d1ce10760e3a9e270995c107ca38278cd5e (diff)
MAC NR: put conditions on HarqId and PUCCH report type display
Both are only applicable for unicast transmissions, and the latter is only meaningful for UL-SCH Change-Id: If8a512b02964ec1be63a3901bd8c84082325659e Reviewed-on: https://code.wireshark.org/review/30342 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'epan/dissectors/packet-mac-nr.c')
-rw-r--r--epan/dissectors/packet-mac-nr.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/epan/dissectors/packet-mac-nr.c b/epan/dissectors/packet-mac-nr.c
index 1587780653..97af01c5a5 100644
--- a/epan/dissectors/packet-mac-nr.c
+++ b/epan/dissectors/packet-mac-nr.c
@@ -2424,15 +2424,19 @@ static int dissect_mac_nr(tvbuff_t *tvb, packet_info *pinfo,
PROTO_ITEM_SET_GENERATED(ti);
}
- /* Harqid */
- ti = proto_tree_add_uint(context_tree, hf_mac_nr_context_harqid,
- tvb, 0, 0, p_mac_nr_info->harqid);
- PROTO_ITEM_SET_GENERATED(ti);
+ if (p_mac_nr_info->rntiType == C_RNTI || p_mac_nr_info->rntiType == CS_RNTI) {
+ /* Harqid */
+ ti = proto_tree_add_uint(context_tree, hf_mac_nr_context_harqid,
+ tvb, 0, 0, p_mac_nr_info->harqid);
+ 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);
- PROTO_ITEM_SET_GENERATED(ti);
+ if (p_mac_nr_info->direction == DIRECTION_UPLINK) {
+ /* 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);
+ PROTO_ITEM_SET_GENERATED(ti);
+ }
+ }
/* Dissect the MAC PDU itself. Format depends upon RNTI type. */