Message ID | 20200130090814.70512-1-ouden.lin@realtek.com |
---|---|
State | Accepted |
Headers | show |
Series | SAE: nl80211 send mlme frame fail (external auth) | expand |
On Thu, Jan 30, 2020 at 05:08:14PM +0800, Ouden Lin wrote: > When external authentication is used, the station send mlme frame (auth) > to driver that can't get the frequency (bss->freq) after hostap.git commit > b6f8b5a9 ("nl80211: Update freq only when CSA completes"). > > This patch will use the assoc_freq to send the mlem frame, > when external authentication is used. Thanks, applied with some cleanup.
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 64bea49e1..fa0a73094 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -3747,6 +3747,20 @@ static int wpa_driver_nl80211_send_mlme(struct i802_bss *bss, const u8 *data, encrypt = 0; } + if (freq == 0 && drv->nlmode == NL80211_IFTYPE_STATION && + ((drv->capa.flags & WPA_DRIVER_FLAGS_SAE) && + !(drv->capa.flags & WPA_DRIVER_FLAGS_SME)) && + WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT && + WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_AUTH) { + + if (freq == 0) { + freq = nl80211_get_assoc_freq(drv); + wpa_printf(MSG_DEBUG, + "nl80211: send_mlme - Use assoc_freq=%u for external auth", + freq); + } + } + if (freq == 0 && drv->nlmode == NL80211_IFTYPE_ADHOC) { freq = nl80211_get_assoc_freq(drv); wpa_printf(MSG_DEBUG,