diff options
author | dimeg <dimeg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-01-14 18:21:09 +0000 |
---|---|---|
committer | dimeg <dimeg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-01-14 18:21:09 +0000 |
commit | e47f77d8346e4925736d33443ff2a4733c345d6a (patch) | |
tree | 50916989c8b96a9ae7d0ab99d9cc34f182bb6a55 /epan/dissectors/packet-radiotap.c | |
parent | 538a97c5f6063de9ef9329bb5eb2a4f21675ef42 (diff) |
Fix for Bug 3747:
use FT_FLOAT for the radiotap data rate because of .5 Mbps granularity
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31526 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-radiotap.c')
-rw-r--r-- | epan/dissectors/packet-radiotap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-radiotap.c b/epan/dissectors/packet-radiotap.c index 94a708c341..4199013033 100644 --- a/epan/dissectors/packet-radiotap.c +++ b/epan/dissectors/packet-radiotap.c @@ -735,8 +735,8 @@ proto_register_radiotap(void) "Frequency Hopping Spread Spectrum hop pattern", HFILL } }, { &hf_radiotap_datarate, - { "Data rate", "radiotap.datarate", - FT_UINT32, BASE_DEC, NULL, 0x0, + { "Data rate (Mb/s)", "radiotap.datarate", + FT_FLOAT, BASE_NONE, NULL, 0x0, "Speed this frame was sent/received at", HFILL } }, { &hf_radiotap_antenna, @@ -978,9 +978,9 @@ dissect_radiotap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%d.%d", rate / 2, rate & 1 ? 5 : 0); if (tree) { - proto_tree_add_uint_format(radiotap_tree, hf_radiotap_datarate, - tvb, offset, 1, rate, - "Data Rate: %d.%d Mb/s", rate / 2, rate & 1 ? 5 : 0); + proto_tree_add_float_format(radiotap_tree, hf_radiotap_datarate, + tvb, offset, 1, (float)rate / 2, + "Data Rate: %.1f Mb/s", (float)rate / 2); } offset++; length_remaining--; |