HE: Fix Operation Parameters order
According to P802.11ax/D4.0 9.4.2.238 (HE Operation element) the BSS Color Information field is located after the HE Operation Parameters field. Fix the ordering of the bit masks/offsets for fields in these 3+1 octets used as a single 32-bit value. With these changes, Wireshark 3.2 is able to properly parse and display Beacon frames. Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
83f30fabe3
commit
7cac255632
2 changed files with 21 additions and 18 deletions
|
@ -64,9 +64,6 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
|
||||||
oper = (struct ieee80211_he_operation *) pos;
|
oper = (struct ieee80211_he_operation *) pos;
|
||||||
os_memset(oper, 0, sizeof(*oper));
|
os_memset(oper, 0, sizeof(*oper));
|
||||||
|
|
||||||
if (hapd->iface->conf->he_op.he_bss_color)
|
|
||||||
oper->he_oper_params |= hapd->iface->conf->he_op.he_bss_color;
|
|
||||||
|
|
||||||
if (hapd->iface->conf->he_op.he_default_pe_duration)
|
if (hapd->iface->conf->he_op.he_default_pe_duration)
|
||||||
oper->he_oper_params |=
|
oper->he_oper_params |=
|
||||||
(hapd->iface->conf->he_op.he_default_pe_duration <<
|
(hapd->iface->conf->he_op.he_default_pe_duration <<
|
||||||
|
@ -80,6 +77,11 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
|
||||||
(hapd->iface->conf->he_op.he_rts_threshold <<
|
(hapd->iface->conf->he_op.he_rts_threshold <<
|
||||||
HE_OPERATION_RTS_THRESHOLD_OFFSET);
|
HE_OPERATION_RTS_THRESHOLD_OFFSET);
|
||||||
|
|
||||||
|
if (hapd->iface->conf->he_op.he_bss_color)
|
||||||
|
oper->he_oper_params |=
|
||||||
|
(hapd->iface->conf->he_op.he_bss_color <<
|
||||||
|
HE_OPERATION_BSS_COLOR_OFFSET);
|
||||||
|
|
||||||
/* TODO: conditional MaxBSSID Indicator subfield */
|
/* TODO: conditional MaxBSSID Indicator subfield */
|
||||||
|
|
||||||
pos += sizeof(*oper);
|
pos += sizeof(*oper);
|
||||||
|
|
|
@ -2128,21 +2128,22 @@ struct ieee80211_he_operation {
|
||||||
|
|
||||||
/* HE Operation defines */
|
/* HE Operation defines */
|
||||||
/* HE Operation Parameters and BSS Color Information fields */
|
/* HE Operation Parameters and BSS Color Information fields */
|
||||||
#define HE_OPERATION_BSS_COLOR_MASK ((u32) (BIT(0) | BIT(1) | \
|
#define HE_OPERATION_DFLT_PE_DURATION_MASK ((u32) (BIT(0) | BIT(1) | \
|
||||||
BIT(2) | BIT(3) | \
|
BIT(2)))
|
||||||
BIT(4) | BIT(5)))
|
#define HE_OPERATION_DFLT_PE_DURATION_OFFSET 0
|
||||||
#define HE_OPERATION_PARTIAL_BSS_COLOR ((u32) BIT(6))
|
#define HE_OPERATION_TWT_REQUIRED ((u32) BIT(3))
|
||||||
#define HE_OPERATION_BSS_COLOR_DISABLED ((u32) BIT(7))
|
#define HE_OPERATION_RTS_THRESHOLD_MASK ((u32) (BIT(4) | BIT(5) | \
|
||||||
#define HE_OPERATION_DFLT_PE_DURATION_MASK ((u32) (BIT(8) | BIT(9) | \
|
BIT(6) | BIT(7) | \
|
||||||
BIT(10)))
|
BIT(8) | BIT(9) | \
|
||||||
#define HE_OPERATION_DFLT_PE_DURATION_OFFSET 8
|
BIT(10) | BIT(11) | \
|
||||||
#define HE_OPERATION_TWT_REQUIRED ((u32) BIT(11))
|
BIT(12) | BIT(13)))
|
||||||
#define HE_OPERATION_RTS_THRESHOLD_MASK ((u32) (BIT(12) | BIT(13) | \
|
#define HE_OPERATION_RTS_THRESHOLD_OFFSET 4
|
||||||
BIT(14) | BIT(15) | \
|
#define HE_OPERATION_BSS_COLOR_MASK ((u32) (BIT(24) | BIT(25) | \
|
||||||
BIT(16) | BIT(17) | \
|
BIT(26) | BIT(27) | \
|
||||||
BIT(18) | BIT(19) | \
|
BIT(28) | BIT(29)))
|
||||||
BIT(20) | BIT(21)))
|
#define HE_OPERATION_PARTIAL_BSS_COLOR ((u32) BIT(30))
|
||||||
#define HE_OPERATION_RTS_THRESHOLD_OFFSET 12
|
#define HE_OPERATION_BSS_COLOR_DISABLED ((u32) BIT(31))
|
||||||
|
#define HE_OPERATION_BSS_COLOR_OFFSET 24
|
||||||
|
|
||||||
struct ieee80211_he_mu_edca_parameter_set {
|
struct ieee80211_he_mu_edca_parameter_set {
|
||||||
u8 he_qos_info;
|
u8 he_qos_info;
|
||||||
|
|
Loading…
Reference in a new issue