#ifndef OPENUF_WLAN_INTERNAL_H #define OPENUF_WLAN_INTERNAL_H #include #include #include #include #include "config.h" enum wifi_standard { WIFI_STANDARD_UNKNOWN = 0, WIFI_STANDARD_4 = 4, WIFI_STANDARD_5 = 5, WIFI_STANDARD_6 = 6, WIFI_STANDARD_7 = 7, }; const char *wlan_security_to_uci(const char *unifi_security); const char *wlan_security_to_unifi(const char *uci_security); int wlan_valid_object_id(const char *object_id); int wlan_ensure_vap_ids(struct json_object *vaps); void wlan_mobility_domain_for_ssid(const char *ssid, char output[5]); int wlan_radio_uses_ath9k(const char *device_name); int wlan_json_boolean_any(struct json_object *object, const char *const *keys, size_t key_count); int wlan_feature_enabled(const char *text); void wlan_safe_section_name(const char *ssid, char *output, size_t output_size); int wlan_uci_set(struct uci_context *context, const char *path, const char *value); int wlan_uci_set_required(struct uci_context *context, struct uci_package *package, const char *section_name, const char *option_name, const char *value); int wlan_uci_add_list(struct uci_context *context, const char *path, const char *value); int wlan_uci_ensure_section(struct uci_context *context, struct uci_package *package, const char *section_name, const char *section_type); int wlan_ensure_vlan_network(int vlan_id); int wlan_configure_band_steering(int enabled); #define WLAN_UCI_SET(context, package, section, option, value) do { \ char openuf_uci_path[256]; \ snprintf(openuf_uci_path, sizeof(openuf_uci_path), "%s.%s.%s", \ package, section, option); \ wlan_uci_set(context, openuf_uci_path, value); \ } while (0) #define WLAN_UCI_SET_INT(context, package, section, option, integer_value) do { \ char openuf_uci_value[32]; \ snprintf(openuf_uci_value, sizeof(openuf_uci_value), "%d", integer_value); \ WLAN_UCI_SET(context, package, section, option, openuf_uci_value); \ } while (0) #endif /* OPENUF_WLAN_INTERNAL_H */