openwrt/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch

71 lines
2.0 KiB
Diff
Raw Normal View History

From aaeb60b39a72774c651187208ec47efd0daeb75b Mon Sep 17 00:00:00 2001
From: Gioacchino Mazzurco <gio@polymathes.cc>
Date: Tue, 7 May 2024 11:54:23 +0200
Subject: [PATCH 3/3] APuP add ucode hook for when a peer comes up
Signed-off-by: Gioacchino Mazzurco <gio@polymathes.cc>
---
src/ap/apup.c | 8 ++++++++
src/ap/ucode.c | 17 +++++++++++++++++
src/ap/ucode.h | 4 ++++
3 files changed, 29 insertions(+)
--- a/src/ap/apup.c
+++ b/src/ap/apup.c
@@ -27,6 +27,10 @@
# include "ubus.h"
#endif
+#ifdef UCODE_SUPPORT
+# include "ucode.h"
+#endif
+
void apup_process_beacon(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt, size_t len,
const struct ieee802_11_elems *elems )
hostapd: update to 2.11 release tag Release 2.11 has been quite a few new features and fixes since the 2.10 release. The following ChangeLog entries highlight some of the main changes: * Wi-Fi Easy Connect - add support for DPP release 3 - allow Configurator parameters to be provided during config exchange * HE/IEEE 802.11ax/Wi-Fi 6 - various fixes * EHT/IEEE 802.11be/Wi-Fi 7 - add preliminary support * SAE: add support for fetching the password from a RADIUS server * support OpenSSL 3.0 API changes * support background radar detection and CAC with some additional drivers * support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3) * EAP-SIM/AKA: support IMSI privacy * improve 4-way handshake operations - use Secure=1 in message 3 during PTK rekeying ...and many more Remove upstreamed patches: 023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch 030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch 040-mesh-allow-processing-authentication-frames-in-block.patch 181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch 182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch 183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch 210-build-de-duplicate-_DIRS-before-calling-mkdir.patch 253-qos_map_set_without_interworking.patch 751-qos_map_ignore_when_unsupported.patch 800-SAE-Check-for-invalid-Rejected-Groups-element-length.patch 801-SAE-Check-for-invalid-Rejected-Groups-element-length.patch 802-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch Other patches has been updated. Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16338 Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-08-15 21:47:25 +03:00
@@ -157,4 +161,8 @@ void apup_process_beacon(struct hostapd_
#ifdef UBUS_SUPPORT
hostapd_ubus_notify_apup_newpeer(hapd, mgmt->bssid, mIfname);
#endif
+
+#ifdef UCODE_SUPPORT
+ hostapd_ucode_apup_newpeer(hapd, mIfname);
+#endif
}
--- a/src/ap/ucode.c
+++ b/src/ap/ucode.c
@@ -802,3 +802,20 @@ void hostapd_ucode_free_bss(struct hosta
ucv_put(wpa_ucode_call(2));
ucv_gc(vm);
}
+
+#ifdef CONFIG_APUP
+void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *ifname)
+{
+ uc_value_t *val;
+
+ if (wpa_ucode_call_prepare("apup_newpeer"))
+ return;
+
+ val = hostapd_ucode_bss_get_uval(hapd);
+ uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface))); // BSS ifname
+ uc_value_push(ucv_get(val));
+ uc_value_push(ucv_get(ucv_string_new(ifname))); // APuP peer ifname
+ ucv_put(wpa_ucode_call(2));
+ ucv_gc(vm);
+}
+#endif // def CONFIG_APUP
--- a/src/ap/ucode.h
+++ b/src/ap/ucode.h
@@ -26,6 +26,10 @@ void hostapd_ucode_free_iface(struct hos
void hostapd_ucode_free_bss(struct hostapd_data *hapd);
void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type);
+#ifdef CONFIG_APUP
+void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *ifname);
+#endif // def CONFIG_APUP
+
#else
static inline int hostapd_ucode_init(struct hapd_interfaces *ifaces)