diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-01-08 19:29:35 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-01-16 16:03:02 +0000 |
commit | fb0d51aa66a38b5ef133183978571957ba506393 (patch) | |
tree | d73d83ac65c2170e1eab82f3cce09fd9e1bcfe91 | |
parent | 5f76627ef26505f55d8fcbe8073279515f3b7304 (diff) | |
download | wireshark-fb0d51aa66a38b5ef133183978571957ba506393.tar.gz wireshark-fb0d51aa66a38b5ef133183978571957ba506393.tar.bz2 wireshark-fb0d51aa66a38b5ef133183978571957ba506393.zip |
802.11(ad): not longer need to use p_add_proto_data/p_get_proto_data for pass isGrant to beamforming control function
Change-Id: I719ff48a1992904c80c602f9706697e71b93ccba
Reviewed-on: https://code.wireshark.org/review/19640
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index fed32f01c7..e78cb3bd26 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -8552,9 +8552,8 @@ add_ff_beacon_interval_ctrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo } static guint -add_ff_beamforming_ctrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) +add_ff_beamforming_ctrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset, gboolean isGrant) { - gboolean isGrant = *((gboolean*)(p_get_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_CTRL_GRANT_OR_GRANT_ACK_KEY))); proto_item *bf_item = proto_tree_add_item(tree, hf_ieee80211_ff_bf, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree *bf_tree = proto_item_add_subtree(bf_item, ett_bf_tree); guint16 bf_field = tvb_get_letohs(tvb, offset); @@ -15841,7 +15840,6 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset } offset += 2; isGrant = ((ftype==CTRL_GRANT)||(ftype==CTRL_GRANT_ACK)); - p_add_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_CTRL_GRANT_OR_GRANT_ACK_KEY, &isGrant); for(i=0; i < tag_len; i+=15) { alloc_tree = proto_tree_add_subtree_format(tree, tvb, offset, 15, ett_allocation_tree, NULL, "Allocation %d", i/15); proto_tree_add_item(alloc_tree, hf_ieee80211_tag_allocation_id, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -15852,7 +15850,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset proto_tree_add_item(alloc_tree, hf_ieee80211_tag_pcp_active, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(alloc_tree, hf_ieee80211_tag_lp_sc_used, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - offset += add_ff_beamforming_ctrl(alloc_tree, tvb, pinfo, offset); + offset += add_ff_beamforming_ctrl(alloc_tree, tvb, pinfo, offset, isGrant); proto_tree_add_item(alloc_tree, hf_ieee80211_tag_src_aid, tvb, offset, 1, ENC_NA); offset += 1; proto_tree_add_item(alloc_tree, hf_ieee80211_tag_dest_aid, tvb, offset, 1, ENC_NA); @@ -16047,8 +16045,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset proto_tree_add_item(tree, hf_ieee80211_tag_tspec_dest_aid, tvb, offset, 3, ENC_LITTLE_ENDIAN); offset += 3; isGrant = ((ftype==CTRL_GRANT)||(ftype==CTRL_GRANT_ACK)); - p_add_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_CTRL_GRANT_OR_GRANT_ACK_KEY, &isGrant); - offset += add_ff_beamforming_ctrl(tree, tvb, pinfo, 2); + offset += add_ff_beamforming_ctrl(tree, tvb, pinfo, 2, isGrant); proto_tree_add_item(tree, hf_ieee80211_tag_tspec_allocation_period, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_ieee80211_tag_tspec_min_allocation, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -17500,8 +17497,7 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo, offset += 5; } isGrant = ((ctrl_type_subtype==CTRL_GRANT)||(ctrl_type_subtype==CTRL_GRANT_ACK)); - p_add_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_CTRL_GRANT_OR_GRANT_ACK_KEY, &isGrant); - add_ff_beamforming_ctrl(hdr_tree, tvb, pinfo, offset); + add_ff_beamforming_ctrl(hdr_tree, tvb, pinfo, offset, isGrant); /* offset += 2; */ break; } |