Include Extended Capabilities element based on scan results
Add Extended Capabilities element to association request only if the AP included this element in Beacon/Probe Response frames. This is a workaround to address interoperability issues with some older APs that do not seem to be able to handle Extended Capabilities element in (Re)Association Request frames. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
6903ee6f62
commit
8b3b803ab9
1 changed files with 21 additions and 11 deletions
|
@ -1278,8 +1278,6 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
||||||
int wep_keys_set = 0;
|
int wep_keys_set = 0;
|
||||||
int assoc_failed = 0;
|
int assoc_failed = 0;
|
||||||
struct wpa_ssid *old_ssid;
|
struct wpa_ssid *old_ssid;
|
||||||
u8 ext_capab[10];
|
|
||||||
int ext_capab_len;
|
|
||||||
#ifdef CONFIG_HT_OVERRIDES
|
#ifdef CONFIG_HT_OVERRIDES
|
||||||
struct ieee80211_ht_capabilities htcaps;
|
struct ieee80211_ht_capabilities htcaps;
|
||||||
struct ieee80211_ht_capabilities htcaps_mask;
|
struct ieee80211_ht_capabilities htcaps_mask;
|
||||||
|
@ -1491,6 +1489,17 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_HS20 */
|
#endif /* CONFIG_HS20 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Workaround: Add Extended Capabilities element only if the AP
|
||||||
|
* included this element in Beacon/Probe Response frames. Some older
|
||||||
|
* APs seem to have interoperability issues if this element is
|
||||||
|
* included, so while the standard may require us to include the
|
||||||
|
* element in all cases, it is justifiable to skip it to avoid
|
||||||
|
* interoperability issues.
|
||||||
|
*/
|
||||||
|
if (!bss || wpa_bss_get_ie(bss, WLAN_EID_EXT_CAPAB)) {
|
||||||
|
u8 ext_capab[10];
|
||||||
|
int ext_capab_len;
|
||||||
ext_capab_len = wpas_build_ext_capab(wpa_s, ext_capab);
|
ext_capab_len = wpas_build_ext_capab(wpa_s, ext_capab);
|
||||||
if (ext_capab_len > 0) {
|
if (ext_capab_len > 0) {
|
||||||
u8 *pos = wpa_ie;
|
u8 *pos = wpa_ie;
|
||||||
|
@ -1501,6 +1510,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
||||||
wpa_ie_len += ext_capab_len;
|
wpa_ie_len += ext_capab_len;
|
||||||
os_memcpy(pos, ext_capab, ext_capab_len);
|
os_memcpy(pos, ext_capab, ext_capab_len);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wpa_clear_keys(wpa_s, bss ? bss->bssid : NULL);
|
wpa_clear_keys(wpa_s, bss ? bss->bssid : NULL);
|
||||||
use_crypt = 1;
|
use_crypt = 1;
|
||||||
|
|
Loading…
Reference in a new issue