mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Allow HE-without-VHT to add the Channel Switch Wrapper element
Modify the check for VHT to include an option for HE in hostapd_eid_wb_chsw_wrapper() and its callers to allow the Channel Switch Wrapper element with the Wide Bandwidth Channel Switch subelement to be included in Beacon and Probe Response frames when AP is operating in HE mode without VHT. Signed-off-by: Muna Sinada <msinada@codeaurora.org>
This commit is contained in:
parent
d51b1b7a66
commit
621745917f
@ -560,10 +560,13 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
|
|||||||
pos = hostapd_eid_vht_capabilities(hapd, pos, 0);
|
pos = hostapd_eid_vht_capabilities(hapd, pos, 0);
|
||||||
pos = hostapd_eid_vht_operation(hapd, pos);
|
pos = hostapd_eid_vht_operation(hapd, pos);
|
||||||
pos = hostapd_eid_txpower_envelope(hapd, pos);
|
pos = hostapd_eid_txpower_envelope(hapd, pos);
|
||||||
pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211AC */
|
#endif /* CONFIG_IEEE80211AC */
|
||||||
|
|
||||||
|
if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) ||
|
||||||
|
hapd->iconf->ieee80211ax)
|
||||||
|
pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
|
||||||
|
|
||||||
pos = hostapd_eid_fils_indic(hapd, pos, 0);
|
pos = hostapd_eid_fils_indic(hapd, pos, 0);
|
||||||
pos = hostapd_get_rsnxe(hapd, pos, epos - pos);
|
pos = hostapd_get_rsnxe(hapd, pos, epos - pos);
|
||||||
|
|
||||||
@ -1281,10 +1284,13 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
|
|||||||
tailpos = hostapd_eid_vht_capabilities(hapd, tailpos, 0);
|
tailpos = hostapd_eid_vht_capabilities(hapd, tailpos, 0);
|
||||||
tailpos = hostapd_eid_vht_operation(hapd, tailpos);
|
tailpos = hostapd_eid_vht_operation(hapd, tailpos);
|
||||||
tailpos = hostapd_eid_txpower_envelope(hapd, tailpos);
|
tailpos = hostapd_eid_txpower_envelope(hapd, tailpos);
|
||||||
tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211AC */
|
#endif /* CONFIG_IEEE80211AC */
|
||||||
|
|
||||||
|
if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) ||
|
||||||
|
hapd->iconf->ieee80211ax)
|
||||||
|
tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
|
||||||
|
|
||||||
tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
|
tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
|
||||||
tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos);
|
tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos);
|
||||||
|
|
||||||
|
@ -5570,7 +5570,8 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid)
|
|||||||
int freq1;
|
int freq1;
|
||||||
|
|
||||||
if (!hapd->cs_freq_params.channel ||
|
if (!hapd->cs_freq_params.channel ||
|
||||||
!hapd->cs_freq_params.vht_enabled)
|
(!hapd->cs_freq_params.vht_enabled &&
|
||||||
|
!hapd->cs_freq_params.he_enabled))
|
||||||
return eid;
|
return eid;
|
||||||
|
|
||||||
/* bandwidth: 0: 40, 1: 80, 2: 160, 3: 80+80 */
|
/* bandwidth: 0: 40, 1: 80, 2: 160, 3: 80+80 */
|
||||||
|
Loading…
Reference in New Issue
Block a user