Skip to content
Snippets Groups Projects
Commit 78f1974b authored by Daniel Golle's avatar Daniel Golle
Browse files

hostapd: update packaging and patches


Clean up conflicts/provides/depends hell and add PROVIDES for
eapol-test variants while at it.
Update mesh-DFS patchset from Peter Oh to v5 (with local fixes) which
allows to drop two revert-patches for upstream commits which previously
were necessary to un-break mesh-DFS support.

Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
parent dad39249
No related branches found
No related tags found
No related merge requests found
Showing
with 250 additions and 436 deletions
...@@ -4,8 +4,10 @@ config WPA_SUPPLICANT_NO_TIMESTAMP_CHECK ...@@ -4,8 +4,10 @@ config WPA_SUPPLICANT_NO_TIMESTAMP_CHECK
depends on PACKAGE_wpa-supplicant || \ depends on PACKAGE_wpa-supplicant || \
PACKAGE_wpa-supplicant-openssl || \ PACKAGE_wpa-supplicant-openssl || \
PACKAGE_wpa-supplicant-wolfssl || \ PACKAGE_wpa-supplicant-wolfssl || \
PACKAGE_wpa-supplicant-mesh || \ PACKAGE_wpa-supplicant-mesh-openssl || \
PACKAGE_wpa-supplicant-mesh-wolfssl || \
PACKAGE_wpa-supplicant-mini || \ PACKAGE_wpa-supplicant-mini || \
PACKAGE_wpa-supplicant-p2p || \
PACKAGE_wpad || \ PACKAGE_wpad || \
PACKAGE_wpad-openssl || \ PACKAGE_wpad-openssl || \
PACKAGE_wpad-wolfssl || \ PACKAGE_wpad-wolfssl || \
...@@ -22,8 +24,10 @@ config WPA_RFKILL_SUPPORT ...@@ -22,8 +24,10 @@ config WPA_RFKILL_SUPPORT
depends on PACKAGE_wpa-supplicant || \ depends on PACKAGE_wpa-supplicant || \
PACKAGE_wpa-supplicant-openssl || \ PACKAGE_wpa-supplicant-openssl || \
PACKAGE_wpa-supplicant-wolfssl || \ PACKAGE_wpa-supplicant-wolfssl || \
PACKAGE_wpa-supplicant-mesh || \ PACKAGE_wpa-supplicant-mesh-openssl || \
PACKAGE_wpa-supplicant-mesh-wolfssl || \
PACKAGE_wpa-supplicant-mini || \ PACKAGE_wpa-supplicant-mini || \
PACKAGE_wpa-supplicant-p2p || \
PACKAGE_wpad || \ PACKAGE_wpad || \
PACKAGE_wpad-openssl || \ PACKAGE_wpad-openssl || \
PACKAGE_wpad-wolfssl || \ PACKAGE_wpad-wolfssl || \
...@@ -37,8 +41,10 @@ config WPA_MSG_MIN_PRIORITY ...@@ -37,8 +41,10 @@ config WPA_MSG_MIN_PRIORITY
depends on PACKAGE_wpa-supplicant || \ depends on PACKAGE_wpa-supplicant || \
PACKAGE_wpa-supplicant-openssl || \ PACKAGE_wpa-supplicant-openssl || \
PACKAGE_wpa-supplicant-wolfssl || \ PACKAGE_wpa-supplicant-wolfssl || \
PACKAGE_wpa-supplicant-mesh || \ PACKAGE_wpa-supplicant-mesh-openssl || \
PACKAGE_wpa-supplicant-mesh-wolfssl || \
PACKAGE_wpa-supplicant-mini || \ PACKAGE_wpa-supplicant-mini || \
PACKAGE_wpa-supplicant-p2p || \
PACKAGE_wpad || \ PACKAGE_wpad || \
PACKAGE_wpad-openssl || \ PACKAGE_wpad-openssl || \
PACKAGE_wpad-wolfssl || \ PACKAGE_wpad-wolfssl || \
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd PKG_NAME:=hostapd
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_URL:=http://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
...@@ -32,6 +32,23 @@ PKG_CONFIG_DEPENDS:= \ ...@@ -32,6 +32,23 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_DRIVER_11N_SUPPORT \ CONFIG_DRIVER_11N_SUPPORT \
CONFIG_DRIVER_11AC_SUPPORT \ CONFIG_DRIVER_11AC_SUPPORT \
WPAD_PROVIDERS:=wpad-mini wpad wpad-openssl wpad-wolfssl \
wpad-mesh-openssl wpad-mesh-wolfssl
SUPPLICANT_ONLY_PROVIDERS:=wpa-supplicant-mini wpa-supplicant-p2p \
wpa-supplicant wpa-supplicant-openssl wpa-supplicant-wolfssl \
wpa-supplicant-mesh-openssl wpa-supplicant-mesh-wolfssl
HOSTAPD_ONLY_PROVIDERS:=hostapd-mini hostapd hostapd-openssl hostapd-wolfssl
EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
ANY_SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
ANY_HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
LOCAL_TYPE=$(strip \ LOCAL_TYPE=$(strip \
$(if $(findstring wpad,$(BUILD_VARIANT)),wpad, \ $(if $(findstring wpad,$(BUILD_VARIANT)),wpad, \
$(if $(findstring supplicant,$(BUILD_VARIANT)),supplicant, \ $(if $(findstring supplicant,$(BUILD_VARIANT)),supplicant, \
...@@ -67,20 +84,6 @@ include $(INCLUDE_DIR)/package.mk ...@@ -67,20 +84,6 @@ include $(INCLUDE_DIR)/package.mk
STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(CONFIG_WPA_MSG_MIN_PRIORITY) STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(CONFIG_WPA_MSG_MIN_PRIORITY)
WPAD_PROVIDERS:=wpad-mini wpad wpad-openssl wpad-wolfssl \
wpad-mesh-openssl wpad-mesh-wolfssl
SUPPLICANT_ONLY_PROVIDERS:=wpa_supplicant-mini wpa_supplicant-p2p \
wpa_supplicant wpa_supplicant-openssl wpa_supplicant-wolfssl \
wpa_supplicant-mesh-openssl wpa_supplicant-mesh-wolfssl
HOSTAPD_ONLY_PROVIDERS:=hostapd-mini hostapd hostapd-openssl hostapd-wolfssl
EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
ifneq ($(CONFIG_DRIVER_11N_SUPPORT),) ifneq ($(CONFIG_DRIVER_11N_SUPPORT),)
HOSTAPD_IEEE80211N:=y HOSTAPD_IEEE80211N:=y
...@@ -200,7 +203,7 @@ endef ...@@ -200,7 +203,7 @@ endef
define Package/hostapd-utils define Package/hostapd-utils
$(call Package/hostapd/Default) $(call Package/hostapd/Default)
TITLE+= (utils) TITLE+= (utils)
DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg))) DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(ANY_HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
endef endef
define Package/hostapd-utils/description define Package/hostapd-utils/description
...@@ -221,6 +224,14 @@ define Package/wpad ...@@ -221,6 +224,14 @@ define Package/wpad
$(call Package/wpad/Default) $(call Package/wpad/Default)
TITLE+= (full) TITLE+= (full)
VARIANT:=wpad-full-internal VARIANT:=wpad-full-internal
CONFLICTS:=$(filter-out wpad-mesh-wolfssl,\
$(filter-out wpad-mesh-openssl ,\
$(filter-out wpad-openssl ,\
$(filter-out wpad-wolfssl ,\
$(filter-out wpad-wolfssl ,\
$(filter-out wpad ,\
$(ANY_PROVIDERS)\
))))))
endef endef
define Package/wpad-openssl define Package/wpad-openssl
...@@ -258,6 +269,7 @@ define Package/wpad-mini ...@@ -258,6 +269,7 @@ define Package/wpad-mini
$(call Package/wpad/Default) $(call Package/wpad/Default)
TITLE+= (WPA-PSK only) TITLE+= (WPA-PSK only)
VARIANT:=wpad-mini VARIANT:=wpad-mini
CONFLICTS:=$(SUPPLICANT_ONLY_PROVIDERS)
endef endef
define Package/wpad-mini/description define Package/wpad-mini/description
...@@ -299,13 +311,18 @@ endef ...@@ -299,13 +311,18 @@ endef
define Package/wpa-supplicant define Package/wpa-supplicant
$(Package/wpa-supplicant/Default) $(Package/wpa-supplicant/Default)
CONFLICTS:=$(filter-out wpa-supplicant ,$(SUPPLICANT_ONLY_PROVIDERS))
VARIANT:=supplicant-full-internal VARIANT:=supplicant-full-internal
CONFLICTS:=wpa-supplicant-mini
endef endef
define Package/wpa-supplicant-openssl define Package/wpa-supplicant-openssl
$(Package/wpa-supplicant/Default) $(Package/wpa-supplicant/Default)
CONFLICTS:=$(filter-out wpa-supplicant-openssl ,$(SUPPLICANT_ONLY_PROVIDERS)) CONFLICTS:=$(filter-out wpa-supplicant-wolfssl ,\
$(filter-out wpa-supplicant-openssl ,\
$(filter-out wpa-supplicant-mesh-openssl ,\
$(filter-out wpa-supplicant-mesh-wolfssl ,\
$(SUPPLICANT_ONLY_PROVIDERS)\
))))
VARIANT:=supplicant-full-openssl VARIANT:=supplicant-full-openssl
DEPENDS+=+libopenssl DEPENDS+=+libopenssl
PROVIDES:=wpa-supplicant PROVIDES:=wpa-supplicant
...@@ -313,7 +330,12 @@ endef ...@@ -313,7 +330,12 @@ endef
define Package/wpa-supplicant-wolfssl define Package/wpa-supplicant-wolfssl
$(Package/wpa-supplicant/Default) $(Package/wpa-supplicant/Default)
CONFLICTS:=$(filter-out wpa-supplicant-wolfssl ,$(SUPPLICANT_ONLY_PROVIDERS)) CONFLICTS:=$(filter-out wpa-supplicant-wolfssl ,\
$(filter-out wpa-supplicant-openssl ,\
$(filter-out wpa-supplicant-mesh-openssl ,\
$(filter-out wpa-supplicant-mesh-wolfssl ,\
$(SUPPLICANT_ONLY_PROVIDERS)\
))))
VARIANT:=supplicant-full-wolfssl VARIANT:=supplicant-full-wolfssl
DEPENDS+=+libwolfssl DEPENDS+=+libwolfssl
PROVIDES:=wpa-supplicant PROVIDES:=wpa-supplicant
...@@ -327,13 +349,19 @@ define Package/wpa-supplicant-p2p ...@@ -327,13 +349,19 @@ define Package/wpa-supplicant-p2p
$(Package/wpa-supplicant) $(Package/wpa-supplicant)
TITLE:=WPA Supplicant (with Wi-Fi P2P support) TITLE:=WPA Supplicant (with Wi-Fi P2P support)
DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211 DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211
CONFLICTS:=$(filter-out wpa-supplicant-p2p ,$(SUPPLICANT_ONLY_PROVIDERS)) CONFLICTS:=$(filter-out wpa-supplicant-openssl ,\
$(filter-out wpa-supplicant-wolfssl ,\
$(filter-out wpa-supplicant-p2p ,\
$(filter-out wpa-supplicant-mesh-openssl ,\
$(filter-out wpa-supplicant-mesh-wolfssl ,\
$(SUPPLICANT_ONLY_PROVIDERS)\
)))))
VARIANT:=supplicant-p2p-internal VARIANT:=supplicant-p2p-internal
PROVIDES:=wpa-supplicant PROVIDES:=wpa-supplicant
endef endef
define Package/wpa-supplicant-mesh/Default define Package/wpa-supplicant-mesh/Default
$(Package/wpa-supplicant) $(Package/wpa-supplicant/Default)
TITLE:=WPA Supplicant (with 802.11s and SAE) TITLE:=WPA Supplicant (with 802.11s and SAE)
DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
PROVIDES:=wpa-supplicant wpa-supplicant-mesh PROVIDES:=wpa-supplicant wpa-supplicant-mesh
...@@ -354,10 +382,9 @@ define Package/wpa-supplicant-mesh-wolfssl ...@@ -354,10 +382,9 @@ define Package/wpa-supplicant-mesh-wolfssl
endef endef
define Package/wpa-supplicant-mini define Package/wpa-supplicant-mini
$(Package/wpa-supplicant) $(Package/wpa-supplicant/Default)
TITLE:=WPA Supplicant (minimal version) TITLE:=WPA Supplicant (minimal version)
DEPENDS:=$(DRV_DEPENDS) DEPENDS:=$(DRV_DEPENDS)
CONFLICTS:=$(filter-out wpa-supplicant-mini ,$(SUPPLICANT_ONLY_PROVIDERS))
VARIANT:=supplicant-mini VARIANT:=supplicant-mini
PROVIDES:=wpa-supplicant PROVIDES:=wpa-supplicant
endef endef
...@@ -365,7 +392,7 @@ endef ...@@ -365,7 +392,7 @@ endef
define Package/wpa-cli define Package/wpa-cli
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg))) DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(ANY_SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
TITLE:=WPA Supplicant command line control utility TITLE:=WPA Supplicant command line control utility
endef endef
...@@ -390,6 +417,7 @@ define Package/eapol-test-openssl ...@@ -390,6 +417,7 @@ define Package/eapol-test-openssl
VARIANT:=supplicant-full-openssl VARIANT:=supplicant-full-openssl
CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS)) CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS))
DEPENDS:=$(DRV_DEPENDS) +libopenssl DEPENDS:=$(DRV_DEPENDS) +libopenssl
PROVIDES:=eapol-test
endef endef
define Package/eapol-test-wolfssl define Package/eapol-test-wolfssl
...@@ -399,6 +427,7 @@ define Package/eapol-test-wolfssl ...@@ -399,6 +427,7 @@ define Package/eapol-test-wolfssl
VARIANT:=supplicant-full-wolfssl VARIANT:=supplicant-full-wolfssl
CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS))) CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS)))
DEPENDS:=$(DRV_DEPENDS) +libwolfssl DEPENDS:=$(DRV_DEPENDS) +libwolfssl
PROVIDES:=eapol-test
endef endef
......
From 8a6a7112e5b1391018531f6b6c317f8870e0fcb6 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 3 May 2018 13:12:28 +0200
Subject: [PATCH 1/2] Revert "wpa_supplicant: Increase authentication timeout
if CAC is started"
This reverts commit 37547ad63c9df61ce6899675028594da2527efef.
---
wpa_supplicant/events.c | 95 ++++---------------------------
wpa_supplicant/wpa_supplicant.c | 20 -------
wpa_supplicant/wpa_supplicant_i.h | 3 -
3 files changed, 10 insertions(+), 108 deletions(-)
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3776,81 +3776,6 @@ static void wpa_supplicant_event_port_au
}
-static unsigned int wpas_event_cac_ms(const struct wpa_supplicant *wpa_s,
- int freq)
-{
- size_t i;
- int j;
-
- for (i = 0; i < wpa_s->hw.num_modes; i++) {
- const struct hostapd_hw_modes *mode = &wpa_s->hw.modes[i];
-
- for (j = 0; j < mode->num_channels; j++) {
- const struct hostapd_channel_data *chan;
-
- chan = &mode->channels[j];
- if (chan->freq == freq)
- return chan->dfs_cac_ms;
- }
- }
-
- return 0;
-}
-
-
-static void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
-{
-#if defined(NEED_AP_MLME) && defined(CONFIG_AP)
- if (wpa_s->ap_iface) {
- wpas_ap_event_dfs_cac_started(wpa_s, radar);
- } else
-#endif /* NEED_AP_MLME && CONFIG_AP */
- {
- unsigned int cac_time = wpas_event_cac_ms(wpa_s, radar->freq);
-
- cac_time /= 1000; /* convert from ms to sec */
- if (!cac_time)
- cac_time = 10 * 60; /* max timeout: 10 minutes */
-
- /* Restart auth timeout: CAC time added to initial timeout */
- wpas_auth_timeout_restart(wpa_s, cac_time);
- }
-}
-
-
-static void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
-{
-#if defined(NEED_AP_MLME) && defined(CONFIG_AP)
- if (wpa_s->ap_iface) {
- wpas_ap_event_dfs_cac_finished(wpa_s, radar);
- } else
-#endif /* NEED_AP_MLME && CONFIG_AP */
- {
- /* Restart auth timeout with original value after CAC is
- * finished */
- wpas_auth_timeout_restart(wpa_s, 0);
- }
-}
-
-
-static void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
-{
-#if defined(NEED_AP_MLME) && defined(CONFIG_AP)
- if (wpa_s->ap_iface) {
- wpas_ap_event_dfs_cac_aborted(wpa_s, radar);
- } else
-#endif /* NEED_AP_MLME && CONFIG_AP */
- {
- /* Restart auth timeout with original value after CAC is
- * aborted */
- wpas_auth_timeout_restart(wpa_s, 0);
- }
-}
-
-
static void wpa_supplicant_event_assoc_auth(struct wpa_supplicant *wpa_s,
union wpa_event_data *data)
{
@@ -4298,25 +4223,25 @@ void wpa_supplicant_event(void *ctx, enu
wpas_ap_event_dfs_radar_detected(wpa_s,
&data->dfs_event);
break;
- case EVENT_DFS_NOP_FINISHED:
- if (data)
- wpas_ap_event_dfs_cac_nop_finished(wpa_s,
- &data->dfs_event);
- break;
-#endif /* NEED_AP_MLME */
-#endif /* CONFIG_AP */
case EVENT_DFS_CAC_STARTED:
if (data)
- wpas_event_dfs_cac_started(wpa_s, &data->dfs_event);
+ wpas_ap_event_dfs_cac_started(wpa_s, &data->dfs_event);
break;
case EVENT_DFS_CAC_FINISHED:
if (data)
- wpas_event_dfs_cac_finished(wpa_s, &data->dfs_event);
+ wpas_ap_event_dfs_cac_finished(wpa_s, &data->dfs_event);
break;
case EVENT_DFS_CAC_ABORTED:
if (data)
- wpas_event_dfs_cac_aborted(wpa_s, &data->dfs_event);
+ wpas_ap_event_dfs_cac_aborted(wpa_s, &data->dfs_event);
+ break;
+ case EVENT_DFS_NOP_FINISHED:
+ if (data)
+ wpas_ap_event_dfs_cac_nop_finished(wpa_s,
+ &data->dfs_event);
break;
+#endif /* NEED_AP_MLME */
+#endif /* CONFIG_AP */
case EVENT_RX_MGMT: {
u16 fc, stype;
const struct ieee80211_mgmt *mgmt;
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -243,30 +243,10 @@ void wpa_supplicant_req_auth_timeout(str
wpa_dbg(wpa_s, MSG_DEBUG, "Setting authentication timeout: %d sec "
"%d usec", sec, usec);
eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL);
- wpa_s->last_auth_timeout_sec = sec;
eloop_register_timeout(sec, usec, wpa_supplicant_timeout, wpa_s, NULL);
}
-/*
- * wpas_auth_timeout_restart - Restart and change timeout for authentication
- * @wpa_s: Pointer to wpa_supplicant data
- * @sec_diff: difference in seconds applied to original timeout value
- */
-void wpas_auth_timeout_restart(struct wpa_supplicant *wpa_s, int sec_diff)
-{
- int new_sec = wpa_s->last_auth_timeout_sec + sec_diff;
-
- if (eloop_is_timeout_registered(wpa_supplicant_timeout, wpa_s, NULL)) {
- wpa_dbg(wpa_s, MSG_DEBUG,
- "Authentication timeout restart: %d sec", new_sec);
- eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL);
- eloop_register_timeout(new_sec, 0, wpa_supplicant_timeout,
- wpa_s, NULL);
- }
-}
-
-
/**
* wpa_supplicant_cancel_auth_timeout - Cancel authentication timeout
* @wpa_s: Pointer to wpa_supplicant data
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -1182,8 +1182,6 @@ struct wpa_supplicant {
/* RIC elements for FT protocol */
struct wpabuf *ric_ies;
- int last_auth_timeout_sec;
-
#ifdef CONFIG_DPP
struct dl_list dpp_bootstrap; /* struct dpp_bootstrap_info */
struct dl_list dpp_configurator; /* struct dpp_configurator */
@@ -1258,7 +1256,6 @@ void wpa_supplicant_initiate_eapol(struc
void wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr);
void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
int sec, int usec);
-void wpas_auth_timeout_restart(struct wpa_supplicant *wpa_s, int sec_diff);
void wpa_supplicant_reinit_autoscan(struct wpa_supplicant *wpa_s);
void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
enum wpa_states state);
From 0d4900ccd1c7ec5c5ffecf5040f9c07a6a32deef Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 3 May 2018 13:12:35 +0200
Subject: [PATCH 2/2] Revert "wpa_supplicant: Rename wpas_event_*() to
wpas_ap_event_*()"
This reverts commit 2dd5fbbff884af488870a37e339b4817c83954de.
---
wpa_supplicant/ap.c | 20 ++++++++++----------
wpa_supplicant/ap.h | 18 +++++++++---------
wpa_supplicant/events.c | 13 ++++++-------
3 files changed, 25 insertions(+), 26 deletions(-)
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -1537,8 +1537,8 @@ int wpas_ap_pmksa_cache_add_external(str
#ifdef NEED_AP_MLME
-void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
+void wpas_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar)
{
if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
return;
@@ -1550,8 +1550,8 @@ void wpas_ap_event_dfs_radar_detected(st
}
-void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
+void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar)
{
if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
return;
@@ -1562,8 +1562,8 @@ void wpas_ap_event_dfs_cac_started(struc
}
-void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
+void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar)
{
if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
return;
@@ -1574,8 +1574,8 @@ void wpas_ap_event_dfs_cac_finished(stru
}
-void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
+void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar)
{
if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
return;
@@ -1586,8 +1586,8 @@ void wpas_ap_event_dfs_cac_aborted(struc
}
-void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar)
+void wpas_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar)
{
if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
return;
--- a/wpa_supplicant/ap.h
+++ b/wpa_supplicant/ap.h
@@ -89,16 +89,16 @@ int wpas_ap_pmksa_cache_list_mesh(struct
char *buf, size_t len);
int wpas_ap_pmksa_cache_add_external(struct wpa_supplicant *wpa_s, char *cmd);
-void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar);
-void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
+void wpas_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
struct dfs_event *radar);
-void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar);
-void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar);
-void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
- struct dfs_event *radar);
+void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar);
+void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar);
+void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar);
+void wpas_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
+ struct dfs_event *radar);
void ap_periodic(struct wpa_supplicant *wpa_s);
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -4220,25 +4220,24 @@ void wpa_supplicant_event(void *ctx, enu
#ifdef NEED_AP_MLME
case EVENT_DFS_RADAR_DETECTED:
if (data)
- wpas_ap_event_dfs_radar_detected(wpa_s,
- &data->dfs_event);
+ wpas_event_dfs_radar_detected(wpa_s, &data->dfs_event);
break;
case EVENT_DFS_CAC_STARTED:
if (data)
- wpas_ap_event_dfs_cac_started(wpa_s, &data->dfs_event);
+ wpas_event_dfs_cac_started(wpa_s, &data->dfs_event);
break;
case EVENT_DFS_CAC_FINISHED:
if (data)
- wpas_ap_event_dfs_cac_finished(wpa_s, &data->dfs_event);
+ wpas_event_dfs_cac_finished(wpa_s, &data->dfs_event);
break;
case EVENT_DFS_CAC_ABORTED:
if (data)
- wpas_ap_event_dfs_cac_aborted(wpa_s, &data->dfs_event);
+ wpas_event_dfs_cac_aborted(wpa_s, &data->dfs_event);
break;
case EVENT_DFS_NOP_FINISHED:
if (data)
- wpas_ap_event_dfs_cac_nop_finished(wpa_s,
- &data->dfs_event);
+ wpas_event_dfs_cac_nop_finished(wpa_s,
+ &data->dfs_event);
break;
#endif /* NEED_AP_MLME */
#endif /* CONFIG_AP */
From 032e70833de4b251fc4a159b2cc4ef28d0f1df0d Mon Sep 17 00:00:00 2001 From 02ae4382f45f772e3630460459eb4e5af64e71b4 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:54:58 -0700 Date: Tue, 29 May 2018 14:39:05 -0700
Subject: [PATCH 01/16] mesh: factor out mesh join function Subject: [PATCH 01/18] mesh: factor out mesh join function
mesh join function consitss of 2 parts which are preparing mesh join function consitss of 2 parts which are preparing
configurations and sending join event to driver. configurations and sending join event to driver.
...@@ -19,7 +19,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -19,7 +19,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -363,13 +363,48 @@ void wpa_supplicant_mesh_add_scan_ie(str @@ -364,13 +364,48 @@ void wpa_supplicant_mesh_add_scan_ie(str
} }
...@@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
ret = -ENOENT; ret = -ENOENT;
goto out; goto out;
} }
@@ -380,22 +415,22 @@ int wpa_supplicant_join_mesh(struct wpa_ @@ -381,22 +416,22 @@ int wpa_supplicant_join_mesh(struct wpa_
wpa_s->group_cipher = WPA_CIPHER_NONE; wpa_s->group_cipher = WPA_CIPHER_NONE;
wpa_s->mgmt_group_cipher = 0; wpa_s->mgmt_group_cipher = 0;
...@@ -104,7 +104,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -104,7 +104,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
} else { } else {
ssid->max_oper_chwidth = VHT_CHANWIDTH_80MHZ; ssid->max_oper_chwidth = VHT_CHANWIDTH_80MHZ;
} }
@@ -409,67 +444,43 @@ int wpa_supplicant_join_mesh(struct wpa_ @@ -410,67 +445,43 @@ int wpa_supplicant_join_mesh(struct wpa_
} }
} }
if (ssid->beacon_int > 0) if (ssid->beacon_int > 0)
......
From 6da64b1e056e0b1be18b6ab37c820acb4a0f3cf4 Mon Sep 17 00:00:00 2001 From 89db76eeff6502dfa39b011962ec9d560ed4c2ee Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:54:59 -0700 Date: Tue, 29 May 2018 14:39:06 -0700
Subject: [PATCH 02/16] mesh: factor out rsn initialization Subject: [PATCH 02/18] mesh: factor out rsn initialization
RSN initialization can be used in different phases RSN initialization can be used in different phases
if mesh initialization and mesh join don't happen if mesh initialization and mesh join don't happen
...@@ -80,7 +80,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -80,7 +80,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
int rate_len; int rate_len;
int frequency; int frequency;
@@ -291,38 +335,8 @@ static int wpa_supplicant_mesh_init(stru @@ -292,38 +336,8 @@ static int wpa_supplicant_mesh_init(stru
return -1; return -1;
} }
......
From 95425b5becaeda8a515c942f417696e5df34bbc8 Mon Sep 17 00:00:00 2001 From 07bad5f256cbe8a4b45d32c5b43b870ee815fb42 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:00 -0700 Date: Tue, 29 May 2018 14:39:07 -0700
Subject: [PATCH 03/16] mesh: relocate RSN init function Subject: [PATCH 03/18] mesh: relocate RSN init function
RSN init function should work together with mesh join RSN init function should work together with mesh join
when it's used. Since mesh join could be called at different stage when it's used. Since mesh join could be called at different stage
...@@ -16,7 +16,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -16,7 +16,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -335,9 +335,6 @@ static int wpa_supplicant_mesh_init(stru @@ -336,9 +336,6 @@ static int wpa_supplicant_mesh_init(stru
return -1; return -1;
} }
...@@ -26,7 +26,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -26,7 +26,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf); wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
return 0; return 0;
@@ -383,6 +380,12 @@ void wpas_join_mesh(struct wpa_supplican @@ -384,6 +381,12 @@ void wpas_join_mesh(struct wpa_supplican
struct wpa_ssid *ssid = wpa_s->current_ssid; struct wpa_ssid *ssid = wpa_s->current_ssid;
int ret = 0; int ret = 0;
......
From 32044a7bb26858bedaf147c77f49f5cef1133de3 Mon Sep 17 00:00:00 2001 From bd05de484bfa61def530d717c7234381f6b33cf7 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:01 -0700 Date: Tue, 29 May 2018 14:39:08 -0700
Subject: [PATCH 04/16] mesh: use setup completion callback to complete mesh Subject: [PATCH 04/18] mesh: use setup completion callback to complete mesh
join join
mesh join function is the last function to be called during mesh join function is the last function to be called during
...@@ -32,7 +32,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -32,7 +32,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
ifmsh->drv_flags = wpa_s->drv_flags; ifmsh->drv_flags = wpa_s->drv_flags;
ifmsh->num_bss = 1; ifmsh->num_bss = 1;
ifmsh->bss = os_calloc(wpa_s->ifmsh->num_bss, ifmsh->bss = os_calloc(wpa_s->ifmsh->num_bss,
@@ -233,6 +234,8 @@ static int wpa_supplicant_mesh_init(stru @@ -234,6 +235,8 @@ static int wpa_supplicant_mesh_init(stru
bss->drv_priv = wpa_s->drv_priv; bss->drv_priv = wpa_s->drv_priv;
bss->iface = ifmsh; bss->iface = ifmsh;
bss->mesh_sta_free_cb = mesh_mpm_free_sta; bss->mesh_sta_free_cb = mesh_mpm_free_sta;
...@@ -41,7 +41,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -41,7 +41,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
frequency = ssid->frequency; frequency = ssid->frequency;
if (frequency != freq->freq && if (frequency != freq->freq &&
frequency == freq->freq + freq->sec_channel_offset * 20) { frequency == freq->freq + freq->sec_channel_offset * 20) {
@@ -374,8 +377,9 @@ void wpa_supplicant_mesh_add_scan_ie(str @@ -375,8 +378,9 @@ void wpa_supplicant_mesh_add_scan_ie(str
} }
...@@ -52,7 +52,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -52,7 +52,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
struct wpa_driver_mesh_join_params *params = wpa_s->mesh_params; struct wpa_driver_mesh_join_params *params = wpa_s->mesh_params;
struct wpa_ssid *ssid = wpa_s->current_ssid; struct wpa_ssid *ssid = wpa_s->current_ssid;
int ret = 0; int ret = 0;
@@ -497,7 +501,6 @@ int wpa_supplicant_join_mesh(struct wpa_ @@ -498,7 +502,6 @@ int wpa_supplicant_join_mesh(struct wpa_
goto out; goto out;
} }
......
From e2f13b1fac9799db83a37fc57df9471d9bb5b711 Mon Sep 17 00:00:00 2001 From dbe9afab3b2dceb35d478ac43dfcf8fdc5e23a22 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:02 -0700 Date: Tue, 29 May 2018 14:39:09 -0700
Subject: [PATCH 05/16] mesh: reflect country setting to mesh configuration Subject: [PATCH 05/18] mesh: reflect country setting to mesh configuration
wpa_supplicant configuration has country parameter that is wpa_supplicant configuration has country parameter that is
supposed to be used in AP mode to indicate supporting 802.11h supposed to be used in AP mode to indicate supporting 802.11h
...@@ -9,13 +9,15 @@ and 802.11d. Reflect this configuration to Mesh also since Mesh ...@@ -9,13 +9,15 @@ and 802.11d. Reflect this configuration to Mesh also since Mesh
is required to support 802.11h and 802.11d to use DFS channels. is required to support 802.11h and 802.11d to use DFS channels.
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: adapted to changed ieee80211_is_dfs prototype]
--- ---
wpa_supplicant/mesh.c | 8 ++++++++ wpa_supplicant/mesh.c | 9 +++++++++
1 file changed, 8 insertions(+) 1 file changed, 9 insertions(+)
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -254,6 +254,15 @@ static int wpa_supplicant_mesh_init(stru @@ -255,6 +255,15 @@ static int wpa_supplicant_mesh_init(stru
bss->conf->start_disabled = 1; bss->conf->start_disabled = 1;
bss->conf->mesh = MESH_ENABLED; bss->conf->mesh = MESH_ENABLED;
bss->conf->ap_max_inactivity = wpa_s->conf->mesh_max_inactivity; bss->conf->ap_max_inactivity = wpa_s->conf->mesh_max_inactivity;
......
From 37bf08621eee53f30b464be71876c02e235077ba Mon Sep 17 00:00:00 2001 From 51e759da5026b3e64f801135b5d53f2198bbd2f0 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:03 -0700 Date: Tue, 29 May 2018 14:39:10 -0700
Subject: [PATCH 06/16] mesh: inform kernel driver DFS handler in userspace Subject: [PATCH 06/18] mesh: inform kernel driver DFS handler in userspace
NL80211_ATTR_HANDLE_DFS is required by kerenel space NL80211_ATTR_HANDLE_DFS is required by kerenel space
to enable DFS channels that indicates DFS handler to enable DFS channels that indicates DFS handler
...@@ -38,7 +38,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -38,7 +38,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
goto fail; goto fail;
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -261,6 +261,7 @@ static int wpa_supplicant_mesh_init(stru @@ -262,6 +262,7 @@ static int wpa_supplicant_mesh_init(stru
conf->ieee80211d = 1; conf->ieee80211d = 1;
conf->country[0] = wpa_s->conf->country[0]; conf->country[0] = wpa_s->conf->country[0];
conf->country[1] = wpa_s->conf->country[1]; conf->country[1] = wpa_s->conf->country[1];
......
From 8190aab3344ae9746c897093f88f3679239d135d Mon Sep 17 00:00:00 2001 From bdc77efe681d5b88f3256e2bb6e706d4eaf09518 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:04 -0700 Date: Tue, 29 May 2018 14:39:11 -0700
Subject: [PATCH 07/16] mesh: apply channel attributes before running Mesh Subject: [PATCH 07/18] mesh: apply channel attributes before running Mesh
This helps mesh interface initializes with correct This helps mesh interface initializes with correct
channel parameters. channel parameters.
...@@ -13,7 +13,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -13,7 +13,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -337,6 +337,8 @@ static int wpa_supplicant_mesh_init(stru @@ -338,6 +338,8 @@ static int wpa_supplicant_mesh_init(stru
conf->basic_rates[rate_len] = -1; conf->basic_rates[rate_len] = -1;
} }
...@@ -22,7 +22,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -22,7 +22,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
if (hostapd_setup_interface(ifmsh)) { if (hostapd_setup_interface(ifmsh)) {
wpa_printf(MSG_ERROR, wpa_printf(MSG_ERROR,
"Failed to initialize hostapd interface for mesh"); "Failed to initialize hostapd interface for mesh");
@@ -348,8 +350,6 @@ static int wpa_supplicant_mesh_init(stru @@ -349,8 +351,6 @@ static int wpa_supplicant_mesh_init(stru
return -1; return -1;
} }
......
From e001251cb5708c406d477eca6aa912e5692b17fe Mon Sep 17 00:00:00 2001 From eb9888ba41faaeb8fd07392ad46808b7d894cc14 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:05 -0700 Date: Tue, 29 May 2018 14:39:12 -0700
Subject: [PATCH 08/16] mesh: set interface type to mesh before setting Subject: [PATCH 08/18] mesh: set interface type to mesh before setting
interface interface
Correct interface type is required to start DFS CAC that can be Correct interface type is required to start DFS CAC that can be
...@@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -339,14 +339,14 @@ static int wpa_supplicant_mesh_init(stru @@ -340,14 +340,14 @@ static int wpa_supplicant_mesh_init(stru
wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf); wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
......
From 3cefd0bf495ad51a860b56281a8cae32bc4bd086 Mon Sep 17 00:00:00 2001 From fa3af966032267e618b19bbf06a536ddb81ddbdf Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:06 -0700 Date: Tue, 29 May 2018 14:39:13 -0700
Subject: [PATCH 09/16] mesh: set mesh center frequency Subject: [PATCH 09/18] mesh: set mesh center frequency
vht center frequency value is required to compose the correct channel info. vht center frequency value is required to compose the correct channel info.
...@@ -12,7 +12,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -12,7 +12,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -456,6 +456,7 @@ int wpa_supplicant_join_mesh(struct wpa_ @@ -457,6 +457,7 @@ int wpa_supplicant_join_mesh(struct wpa_
if (wpa_s->mesh_vht_enabled) { if (wpa_s->mesh_vht_enabled) {
ssid->vht = 1; ssid->vht = 1;
......
From 90aa570a894a907d11f85ced43a248198e24acc1 Mon Sep 17 00:00:00 2001 From 9a8ca54a264a2820af614043e7af853166b320b0 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:07 -0700 Date: Tue, 29 May 2018 14:39:14 -0700
Subject: [PATCH 10/16] mesh: consider mesh interface on dfs event handler Subject: [PATCH 10/18] mesh: consider mesh interface on dfs event handler
Once mesh starts supporting DFS channels, it has to handle DFS related events Once mesh starts supporting DFS channels, it has to handle DFS related events
from drivers, hence add mesh interface to the check list. from drivers, hence add mesh interface to the check list.
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
--- ---
wpa_supplicant/ap.c | 71 ++++++++++++++++++++++++++++++----------- wpa_supplicant/ap.c | 71 ++++++++++++++++++++++++++++++-----------
wpa_supplicant/events.c | 1 + wpa_supplicant/events.c | 7 ++--
2 files changed, 54 insertions(+), 18 deletions(-) 2 files changed, 57 insertions(+), 21 deletions(-)
--- a/wpa_supplicant/ap.c --- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c
...@@ -37,8 +38,8 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -37,8 +38,8 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
} }
@@ -1540,10 +1545,16 @@ int wpas_ap_pmksa_cache_add_external(str @@ -1540,10 +1545,16 @@ int wpas_ap_pmksa_cache_add_external(str
void wpas_event_dfs_radar_detected(struct wpa_supplicant *wpa_s, void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
struct dfs_event *radar) struct dfs_event *radar)
{ {
- if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) - if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
- return; - return;
...@@ -56,9 +57,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -56,9 +57,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
radar->ht_enabled, radar->chan_offset, radar->ht_enabled, radar->chan_offset,
radar->chan_width, radar->chan_width,
radar->cf1, radar->cf2); radar->cf1, radar->cf2);
@@ -1553,10 +1564,16 @@ void wpas_event_dfs_radar_detected(struc @@ -1553,10 +1564,16 @@ void wpas_ap_event_dfs_radar_detected(st
void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s, void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
struct dfs_event *radar) struct dfs_event *radar)
{ {
- if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) - if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
- return; - return;
...@@ -76,9 +77,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -76,9 +77,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
radar->ht_enabled, radar->chan_offset, radar->ht_enabled, radar->chan_offset,
radar->chan_width, radar->cf1, radar->cf2); radar->chan_width, radar->cf1, radar->cf2);
} }
@@ -1565,10 +1582,16 @@ void wpas_event_dfs_cac_started(struct w @@ -1565,10 +1582,16 @@ void wpas_ap_event_dfs_cac_started(struc
void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s, void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
struct dfs_event *radar) struct dfs_event *radar)
{ {
- if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) - if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
- return; - return;
...@@ -96,9 +97,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -96,9 +97,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
radar->ht_enabled, radar->chan_offset, radar->ht_enabled, radar->chan_offset,
radar->chan_width, radar->cf1, radar->cf2); radar->chan_width, radar->cf1, radar->cf2);
} }
@@ -1577,10 +1600,16 @@ void wpas_event_dfs_cac_finished(struct @@ -1577,10 +1600,16 @@ void wpas_ap_event_dfs_cac_finished(stru
void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s, void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
struct dfs_event *radar) struct dfs_event *radar)
{ {
- if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) - if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
- return; - return;
...@@ -116,9 +117,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -116,9 +117,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
radar->ht_enabled, radar->chan_offset, radar->ht_enabled, radar->chan_offset,
radar->chan_width, radar->cf1, radar->cf2); radar->chan_width, radar->cf1, radar->cf2);
} }
@@ -1589,10 +1618,16 @@ void wpas_event_dfs_cac_aborted(struct w @@ -1589,10 +1618,16 @@ void wpas_ap_event_dfs_cac_aborted(struc
void wpas_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s, void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
struct dfs_event *radar) struct dfs_event *radar)
{ {
- if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) - if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
- return; - return;
...@@ -138,7 +139,34 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -138,7 +139,34 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
} }
--- a/wpa_supplicant/events.c --- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c
@@ -4203,6 +4203,7 @@ void wpa_supplicant_event(void *ctx, enu @@ -3802,7 +3802,7 @@ static void wpas_event_dfs_cac_started(s
struct dfs_event *radar)
{
#if defined(NEED_AP_MLME) && defined(CONFIG_AP)
- if (wpa_s->ap_iface) {
+ if (wpa_s->ap_iface || wpa_s->ifmsh) {
wpas_ap_event_dfs_cac_started(wpa_s, radar);
} else
#endif /* NEED_AP_MLME && CONFIG_AP */
@@ -3823,7 +3823,7 @@ static void wpas_event_dfs_cac_finished(
struct dfs_event *radar)
{
#if defined(NEED_AP_MLME) && defined(CONFIG_AP)
- if (wpa_s->ap_iface) {
+ if (wpa_s->ap_iface || wpa_s->ifmsh) {
wpas_ap_event_dfs_cac_finished(wpa_s, radar);
} else
#endif /* NEED_AP_MLME && CONFIG_AP */
@@ -3839,7 +3839,7 @@ static void wpas_event_dfs_cac_aborted(s
struct dfs_event *radar)
{
#if defined(NEED_AP_MLME) && defined(CONFIG_AP)
- if (wpa_s->ap_iface) {
+ if (wpa_s->ap_iface || wpa_s->ifmsh) {
wpas_ap_event_dfs_cac_aborted(wpa_s, radar);
} else
#endif /* NEED_AP_MLME && CONFIG_AP */
@@ -4278,6 +4278,7 @@ void wpa_supplicant_event(void *ctx, enu
#ifdef CONFIG_AP #ifdef CONFIG_AP
if (wpa_s->current_ssid->mode == WPAS_MODE_AP || if (wpa_s->current_ssid->mode == WPAS_MODE_AP ||
wpa_s->current_ssid->mode == WPAS_MODE_P2P_GO || wpa_s->current_ssid->mode == WPAS_MODE_P2P_GO ||
......
From ce3e491e445ebea9705e76ac7ee3d4841ace1cad Mon Sep 17 00:00:00 2001 From bbaa6142eadf229334436fdbf51aa65bb819f771 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:08 -0700 Date: Tue, 29 May 2018 14:39:15 -0700
Subject: [PATCH 11/16] mesh: Allow DFS channels to be selected if dfs is Subject: [PATCH 11/18] mesh: Allow DFS channels to be selected if dfs is
enabled enabled
Note: DFS is assumed to be usable if a country code has been set Note: DFS is assumed to be usable if a country code has been set
...@@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -2033,6 +2033,8 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -2060,6 +2060,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
struct hostapd_freq_params vht_freq; struct hostapd_freq_params vht_freq;
int chwidth, seg0, seg1; int chwidth, seg0, seg1;
u32 vht_caps = 0; u32 vht_caps = 0;
...@@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
freq->freq = ssid->frequency; freq->freq = ssid->frequency;
@@ -2109,8 +2111,11 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -2136,8 +2138,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
return; return;
/* Check primary channel flags */ /* Check primary channel flags */
...@@ -36,7 +36,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -36,7 +36,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
#ifdef CONFIG_HT_OVERRIDES #ifdef CONFIG_HT_OVERRIDES
if (ssid->disable_ht40) if (ssid->disable_ht40)
@@ -2136,8 +2141,11 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -2163,8 +2168,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
return; return;
/* Check secondary channel flags */ /* Check secondary channel flags */
...@@ -49,7 +49,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -49,7 +49,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
freq->channel = pri_chan->chan; freq->channel = pri_chan->chan;
@@ -2227,8 +2235,11 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -2254,8 +2262,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
return; return;
/* Back to HT configuration if channel not usable */ /* Back to HT configuration if channel not usable */
...@@ -62,7 +62,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -62,7 +62,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
} }
chwidth = VHT_CHANWIDTH_80MHZ; chwidth = VHT_CHANWIDTH_80MHZ;
@@ -2248,10 +2259,11 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -2275,10 +2286,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
if (!chan) if (!chan)
continue; continue;
......
From 912b5c89328f1f9585e64fd13460928c71f28352 Mon Sep 17 00:00:00 2001 From 4a8245ec2e9d48e464488477a3e7ed234009c216 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:09 -0700 Date: Tue, 29 May 2018 14:39:16 -0700
Subject: [PATCH 12/16] mesh: allow mesh to send channel switch request Subject: [PATCH 12/18] mesh: allow mesh to send channel switch request
add mesh type to nl80211 channel switch request, add mesh type to nl80211 channel switch request,
so mesh is able to send the request to kernel drivers. so mesh is able to send the request to kernel drivers.
......
From d7ae7271dce4203bfcd79a230acb24f03f38633d Mon Sep 17 00:00:00 2001 From 267395271c1a36b54ef21070acff2cadce241035 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:10 -0700 Date: Tue, 29 May 2018 14:39:17 -0700
Subject: [PATCH 13/16] mesh: do not allow pri/sec channel switch Subject: [PATCH 13/18] mesh: do not allow pri/sec channel switch
We don't want mesh to switch the channel from primary to secondary, We don't want mesh to switch the channel from primary to secondary,
since mesh points are not able to join each other in that case. since mesh points are not able to join each other in that case.
...@@ -13,7 +13,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -13,7 +13,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/mesh.c --- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c
@@ -336,7 +336,10 @@ static int wpa_supplicant_mesh_init(stru @@ -337,7 +337,10 @@ static int wpa_supplicant_mesh_init(stru
rate_len * sizeof(int)); rate_len * sizeof(int));
conf->basic_rates[rate_len] = -1; conf->basic_rates[rate_len] = -1;
} }
......
From cf2ba81fb307f3e87e13896f9dbf93c0c2a9eb92 Mon Sep 17 00:00:00 2001 From f95897cef614fff710c31d9e478eacc85d6312d5 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:11 -0700 Date: Tue, 29 May 2018 14:39:18 -0700
Subject: [PATCH 14/16] mesh: do not allow scan result to swap pri/sec Subject: [PATCH 14/18] mesh: do not allow scan result to swap pri/sec
Swapping between primary and secondary channel will break Swapping between primary and secondary channel will break
mesh from joining, hence don't allow it. mesh from joining, hence don't allow it.
...@@ -13,7 +13,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -13,7 +13,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -2158,7 +2158,7 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -2185,7 +2185,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
} }
freq->sec_channel_offset = ht40; freq->sec_channel_offset = ht40;
......
From 48f31256ffebfc43d6b14b93597aa2c7e2975dc4 Mon Sep 17 00:00:00 2001 From 9423e8be0393e82c8622806a0529e47fd5583c0b Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com> From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 17 Apr 2018 21:55:12 -0700 Date: Tue, 29 May 2018 14:39:19 -0700
Subject: [PATCH 15/16] mesh: do not use offchan mgmt tx on DFS Subject: [PATCH 15/18] mesh: do not use offchan mgmt tx on DFS
Drivers don't allow mesh to use offchannel on management Tx. Drivers don't allow mesh to use offchannel on management Tx.
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: adapted to changed ieee80211_is_dfs prototype]
--- ---
src/drivers/driver_nl80211.c | 5 ++++- src/drivers/driver_nl80211.c | 12 ++++++++++--
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 10 insertions(+), 2 deletions(-)
--- a/src/drivers/driver_nl80211.c --- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c
...@@ -23,20 +25,20 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com> ...@@ -23,20 +25,20 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
struct ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
wpa_printf(MSG_DEBUG, "nl80211: Send Action frame (ifindex=%d, " wpa_printf(MSG_DEBUG, "nl80211: Send Action frame (ifindex=%d, "
@@ -7190,6 +7194,12 @@ static int wpa_driver_nl80211_send_actio @@ -7189,7 +7193,11 @@ static int wpa_driver_nl80211_send_actio
} else {
os_memset(bss->rand_addr, 0, ETH_ALEN); os_memset(bss->rand_addr, 0, ETH_ALEN);
} }
-
+ if (is_mesh_interface(drv->nlmode) && + if (is_mesh_interface(drv->nlmode) &&
+ (modes = nl80211_get_hw_feature_data(bss, &num_modes, &flags, + (modes = nl80211_get_hw_feature_data(bss, &num_modes, &flags,
+ &dfs_domain)) && + &dfs_domain)) &&
+ ieee80211_is_dfs(freq, modes, num_modes)) + ieee80211_is_dfs(freq, modes, num_modes))
+ offchanok = 0; + offchanok = 0;
+
if (is_ap_interface(drv->nlmode) && if (is_ap_interface(drv->nlmode) &&
(!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) || (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) ||
(int) freq == bss->freq || drv->device_ap_sme || (int) freq == bss->freq || drv->device_ap_sme ||
@@ -7201,7 +7211,7 @@ static int wpa_driver_nl80211_send_actio @@ -7201,7 +7209,7 @@ static int wpa_driver_nl80211_send_actio
ret = nl80211_send_frame_cmd(bss, freq, wait_time, buf, ret = nl80211_send_frame_cmd(bss, freq, wait_time, buf,
24 + data_len, 24 + data_len,
&drv->send_action_cookie, &drv->send_action_cookie,
......
From fa9d565fe8841b288f29137c23a7ab2584dd9510 Mon Sep 17 00:00:00 2001
From: Peter Oh <peter.oh@bowerswilkins.com>
Date: Tue, 29 May 2018 14:39:20 -0700
Subject: [PATCH 16/18] mesh: fix channel switch error during CAC
Mesh interface has used its channel parameters that configured
during its initialization even after channel switched due to
DFS radar detection during CAC which caused channel switch error.
This change fixes the error by updating its channel parameters
when channel's been changed from initial one.
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: added hw_features_common.h include]
---
wpa_supplicant/mesh.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -11,6 +11,7 @@
#include "utils/common.h"
#include "utils/eloop.h"
#include "utils/uuid.h"
+#include "common/hw_features_common.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_ctrl.h"
#include "ap/sta_info.h"
@@ -394,10 +395,35 @@ void wpa_supplicant_mesh_add_scan_ie(str
void wpas_mesh_complete_cb(void *ctx)
{
struct wpa_supplicant *wpa_s = (struct wpa_supplicant *)ctx;
+ struct hostapd_iface *ifmsh = wpa_s->ifmsh;
struct wpa_driver_mesh_join_params *params = wpa_s->mesh_params;
struct wpa_ssid *ssid = wpa_s->current_ssid;
int ret = 0;
+ /*
+ * inspect if channel's been changed since initialized.
+ * i.e. DFS radar detection
+ */
+ if (ifmsh->freq != params->freq.freq) {
+ wpa_s->assoc_freq = ifmsh->freq;
+ ssid->frequency = ifmsh->freq;
+ if (hostapd_set_freq_params(&params->freq,
+ ifmsh->conf->hw_mode,
+ ifmsh->freq,
+ ifmsh->conf->channel,
+ ifmsh->conf->ieee80211n,
+ ifmsh->conf->ieee80211ac,
+ ifmsh->conf->secondary_channel,
+ ifmsh->conf->vht_oper_chwidth,
+ ifmsh->conf->vht_oper_centr_freq_seg0_idx,
+ ifmsh->conf->vht_oper_centr_freq_seg1_idx,
+ ifmsh->conf->vht_capab)) {
+ wpa_printf(MSG_ERROR, "Error updating mesh frequency params.");
+ wpa_supplicant_mesh_deinit(wpa_s);
+ return;
+ }
+ }
+
if (wpas_mesh_init_rsn(wpa_s)) {
wpa_printf(MSG_ERROR, "Init RSN failed. Deinit mesh...");
wpa_supplicant_mesh_deinit(wpa_s);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment