The signal strength and noise in dB from an arbitrary reference are unsigned.
The radiotap spec says "dB antenna signal" and "dB antenna noise" are unsigned. Make it universally so. Change-Id: Iea2c5360d7352ca5e84862ea338d1fc689272191 Reviewed-on: https://code.wireshark.org/review/30410 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
b6fe64017a
commit
6177f0eb42
|
@ -861,8 +861,8 @@ dissect_wlan_radio_phdr(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
}
|
||||
|
||||
if (phdr->has_signal_db) {
|
||||
col_add_fstr(pinfo->cinfo, COL_RSSI, "%d dB", phdr->signal_db);
|
||||
proto_tree_add_int(radio_tree, hf_wlan_radio_signal_db, tvb, 0, 0, phdr->signal_db);
|
||||
col_add_fstr(pinfo->cinfo, COL_RSSI, "%u dB", phdr->signal_db);
|
||||
proto_tree_add_uint(radio_tree, hf_wlan_radio_signal_db, tvb, 0, 0, phdr->signal_db);
|
||||
}
|
||||
|
||||
if (phdr->has_signal_dbm) {
|
||||
|
@ -875,7 +875,7 @@ dissect_wlan_radio_phdr(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
}
|
||||
|
||||
if (phdr->has_noise_db) {
|
||||
proto_tree_add_int(radio_tree, hf_wlan_radio_noise_db, tvb, 0, 0, phdr->noise_db);
|
||||
proto_tree_add_uint(radio_tree, hf_wlan_radio_noise_db, tvb, 0, 0, phdr->noise_db);
|
||||
}
|
||||
|
||||
if (phdr->has_noise_dbm) {
|
||||
|
@ -1413,7 +1413,7 @@ void proto_register_ieee80211_radio(void)
|
|||
"Signal strength, as percentage of maximum RSSI", HFILL }},
|
||||
|
||||
{&hf_wlan_radio_signal_db,
|
||||
{"Signal strength (dB)", "wlan_radio.signal_db", FT_INT8, BASE_DEC|BASE_UNIT_STRING, &units_decibels, 0,
|
||||
{"Signal strength (dB)", "wlan_radio.signal_db", FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_decibels, 0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{&hf_wlan_radio_signal_dbm,
|
||||
|
@ -1425,7 +1425,7 @@ void proto_register_ieee80211_radio(void)
|
|||
NULL, HFILL }},
|
||||
|
||||
{&hf_wlan_radio_noise_db,
|
||||
{"Noise level (dB)", "wlan_radio.noise_db", FT_INT8, BASE_DEC|BASE_UNIT_STRING, &units_decibels, 0,
|
||||
{"Noise level (dB)", "wlan_radio.noise_db", FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_decibels, 0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{&hf_wlan_radio_noise_dbm,
|
||||
|
|
|
@ -400,8 +400,8 @@ struct _radiotap_info {
|
|||
guint32 rate;
|
||||
gint8 dbm_antsignal;
|
||||
gint8 dbm_antnoise;
|
||||
gint8 db_antsignal;
|
||||
gint8 db_antnoise;
|
||||
guint8 db_antsignal;
|
||||
guint8 db_antnoise;
|
||||
guint32 freq;
|
||||
guint32 flags;
|
||||
guint64 tsft;
|
||||
|
@ -1700,12 +1700,12 @@ dissect_radiotap_db_antsignal(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
proto_tree *tree, int offset, struct _radiotap_info *radiotap_info,
|
||||
struct ieee_802_11_phdr *phdr)
|
||||
{
|
||||
gint8 db = tvb_get_gint8(tvb, offset);
|
||||
guint8 db = tvb_get_guint8(tvb, offset);
|
||||
|
||||
phdr->has_signal_db = TRUE;
|
||||
phdr->signal_db = db;
|
||||
col_add_fstr(pinfo->cinfo, COL_RSSI, "%d dB", db);
|
||||
proto_tree_add_int(tree, hf_radiotap_db_antsignal, tvb, offset, 1, db);
|
||||
col_add_fstr(pinfo->cinfo, COL_RSSI, "%u dB", db);
|
||||
proto_tree_add_uint(tree, hf_radiotap_db_antsignal, tvb, offset, 1, db);
|
||||
radiotap_info->db_antsignal = db;
|
||||
|
||||
}
|
||||
|
@ -1715,12 +1715,12 @@ dissect_radiotap_db_antnoise(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
proto_tree *tree, int offset, struct _radiotap_info *radiotap_info,
|
||||
struct ieee_802_11_phdr *phdr)
|
||||
{
|
||||
gint db = tvb_get_gint8(tvb, offset);
|
||||
guint db = tvb_get_guint8(tvb, offset);
|
||||
|
||||
phdr->has_noise_db = TRUE;
|
||||
phdr->noise_db = db;
|
||||
if (tree) {
|
||||
proto_tree_add_int(tree, hf_radiotap_db_antnoise, tvb, offset,
|
||||
proto_tree_add_uint(tree, hf_radiotap_db_antnoise, tvb, offset,
|
||||
1, db);
|
||||
}
|
||||
radiotap_info->db_antnoise = db;
|
||||
|
|
|
@ -822,8 +822,8 @@ struct ieee_802_11_phdr {
|
|||
guint8 noise_percent; /* Noise level, as a percentage */
|
||||
gint8 signal_dbm; /* Signal level, in dBm */
|
||||
gint8 noise_dbm; /* Noise level, in dBm */
|
||||
gint8 signal_db; /* Signal level, in dB from an arbitrary point */
|
||||
gint8 noise_db; /* Noise level, in dB from an arbitrary point */
|
||||
guint8 signal_db; /* Signal level, in dB from an arbitrary point */
|
||||
guint8 noise_db; /* Noise level, in dB from an arbitrary point */
|
||||
guint64 tsf_timestamp;
|
||||
guint32 aggregate_flags; /* A-MPDU flags */
|
||||
guint32 aggregate_id; /* ID for A-MPDU reassembly */
|
||||
|
|
Loading…
Reference in New Issue