hostapd.udebug_set(null);
hostapd.ubus.disconnect();
},
- bss_add: function(name, obj) {
+ bss_add: function(phy, name, obj) {
bss_event("add", name);
},
- bss_reload: function(name, obj, reconf) {
+ bss_reload: function(phy, name, obj, reconf) {
bss_event("reload", name, { reconf: reconf != 0 });
},
- bss_remove: function(name, obj) {
+ bss_remove: function(phy, name, obj) {
bss_event("remove", name);
}
};
{
struct hostapd_bss_config *conf = hapd->conf;
u8 ssid[SSID_MAX_LEN + 1];
-@@ -2954,7 +2958,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -1510,6 +1514,8 @@ setup_mld:
+ }
+ #endif /* CONFIG_IEEE80211BE */
+
++ hostapd_ucode_create_bss(hapd);
++
+ if (conf->wmm_enabled < 0)
+ conf->wmm_enabled = hapd->iconf->ieee80211n |
+ hapd->iconf->ieee80211ax;
+@@ -2954,7 +2960,7 @@ hostapd_alloc_bss_data(struct hostapd_if
}
{
if (!hapd)
return;
-@@ -4015,7 +4019,8 @@ int hostapd_remove_iface(struct hapd_int
+@@ -4015,7 +4021,8 @@ int hostapd_remove_iface(struct hapd_int
hapd_iface = interfaces->iface[i];
if (hapd_iface == NULL)
return -1;
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -5200,6 +5200,15 @@ static int hostapd_config_fill(struct ho
+@@ -5202,6 +5202,15 @@ static int hostapd_config_fill(struct ho
bss->mld_indicate_disabled = atoi(pos);
#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_IEEE80211BE */
"Line %d: unknown configuration item '%s'",
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -999,6 +999,35 @@ struct hostapd_bss_config {
+@@ -1000,6 +1000,35 @@ struct hostapd_bss_config {
bool mld_indicate_disabled;
#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_IEEE80211BE */
+#endif // def CONFIG_APUP
--- a/src/ap/ubus.h
+++ b/src/ap/ubus.h
-@@ -71,6 +71,11 @@ int hostapd_ubus_notify_bss_transition_q
+@@ -69,6 +69,11 @@ int hostapd_ubus_notify_bss_transition_q
void hostapd_ubus_notify_authorized(struct hostapd_data *hapd, struct sta_info *sta,
const char *auth_alg);
}
--- a/src/ap/ucode.c
+++ b/src/ap/ucode.c
-@@ -815,3 +815,20 @@ void hostapd_ucode_free_bss(struct hosta
+@@ -802,3 +802,20 @@ void hostapd_ucode_free_bss(struct hosta
ucv_put(wpa_ucode_call(2));
ucv_gc(vm);
}
+#endif // def CONFIG_APUP
--- a/src/ap/ucode.h
+++ b/src/ap/ucode.h
-@@ -27,6 +27,10 @@ void hostapd_ucode_add_bss(struct hostap
+@@ -26,6 +26,10 @@ void hostapd_ucode_free_iface(struct hos
void hostapd_ucode_free_bss(struct hostapd_data *hapd);
- void hostapd_ucode_reload_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);
wpa_ucode_registry_remove(iface_registry, iface->ucode.idx);
}
-void hostapd_ucode_add_bss(struct hostapd_data *hapd)
+void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type)
{
uc_value_t *val;
- if (wpa_ucode_call_prepare("bss_add"))
+ if (wpa_ucode_call_prepare(type))
return;
val = hostapd_ucode_bss_get_uval(hapd);
+ uc_value_push(ucv_get(ucv_string_new(hapd->iface->phy)));
uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface)));
uc_value_push(ucv_get(val));
- ucv_put(wpa_ucode_call(2));
- ucv_gc(vm);
-}
-
-void hostapd_ucode_reload_bss(struct hostapd_data *hapd)
-{
- uc_value_t *val;
-
- if (wpa_ucode_call_prepare("bss_reload"))
- return;
-
- val = hostapd_ucode_bss_get_uval(hapd);
- uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface)));
- uc_value_push(ucv_get(val));
- ucv_put(wpa_ucode_call(2));
+ ucv_put(wpa_ucode_call(3));
ucv_gc(vm);
}
void hostapd_ucode_free(void);
void hostapd_ucode_free_iface(struct hostapd_iface *iface);
-void hostapd_ucode_add_bss(struct hostapd_data *hapd);
void hostapd_ucode_free_bss(struct hostapd_data *hapd);
-void hostapd_ucode_reload_bss(struct hostapd_data *hapd);
+void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type);
#else
static inline void hostapd_ucode_free_iface(struct hostapd_iface *iface)
{
}
-static inline void hostapd_ucode_reload_bss(struct hostapd_data *hapd)
-{
-}
-static inline void hostapd_ucode_add_bss(struct hostapd_data *hapd)
+static inline void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type)
{
}
static inline void hostapd_ucode_free_bss(struct hostapd_data *hapd)
#endif
+static inline void hostapd_ucode_create_bss(struct hostapd_data *hapd)
+{
+ hostapd_ucode_bss_cb(hapd, "bss_create");
+}
+
+static inline void hostapd_ucode_add_bss(struct hostapd_data *hapd)
+{
+ hostapd_ucode_bss_cb(hapd, "bss_add");
+}
+
+static inline void hostapd_ucode_reload_bss(struct hostapd_data *hapd)
+{
+ hostapd_ucode_bss_cb(hapd, "bss_reload");
+}
+
#endif