diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 13ecd11d3..97c6bf1ad 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -3975,15 +3975,26 @@ 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) && + if (is_sta_interface(drv->nlmode) && WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT && WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_AUTH) { - 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->capa.flags & WPA_DRIVER_FLAGS_SAE) && + !(drv->capa.flags & WPA_DRIVER_FLAGS_SME)) { + freq = nl80211_get_assoc_freq(drv); + wpa_printf(MSG_DEBUG, + "nl80211: send_mlme - Use assoc_freq=%u for external auth", + freq); + } + + /* Allow off channel for PASN authentication */ + if (data_len >= IEEE80211_HDRLEN + 2 && + WPA_GET_LE16(data + IEEE80211_HDRLEN) == WLAN_AUTH_PASN && + !offchanok) { + wpa_printf(MSG_DEBUG, + "nl80211: send_mlme: allow off channel for PASN"); + offchanok = 1; + } } if (freq == 0 && drv->nlmode == NL80211_IFTYPE_ADHOC) {