aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-05-16 08:28:03 (GMT)
committerJouni Malinen <j@w1.fi>2020-05-16 08:28:03 (GMT)
commit094c8a6218d0fe8b178a5ad24c1a0e7b46fdbf43 (patch)
treedf8fe24c4e38210f8d7f1acb6c6e48c30b56e2dc
parent04030e8c0dcef6c2423eee1419e13e0ba738c4bb (diff)
downloadhostap-094c8a6218d0fe8b178a5ad24c1a0e7b46fdbf43.zip
hostap-094c8a6218d0fe8b178a5ad24c1a0e7b46fdbf43.tar.gz
hostap-094c8a6218d0fe8b178a5ad24c1a0e7b46fdbf43.tar.bz2
Remove unnecessary key clearing at AP start with nl80211
cfg80211 takes care of key removal when link/association is lost, so there is no need to explicitly clear old keys when starting AP. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/ap/ap_drv_ops.c6
-rw-r--r--src/ap/ap_drv_ops.h1
-rw-r--r--src/ap/hostapd.c3
3 files changed, 9 insertions, 1 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 1f284f0..904236b 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -650,6 +650,12 @@ int hostapd_drv_none(struct hostapd_data *hapd)
}
+bool hostapd_drv_nl80211(struct hostapd_data *hapd)
+{
+ return hapd->driver && os_strcmp(hapd->driver->name, "nl80211") == 0;
+}
+
+
int hostapd_driver_scan(struct hostapd_data *hapd,
struct wpa_driver_scan_params *params)
{
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index 56d1ad8..811d26a 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -80,6 +80,7 @@ hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
u16 *flags, u8 *dfs_domain);
int hostapd_driver_commit(struct hostapd_data *hapd);
int hostapd_drv_none(struct hostapd_data *hapd);
+bool hostapd_drv_nl80211(struct hostapd_data *hapd);
int hostapd_driver_scan(struct hostapd_data *hapd,
struct wpa_driver_scan_params *params);
struct wpa_scan_results * hostapd_driver_get_scan_results(
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 79ad38c..0f5a37f 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -1182,7 +1182,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
hostapd_set_privacy(hapd, 0);
#ifdef CONFIG_WEP
- hostapd_broadcast_wep_clear(hapd);
+ if (!hostapd_drv_nl80211(hapd))
+ hostapd_broadcast_wep_clear(hapd);
if (hostapd_setup_encryption(conf->iface, hapd))
return -1;
#endif /* CONFIG_WEP */