diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-04-08 16:09:10 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-04-08 23:09:51 +0000 |
commit | 90a00e1971f6ab86c30ae6856569a383b0e2fa9e (patch) | |
tree | e32138f748c0161c1678a00019746cbf48f24620 /epan/dissectors | |
parent | ffe2f138ab62c48467645a953fb0617bf2f1b39b (diff) |
Mark some fields as being in units of dBm.
Fix some formats to print unsigned values with %u while we're at it.
Change-Id: If4a8793c77d4fbff0dd19f17e31cd18107db02ba
Reviewed-on: https://code.wireshark.org/review/26810
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index a924c5d8f4..2cb0de3f0e 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -15910,12 +15910,12 @@ ieee80211_tag_country_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_fcn, tvb, offset, 1, ENC_LITTLE_ENDIAN); - proto_item_append_text(sub_item, ": First Channel Number: %d", + proto_item_append_text(sub_item, ": First Channel Number: %u", tvb_get_guint8(tvb, offset)); offset += 1; proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_nc, tvb, offset, 1, ENC_LITTLE_ENDIAN); - proto_item_append_text(sub_item, ", Number of Channels: %d", + proto_item_append_text(sub_item, ", Number of Channels: %u", tvb_get_guint8(tvb, offset)); offset += 1; proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_mtpl, @@ -15932,17 +15932,17 @@ ieee80211_tag_country_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_oei, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(sub_item, - ": Operating Extension Identifier: %d", + ": Operating Extension Identifier: %u", tvb_get_guint8(tvb, offset)); offset += 1; proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_oc, tvb, offset, 1, ENC_LITTLE_ENDIAN); - proto_item_append_text(sub_item, ", Operating Class: %d", + proto_item_append_text(sub_item, ", Operating Class: %u", tvb_get_guint8(tvb, offset)); offset += 1; proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_cc, tvb, offset, 1, ENC_LITTLE_ENDIAN); - proto_item_append_text(sub_item, ", Coverage Class: %d", + proto_item_append_text(sub_item, ", Coverage Class: %u", tvb_get_guint8(tvb, offset)); offset += 1; } @@ -23069,12 +23069,12 @@ proto_register_ieee80211(void) {&hf_ieee80211_ff_rm_tx_power, {"Transmit Power Used", "wlan.rm.tx_power", - FT_INT8, BASE_DEC, NULL, 0, + FT_INT8, BASE_DEC|BASE_UNIT_STRING, &units_dbm, 0, NULL, HFILL }}, {&hf_ieee80211_ff_rm_max_tx_power, {"Max Transmit Power", "wlan.rm.max_tx_power", - FT_INT8, BASE_DEC, NULL, 0, + FT_INT8, BASE_DEC|BASE_UNIT_STRING, &units_dbm, 0, NULL, HFILL }}, {&hf_ieee80211_ff_tpc, @@ -26444,8 +26444,8 @@ proto_register_ieee80211(void) NULL, HFILL }}, {&hf_ieee80211_tag_country_info_fnm_mtpl, - {"Maximum Transmit Power Level (in dBm)", "wlan.country_info.fnm.mtpl", - FT_UINT8, BASE_DEC, NULL, 0x0, + {"Maximum Transmit Power Level", "wlan.country_info.fnm.mtpl", + FT_INT8, BASE_DEC|BASE_UNIT_STRING, &units_dbm, 0, NULL, HFILL }}, {&hf_ieee80211_tag_country_info_rrc, |