aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211-radiotap.c
diff options
context:
space:
mode:
authorSimon Barber <simon.barber@meraki.net>2015-12-23 12:06:40 -0800
committerMichael Mann <mmann78@netscape.net>2015-12-25 02:44:30 +0000
commit8fa7e2fb3468efe659bee2ea4f7eec450c6cc31d (patch)
tree66f5d2fdb9b605c319ede57a8d13e1fe917e2383 /epan/dissectors/packet-ieee80211-radiotap.c
parentffa9e938e24779470c664ea8eca1e452ce025f97 (diff)
Refactoring: Use data bits per symbol MCS table to calculate rates and
remove redundant HT MCS/rate table. Preparation for duration calculations that will use this data as well. Change-Id: Iee4fb2eefb00eaa53a6368eca4ed60f705ff49df Reviewed-on: https://code.wireshark.org/review/12856 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-radiotap.c')
-rw-r--r--epan/dissectors/packet-ieee80211-radiotap.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c
index 82b242eb53..0dd965548c 100644
--- a/epan/dissectors/packet-ieee80211-radiotap.c
+++ b/epan/dissectors/packet-ieee80211-radiotap.c
@@ -1460,16 +1460,14 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u
* 802.11n doesn't support.)
*/
if (can_calculate_rate && mcs <= MAX_MCS_INDEX
- && ieee80211_float_htrates[mcs][bandwidth][gi_length] != 0.0) {
- col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%.1f",
- ieee80211_float_htrates[mcs][bandwidth][gi_length]);
+ && ieee80211_ht_Dbps[mcs] != 0) {
+ float rate = ieee80211_htrate(mcs, bandwidth, gi_length);
+ col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%.1f", rate);
if (tree) {
rate_ti = proto_tree_add_float_format(radiotap_tree,
- hf_radiotap_datarate,
- tvb, offset, 3,
- ieee80211_float_htrates[mcs][bandwidth][gi_length],
- "Data Rate: %.1f Mb/s",
- ieee80211_float_htrates[mcs][bandwidth][gi_length]);
+ hf_radiotap_datarate,
+ tvb, offset, 3, rate,
+ "Data Rate: %.1f Mb/s", rate);
PROTO_ITEM_SET_GENERATED(rate_ti);
}
}