Merge "Add comment to indicate that WifiChannelWidthInMhz is copied from the Vendor HAL." into main
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index c906b33..3b96d55 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -11830,15 +11830,6 @@
if (!addr)
addr = drv->perm_addr;
- /*
- * Try to change the address first without setting the interface
- * down and then fall back to DOWN/set addr/UP if the first
- * attempt failed. This can reduce the interface setup time
- * significantly with some drivers.
- */
- if (!linux_set_ifhwaddr(drv->global->ioctl_sock, bss->ifname, addr))
- goto done;
-
if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 0) < 0)
return -1;
@@ -11855,19 +11846,18 @@
return -1;
}
- if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1) < 0)
- {
- wpa_printf(MSG_DEBUG,
- "nl80211: Could not restore interface UP after set_mac_addr");
- }
-
-done:
wpa_printf(MSG_DEBUG, "nl80211: set_mac_addr for %s to " MACSTR,
bss->ifname, MAC2STR(addr));
drv->addr_changed = new_addr;
os_memcpy(bss->prev_addr, bss->addr, ETH_ALEN);
os_memcpy(bss->addr, addr, ETH_ALEN);
+ if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1) < 0)
+ {
+ wpa_printf(MSG_DEBUG,
+ "nl80211: Could not restore interface UP after set_mac_addr");
+ }
+
return 0;
}
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index c296903..a1746da 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -471,8 +471,21 @@
if (wpa_s->sme.ext_auth_wpa_ssid == ssid)
wpa_s->sme.ext_auth_wpa_ssid = NULL;
#endif /* CONFIG_SME && CONFIG_SAE */
- if (wpa_s->wpa)
+ if (wpa_s->wpa) {
+ if ((wpa_key_mgmt_sae(ssid->key_mgmt) &&
+ (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SAE_OFFLOAD_STA)) ||
+ ((ssid->key_mgmt & WPA_KEY_MGMT_OWE) &&
+ (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA))) {
+ /* For cases when PMK is generated at the driver */
+ struct wpa_pmkid_params params;
+
+ os_memset(¶ms, 0, sizeof(params));
+ params.ssid = ssid->ssid;
+ params.ssid_len = ssid->ssid_len;
+ wpa_drv_remove_pmkid(wpa_s, ¶ms);
+ }
wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
+ }
if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s &&
!wpa_s->p2p_mgmt) {
wpas_dbus_unregister_network(wpa_s, ssid->id);
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 517d37f..6e34e87 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4750,6 +4750,11 @@
{
struct wpa_ssid *ssid;
+ if (wpa_s->drv_flags2 &
+ (WPA_DRIVER_FLAGS2_SAE_OFFLOAD_STA |
+ WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA))
+ wpa_drv_flush_pmkid(wpa_s);
+
if (wpa_s->sched_scanning)
wpa_supplicant_cancel_sched_scan(wpa_s);