meta-netmodule-wlan/recipes-connectivity/hostapd/files/913-iapp-improvements.patch

45 lines
1.6 KiB
Diff

From ad70cdb2e4caa58b7f90fc56e7ed3cb36f663c0d Mon Sep 17 00:00:00 2001
From: Patrick Walther <patrick.walther@netmodule.com>
Date: Tue, 28 Jan 2020 15:14:35 +0100
Subject: [PATCH] ADD: add wpa_supplicant and hostapd to meta layer
---
src/ap/hostapd.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 7e261209d..21f29ab5b 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -1424,8 +1424,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
if (conf->ieee802_11f &&
(hapd->iapp = iapp_init(hapd, conf->iapp_iface)) == NULL) {
- wpa_printf(MSG_ERROR, "IEEE 802.11F (IAPP) initialization "
- "failed.");
+ hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
+ HOSTAPD_LEVEL_DEBUG, "IEEE 802.11F (IAPP) initialization failed. Try again later");
return -1;
}
@@ -3331,6 +3331,19 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
sta->post_csa_sa_query = 0;
/* IEEE 802.11F (IAPP) */
+ if (hapd->conf->ieee802_11f) {
+ if (!hapd->iapp) {
+ hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
+ HOSTAPD_LEVEL_DEBUG, "IEEE 802.11F (IAPP) initialization try again");
+ hapd->iapp = iapp_init(hapd, hapd->conf->iapp_iface);
+ }
+ if (hapd->iapp) {
+ hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
+ HOSTAPD_LEVEL_DEBUG, "IEEE 802.11F (IAPP) initialization add new station");
+ iapp_new_station(hapd->iapp, sta);
+ }
+ }
+
if (hapd->conf->ieee802_11f)
iapp_new_station(hapd->iapp, sta);