hostapd: add update_beacon to ubus binding

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45325
owl
John Crispin 2015-04-09 10:31:45 +00:00
parent fb0534bcc3
commit ff211def3e
1 changed files with 20 additions and 3 deletions

View File

@ -41,7 +41,7 @@
HAPD_IFACE_DISABLED,
--- /dev/null
+++ b/src/ap/ubus.c
@@ -0,0 +1,494 @@
@@ -0,0 +1,511 @@
+/*
+ * hostapd / ubus support
+ * Copyright (c) 2013, Felix Fietkau <nbd@openwrt.org>
@ -343,6 +343,22 @@
+ return 0;
+}
+
+static int
+hostapd_bss_update_beacon(struct ubus_context *ctx, struct ubus_object *obj,
+ struct ubus_request_data *req, const char *method,
+ struct blob_attr *msg)
+{
+ int rc;
+ struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
+
+ rc = ieee802_11_set_beacon(hapd);
+
+ if (rc != 0)
+ return UBUS_STATUS_NOT_SUPPORTED;
+
+ return 0;
+}
+
+enum {
+ CSA_FREQ,
+ CSA_BCN_COUNT,
@ -425,6 +441,7 @@
+ UBUS_METHOD_NOARG("list_bans", hostapd_bss_list_bans),
+ UBUS_METHOD_NOARG("wps_start", hostapd_bss_wps_start),
+ UBUS_METHOD_NOARG("wps_cancel", hostapd_bss_wps_cancel),
+ UBUS_METHOD_NOARG("update_beacon", hostapd_bss_update_beacon),
+#ifdef NEED_AP_MLME
+ UBUS_METHOD("switch_chan", hostapd_switch_chan, csa_policy),
+#endif