From bb83fe45519eb280e6545ad69868e4e7f5fbef93 Mon Sep 17 00:00:00 2001 From: Simon Barber Date: Wed, 6 Jan 2016 17:23:00 -0800 Subject: packet-ieee80211-radio.c: Minor refactor and whitespace cleanup Change-Id: Idad8f7eeed968eeed9f553fef98d58453f328afb Reviewed-on: https://code.wireshark.org/review/21421 Petri-Dish: Michael Mann Reviewed-by: Michael Mann Tested-by: Michael Mann --- wiretap/wtap.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'wiretap') diff --git a/wiretap/wtap.h b/wiretap/wtap.h index c5d9db4c5c..957dc76c6b 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -760,20 +760,22 @@ struct ieee_802_11ad { guint8 mcs; /* MCS index */ }; +union ieee_802_11_phy_info { + struct ieee_802_11_fhss info_11_fhss; + struct ieee_802_11b info_11b; + struct ieee_802_11a info_11a; + struct ieee_802_11g info_11g; + struct ieee_802_11n info_11n; + struct ieee_802_11ac info_11ac; + struct ieee_802_11ad info_11ad; +}; + struct ieee_802_11_phdr { gint fcs_len; /* Number of bytes of FCS - -1 means "unknown" */ gboolean decrypted; /* TRUE if frame is decrypted even if "protected" bit is set */ gboolean datapad; /* TRUE if frame has padding between 802.11 header and payload */ guint phy; /* PHY type */ - union { - struct ieee_802_11_fhss info_11_fhss; - struct ieee_802_11b info_11b; - struct ieee_802_11a info_11a; - struct ieee_802_11g info_11g; - struct ieee_802_11n info_11n; - struct ieee_802_11ac info_11ac; - struct ieee_802_11ad info_11ad; - } phy_info; + union ieee_802_11_phy_info phy_info; /* Which of this information is present? */ guint has_channel:1; -- cgit v1.2.1