forked from osmocom/wireshark
Fill in pseudo-header fields in order, and add the group ID for 11ac.
Change-Id: I0011917b77b1adc0cb6effd5d9d902f541675d78 Reviewed-on: https://code.wireshark.org/review/20066 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
6a3762576b
commit
6bbbc3456b
1 changed files with 16 additions and 14 deletions
|
@ -459,23 +459,23 @@ prism_rate_return_sig(guint32 rate_phy1, guint32 rate_phy2, struct ieee_802_11_p
|
|||
phdr->phy = PHDR_802_11_PHY_11N;
|
||||
sig_a_1 = (rate_phy1 >> 4) & 0xFFFF;
|
||||
sig_a_2 = (rate_phy2) & 0xFFF;
|
||||
bw = 20 << ((sig_a_1 >> 7) & 1);
|
||||
phdr->phy_info.info_11n.has_bandwidth = 1;
|
||||
phdr->phy_info.info_11n.bandwidth = ((sig_a_1 >> 7) & 1);
|
||||
mcs = sig_a_1 & 0x7f;
|
||||
phdr->phy_info.info_11n.has_mcs_index = 1;
|
||||
phdr->phy_info.info_11n.mcs_index = mcs;
|
||||
bw = 20 << ((sig_a_1 >> 7) & 1);
|
||||
phdr->phy_info.info_11n.has_bandwidth = 1;
|
||||
phdr->phy_info.info_11n.bandwidth = ((sig_a_1 >> 7) & 1);
|
||||
sgi = (sig_a_2 >> 7) & 1;
|
||||
phdr->phy_info.info_11n.has_short_gi = 1;
|
||||
phdr->phy_info.info_11n.short_gi = sgi;
|
||||
phdr->phy_info.info_11n.has_ness = 1;
|
||||
phdr->phy_info.info_11n.ness = (sig_a_2 >> 8) & 3;
|
||||
ldpc = (sig_a_2 >> 6) & 1;
|
||||
phdr->phy_info.info_11n.has_fec = 1;
|
||||
phdr->phy_info.info_11n.fec = ldpc;
|
||||
stbc = ((sig_a_2 >> 4) & 3)?1:0;
|
||||
phdr->phy_info.info_11n.has_stbc_streams = 1;
|
||||
phdr->phy_info.info_11n.stbc_streams = stbc;
|
||||
phdr->phy_info.info_11n.has_ness = 1;
|
||||
phdr->phy_info.info_11n.ness = (sig_a_2 >> 8) & 3;
|
||||
nss = (mcs >> 3) + 1;
|
||||
/* Check limits */
|
||||
disp_rate = 0;
|
||||
|
@ -511,19 +511,21 @@ prism_rate_return_sig(guint32 rate_phy1, guint32 rate_phy2, struct ieee_802_11_p
|
|||
phdr->phy = PHDR_802_11_PHY_11AC;
|
||||
sig_a_1 = (rate_phy1 >> 4) & 0xFFFFFF;
|
||||
sig_a_2 = (rate_phy2) & 0xFFFFFF;
|
||||
bw = 20 << (sig_a_1 & 3);
|
||||
phdr->phy_info.info_11ac.has_bandwidth = 1;
|
||||
phdr->phy_info.info_11ac.bandwidth = bw_map[(sig_a_1 & 3)];
|
||||
sgi = sig_a_2 & 1;
|
||||
phdr->phy_info.info_11ac.has_short_gi = 1;
|
||||
phdr->phy_info.info_11ac.short_gi = sgi;
|
||||
ldpc = (sig_a_2 >> 2) & 1;
|
||||
phdr->phy_info.info_11ac.has_fec = 1;
|
||||
phdr->phy_info.info_11ac.fec = ldpc;
|
||||
stbc = (sig_a_1 >> 3) & 1;
|
||||
phdr->phy_info.info_11ac.has_stbc = 1;
|
||||
phdr->phy_info.info_11ac.stbc = stbc;
|
||||
sgi = sig_a_2 & 1;
|
||||
phdr->phy_info.info_11ac.has_short_gi = 1;
|
||||
phdr->phy_info.info_11ac.short_gi = sgi;
|
||||
bw = 20 << (sig_a_1 & 3);
|
||||
phdr->phy_info.info_11ac.has_bandwidth = 1;
|
||||
phdr->phy_info.info_11ac.bandwidth = bw_map[(sig_a_1 & 3)];
|
||||
ldpc = (sig_a_2 >> 2) & 1;
|
||||
phdr->phy_info.info_11ac.has_fec = 1;
|
||||
phdr->phy_info.info_11ac.fec = ldpc;
|
||||
groupid = (sig_a_1 >> 4) & 0x3F;
|
||||
phdr->phy_info.info_11ac.has_group_id = 1;
|
||||
phdr->phy_info.info_11ac.group_id = groupid;
|
||||
|
||||
if (groupid == 0 || groupid == 63)
|
||||
su_ppdu = TRUE;
|
||||
|
|
Loading…
Reference in a new issue