mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
B#11323: remove SSID object fail
This commit is contained in:
parent
ae33e60b2f
commit
19c8a77aee
2 changed files with 198 additions and 129 deletions
|
|
@ -30,9 +30,9 @@ struct wifi_radio_args
|
||||||
|
|
||||||
struct wifi_ssid_args
|
struct wifi_ssid_args
|
||||||
{
|
{
|
||||||
struct dmmap_dup *sections;
|
struct uci_section *config_s;
|
||||||
|
struct uci_section *dmmap_s;
|
||||||
char *ifname;
|
char *ifname;
|
||||||
char *linker;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wifi_acp_args
|
struct wifi_acp_args
|
||||||
|
|
@ -115,11 +115,11 @@ static inline int init_wifi_radio(struct wifi_radio_args *args, struct dmmap_dup
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int init_wifi_ssid(struct wifi_ssid_args *args, struct dmmap_dup *s, char *wiface, char *linker)
|
static inline int init_wifi_ssid(struct wifi_ssid_args *args, struct uci_section *config_s, struct uci_section *dmmap_s, char *ifname)
|
||||||
{
|
{
|
||||||
args->sections = s;
|
args->config_s = config_s;
|
||||||
args->ifname = wiface;
|
args->dmmap_s = dmmap_s;
|
||||||
args->linker = linker;
|
args->ifname = ifname;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@ static struct uci_section *find_mapcontroller_section(struct uci_section *wirele
|
||||||
char *ssid = NULL;
|
char *ssid = NULL;
|
||||||
char *band = NULL;
|
char *band = NULL;
|
||||||
|
|
||||||
if (!file_exists("/etc/config/mapcontroller"))
|
if (!file_exists("/etc/config/mapcontroller") || !wireless_s)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(wireless_s, "ssid", &ssid);
|
dmuci_get_value_by_section_string(wireless_s, "ssid", &ssid);
|
||||||
|
|
@ -320,24 +320,19 @@ static struct uci_section *find_mapcontroller_section(struct uci_section *wirele
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
static int add_wifi_ssid(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
static int add_wifi_ssid(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||||
{
|
{
|
||||||
struct uci_section *s = NULL, *dmmap_wifi = NULL;
|
struct uci_section *dmmap = NULL;
|
||||||
char ssid[32] = {0}, s_name[32] = {0};
|
char ssid[32] = {0}, ifname[32] = {0};
|
||||||
|
|
||||||
snprintf(ssid, sizeof(ssid), "iopsys_ssid_%s", *instance);
|
snprintf(ssid, sizeof(ssid), "ssid_%s", *instance);
|
||||||
snprintf(s_name, sizeof(s_name), "wlan_ssid_%s", *instance);
|
snprintf(ifname, sizeof(ifname), "wl%s", *instance);
|
||||||
|
|
||||||
dmuci_add_section("wireless", "wifi-iface", &s);
|
dmuci_add_section_bbfdm("dmmap_wireless", "ssid", &dmmap);
|
||||||
dmuci_rename_section_by_section(s, s_name);
|
dmuci_set_value_by_section(dmmap, "enabled", "0");
|
||||||
dmuci_set_value_by_section(s, "disabled", "1");
|
dmuci_set_value_by_section(dmmap, "ifname", ifname);
|
||||||
dmuci_set_value_by_section(s, "ssid", ssid);
|
dmuci_set_value_by_section(dmmap, "ssid", ssid);
|
||||||
dmuci_set_value_by_section(s, "network", "lan");
|
dmuci_set_value_by_section(dmmap, "name", ssid);
|
||||||
dmuci_set_value_by_section(s, "mode", "ap");
|
dmuci_set_value_by_section(dmmap, "added_by_user", "1");
|
||||||
|
dmuci_set_value_by_section(dmmap, "ssid_instance", *instance);
|
||||||
dmuci_add_section_bbfdm("dmmap_wireless", "wifi-iface", &dmmap_wifi);
|
|
||||||
dmuci_set_value_by_section(dmmap_wifi, "section_name", s_name);
|
|
||||||
dmuci_set_value_by_section(dmmap_wifi, "ssid_added_by_user", "1");
|
|
||||||
dmuci_set_value_by_section(dmmap_wifi, "ifname", ssid);
|
|
||||||
dmuci_set_value_by_section(dmmap_wifi, "ssidinstance", *instance);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -347,24 +342,31 @@ static int delete_wifi_ssid(char *refparam, struct dmctx *ctx, void *data, char
|
||||||
|
|
||||||
switch (del_action) {
|
switch (del_action) {
|
||||||
case DEL_INST:
|
case DEL_INST:
|
||||||
dmuci_delete_by_section((((struct wifi_ssid_args *)data)->sections)->dmmap_section, NULL, NULL);
|
if (((struct wifi_ssid_args *)data)->config_s) {
|
||||||
dmuci_delete_by_section((((struct wifi_ssid_args *)data)->sections)->config_section, NULL, NULL);
|
dmuci_delete_by_section(((struct wifi_ssid_args *)data)->config_s, "device", NULL);
|
||||||
|
dmuci_delete_by_section(((struct wifi_ssid_args *)data)->config_s, "ifname", NULL);
|
||||||
|
dmuci_delete_by_section(((struct wifi_ssid_args *)data)->config_s, "ssid", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
dmuci_delete_by_section(((struct wifi_ssid_args *)data)->dmmap_s, NULL, NULL);
|
||||||
break;
|
break;
|
||||||
case DEL_ALL:
|
case DEL_ALL:
|
||||||
uci_foreach_sections_safe("wireless", "wifi-iface", stmp, ssid_s) {
|
uci_path_foreach_sections_safe(bbfdm, "dmmap_wireless", "ssid", stmp, ssid_s) {
|
||||||
struct uci_section *dmmap_section = NULL;
|
struct uci_section *s = NULL;
|
||||||
char *added_by_user;
|
char *ifname = NULL;
|
||||||
|
|
||||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name(ssid_s), &dmmap_section);
|
dmuci_get_value_by_section_string(ssid_s, "ifname", &ifname);
|
||||||
dmuci_get_value_by_section_string(dmmap_section, "ap_added_by_user", &added_by_user);
|
|
||||||
if (DM_LSTRCMP(added_by_user, "1") == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
dmuci_delete_by_section(dmmap_section, NULL, NULL);
|
s = get_dup_section_in_config_opt("wireless", "wifi-iface", "ifname", ifname);
|
||||||
|
if (s) {
|
||||||
|
dmuci_delete_by_section(s, "device", NULL);
|
||||||
|
dmuci_delete_by_section(s, "ifname", NULL);
|
||||||
|
dmuci_delete_by_section(s, "ssid", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
dmuci_delete_by_section(ssid_s, NULL, NULL);
|
dmuci_delete_by_section(ssid_s, NULL, NULL);
|
||||||
}
|
}
|
||||||
return 0;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -372,21 +374,18 @@ static int delete_wifi_ssid(char *refparam, struct dmctx *ctx, void *data, char
|
||||||
static int add_wifi_accesspoint(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
static int add_wifi_accesspoint(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||||
{
|
{
|
||||||
struct uci_section *s = NULL, *dmmap_wifi = NULL;
|
struct uci_section *s = NULL, *dmmap_wifi = NULL;
|
||||||
char ssid[32] = {0}, s_name[32] = {0};
|
char s_name[32] = {0};
|
||||||
|
|
||||||
snprintf(ssid, sizeof(ssid), "iopsys_ap_%s", *instance);
|
|
||||||
snprintf(s_name, sizeof(s_name), "wlan_ap_%s", *instance);
|
snprintf(s_name, sizeof(s_name), "wlan_ap_%s", *instance);
|
||||||
|
|
||||||
dmuci_add_section("wireless", "wifi-iface", &s);
|
dmuci_add_section("wireless", "wifi-iface", &s);
|
||||||
dmuci_rename_section_by_section(s, s_name);
|
dmuci_rename_section_by_section(s, s_name);
|
||||||
dmuci_set_value_by_section(s, "disabled", "1");
|
dmuci_set_value_by_section(s, "disabled", "1");
|
||||||
dmuci_set_value_by_section(s, "ssid", ssid);
|
|
||||||
dmuci_set_value_by_section(s, "network", "lan");
|
dmuci_set_value_by_section(s, "network", "lan");
|
||||||
dmuci_set_value_by_section(s, "mode", "ap");
|
dmuci_set_value_by_section(s, "mode", "ap");
|
||||||
|
|
||||||
dmuci_add_section_bbfdm("dmmap_wireless", "wifi-iface", &dmmap_wifi);
|
dmuci_add_section_bbfdm("dmmap_wireless", "wifi-iface", &dmmap_wifi);
|
||||||
dmuci_set_value_by_section(dmmap_wifi, "section_name", s_name);
|
dmuci_set_value_by_section(dmmap_wifi, "section_name", s_name);
|
||||||
dmuci_set_value_by_section(dmmap_wifi, "ap_added_by_user", "1");
|
|
||||||
dmuci_set_value_by_section(dmmap_wifi, "ap_instance", *instance);
|
dmuci_set_value_by_section(dmmap_wifi, "ap_instance", *instance);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -397,19 +396,14 @@ static int delete_wifi_accesspoint(char *refparam, struct dmctx *ctx, void *data
|
||||||
|
|
||||||
switch (del_action) {
|
switch (del_action) {
|
||||||
case DEL_INST:
|
case DEL_INST:
|
||||||
dmuci_delete_by_section((((struct wifi_ssid_args *)data)->sections)->dmmap_section, NULL, NULL);
|
dmuci_delete_by_section((((struct wifi_acp_args *)data)->sections)->dmmap_section, NULL, NULL);
|
||||||
dmuci_delete_by_section((((struct wifi_ssid_args *)data)->sections)->config_section, NULL, NULL);
|
dmuci_delete_by_section((((struct wifi_acp_args *)data)->sections)->config_section, NULL, NULL);
|
||||||
break;
|
break;
|
||||||
case DEL_ALL:
|
case DEL_ALL:
|
||||||
uci_foreach_sections_safe("wireless", "wifi-iface", stmp, ap_s) {
|
uci_foreach_sections_safe("wireless", "wifi-iface", stmp, ap_s) {
|
||||||
struct uci_section *dmmap_section = NULL;
|
struct uci_section *dmmap_section = NULL;
|
||||||
char *added_by_user;
|
|
||||||
|
|
||||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name(ap_s), &dmmap_section);
|
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name(ap_s), &dmmap_section);
|
||||||
dmuci_get_value_by_section_string(dmmap_section, "ssid_added_by_user", &added_by_user);
|
|
||||||
if (DM_LSTRCMP(added_by_user, "1") == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
dmuci_delete_by_section(dmmap_section, NULL, NULL);
|
dmuci_delete_by_section(dmmap_section, NULL, NULL);
|
||||||
|
|
||||||
dmuci_delete_by_section(ap_s, NULL, NULL);
|
dmuci_delete_by_section(ap_s, NULL, NULL);
|
||||||
|
|
@ -474,6 +468,7 @@ static int browseWifiRadioInst(struct dmctx *dmctx, DMNODE *parent_node, void *p
|
||||||
LIST_HEAD(dup_list);
|
LIST_HEAD(dup_list);
|
||||||
|
|
||||||
memset(&curr_wifi_radio_args, 0, sizeof(struct wifi_radio_args));
|
memset(&curr_wifi_radio_args, 0, sizeof(struct wifi_radio_args));
|
||||||
|
|
||||||
synchronize_specific_config_sections_with_dmmap("wireless", "wifi-device", "dmmap_wireless", &dup_list);
|
synchronize_specific_config_sections_with_dmmap("wireless", "wifi-device", "dmmap_wireless", &dup_list);
|
||||||
list_for_each_entry(p, &dup_list, list) {
|
list_for_each_entry(p, &dup_list, list) {
|
||||||
init_wifi_radio(&curr_wifi_radio_args, p);
|
init_wifi_radio(&curr_wifi_radio_args, p);
|
||||||
|
|
@ -487,38 +482,78 @@ static int browseWifiRadioInst(struct dmctx *dmctx, DMNODE *parent_node, void *p
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dmmap_synchronizeWiFiSSID(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance)
|
||||||
|
{
|
||||||
|
struct uci_section *s = NULL, *ss = NULL, *stmp = NULL;
|
||||||
|
char *user_s = NULL, *ifname = NULL;
|
||||||
|
|
||||||
|
uci_path_foreach_sections_safe(bbfdm, "dmmap_wireless", "ssid", stmp, s) {
|
||||||
|
|
||||||
|
// section added by user ==> skip it
|
||||||
|
dmuci_get_value_by_section_string(s, "added_by_user", &user_s);
|
||||||
|
if (DM_LSTRCMP(user_s, "1") == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// check config section ==> if it exists then skip it
|
||||||
|
dmuci_get_value_by_section_string(s, "ifname", &ifname);
|
||||||
|
ss = get_dup_section_in_config_opt("wireless", "wifi-iface", "ifname", ifname);
|
||||||
|
if (ss)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// else ==> delete section
|
||||||
|
dmuci_delete_by_section(s, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
uci_foreach_sections("wireless", "wifi-iface", s) {
|
||||||
|
char *disabled = NULL, *ssid = NULL, *device = NULL;
|
||||||
|
|
||||||
|
// if ifname is empty ==> skip it
|
||||||
|
dmuci_get_value_by_section_string(s, "ifname", &ifname);
|
||||||
|
if (DM_STRLEN(ifname) == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// if dmmap section exits ==> skip it
|
||||||
|
ss = get_dup_section_in_dmmap_opt("dmmap_wireless", "ssid", "ifname", ifname);
|
||||||
|
if (ss)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
dmuci_get_value_by_section_string(s, "disabled", &disabled);
|
||||||
|
dmuci_get_value_by_section_string(s, "ssid", &ssid);
|
||||||
|
dmuci_get_value_by_section_string(s, "device", &device);
|
||||||
|
|
||||||
|
dmuci_add_section_bbfdm("dmmap_wireless", "ssid", &ss);
|
||||||
|
dmuci_set_value_by_section(ss, "enabled", DM_STRLEN(disabled) ? ((*disabled == '1') ? "0" : "1") : "1");
|
||||||
|
dmuci_set_value_by_section(ss, "ifname", ifname);
|
||||||
|
dmuci_set_value_by_section(ss, "ssid", ssid);
|
||||||
|
dmuci_set_value_by_section(ss, "device", device);
|
||||||
|
dmuci_set_value_by_section(ss, "name", section_name(s));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*#Device.WiFi.SSID.{i}.!UCI:wireless/wifi-iface/dmmap_wireless*/
|
/*#Device.WiFi.SSID.{i}.!UCI:wireless/wifi-iface/dmmap_wireless*/
|
||||||
static int browseWifiSsidInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance)
|
static int browseWifiSsidInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance)
|
||||||
{
|
{
|
||||||
char *inst = NULL, *ifname = NULL, *linker = NULL;
|
|
||||||
struct wifi_ssid_args curr_wifi_ssid_args = {0};
|
struct wifi_ssid_args curr_wifi_ssid_args = {0};
|
||||||
struct dmmap_dup *p = NULL;
|
struct uci_section *dmmap_s = NULL;
|
||||||
LIST_HEAD(dup_list);
|
char *inst = NULL;
|
||||||
|
|
||||||
synchronize_specific_config_sections_with_dmmap("wireless", "wifi-iface", "dmmap_wireless", &dup_list);
|
dmmap_synchronizeWiFiSSID(dmctx, parent_node, prev_data, prev_instance);
|
||||||
list_for_each_entry(p, &dup_list, list) {
|
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(p->config_section, "device", &linker);
|
uci_path_foreach_sections(bbfdm, "dmmap_wireless", "ssid", dmmap_s) {
|
||||||
dmuci_get_value_by_section_string(p->config_section, "ifname", &ifname);
|
struct uci_section *config_s = NULL;
|
||||||
|
char *ifname = NULL;
|
||||||
|
|
||||||
if (*ifname == '\0') {
|
dmuci_get_value_by_section_string(dmmap_s, "ifname", &ifname);
|
||||||
char *added_by_user;
|
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(p->dmmap_section, "ap_added_by_user", &added_by_user);
|
config_s = get_dup_section_in_config_opt("wireless", "wifi-iface", "ifname", ifname);
|
||||||
if (DM_LSTRCMP(added_by_user, "1") == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(p->dmmap_section, "ifname", &ifname);
|
init_wifi_ssid(&curr_wifi_ssid_args, config_s, dmmap_s, ifname);
|
||||||
}
|
|
||||||
|
|
||||||
init_wifi_ssid(&curr_wifi_ssid_args, p, ifname, linker);
|
inst = handle_instance(dmctx, parent_node, dmmap_s, "ssid_instance", "ssid_alias");
|
||||||
|
|
||||||
inst = handle_instance(dmctx, parent_node, p->dmmap_section, "ssidinstance", "ssidalias");
|
|
||||||
|
|
||||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)&curr_wifi_ssid_args, inst) == DM_STOP)
|
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)&curr_wifi_ssid_args, inst) == DM_STOP)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free_dmmap_config_dup_list(&dup_list);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -532,19 +567,13 @@ static int browseWifiAccessPointInst(struct dmctx *dmctx, DMNODE *parent_node, v
|
||||||
|
|
||||||
synchronize_specific_config_sections_with_dmmap("wireless", "wifi-iface", "dmmap_wireless", &dup_list);
|
synchronize_specific_config_sections_with_dmmap("wireless", "wifi-iface", "dmmap_wireless", &dup_list);
|
||||||
list_for_each_entry(p, &dup_list, list) {
|
list_for_each_entry(p, &dup_list, list) {
|
||||||
char *mode, *ifname, *added_by_user;
|
char *mode = NULL, *ifname = NULL;
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(p->config_section, "mode", &mode);
|
dmuci_get_value_by_section_string(p->config_section, "mode", &mode);
|
||||||
if (DM_LSTRCMP(mode, "ap") != 0)
|
if (DM_LSTRCMP(mode, "ap") != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(p->dmmap_section, "ssid_added_by_user", &added_by_user);
|
|
||||||
if (DM_LSTRCMP(added_by_user, "1") == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(p->config_section, "ifname", &ifname);
|
dmuci_get_value_by_section_string(p->config_section, "ifname", &ifname);
|
||||||
if (*ifname == '\0')
|
|
||||||
dmuci_get_value_by_section_string(p->dmmap_section, "ifname", &ifname);
|
|
||||||
|
|
||||||
init_wifi_acp(&curr_wifi_acp_args, p, ifname);
|
init_wifi_acp(&curr_wifi_acp_args, p, ifname);
|
||||||
|
|
||||||
|
|
@ -664,29 +693,26 @@ static int get_WiFi_EndPointNumberOfEntries(char *refparam, struct dmctx *ctx, v
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#Device.WiFi.SSID.{i}.Enable!UCI:wireless/wifi-iface,@i-1/disabled*/
|
static int get_wifi_ssid_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
/*#Device.WiFi.AccessPoint.{i}.Enable!UCI:wireless/wifi-iface,@i-1/disabled*/
|
|
||||||
static int get_wifi_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
|
||||||
{
|
{
|
||||||
dmuci_get_value_by_section_string((((struct wifi_ssid_args *)data)->sections)->config_section, "disabled", value);
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->dmmap_s, "enabled", value);
|
||||||
*value = ((*value)[0] == '1') ? "0" : "1";
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int set_wifi_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
static int set_wifi_ssid_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||||
{
|
{
|
||||||
struct uci_section *map_s = NULL;
|
struct uci_section *map_s = NULL;
|
||||||
char *multi_ap = NULL;
|
char *multi_ap = NULL;
|
||||||
bool b;
|
bool b;
|
||||||
|
|
||||||
map_s = find_mapcontroller_section((((struct wifi_ssid_args *)data)->sections)->config_section);
|
map_s = find_mapcontroller_section(((struct wifi_ssid_args *)data)->config_s);
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case VALUECHECK:
|
case VALUECHECK:
|
||||||
if (bbfdm_validate_boolean(ctx, value))
|
if (bbfdm_validate_boolean(ctx, value))
|
||||||
return FAULT_9007;
|
return FAULT_9007;
|
||||||
|
|
||||||
dmuci_get_value_by_section_string((((struct wifi_ssid_args *)data)->sections)->config_section, "multi_ap", &multi_ap);
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->config_s, "multi_ap", &multi_ap);
|
||||||
if (DM_STRLEN(multi_ap) && !map_s)
|
if (DM_STRLEN(multi_ap) && !map_s)
|
||||||
return FAULT_9007;
|
return FAULT_9007;
|
||||||
|
|
||||||
|
|
@ -695,12 +721,14 @@ static int set_wifi_enable(char *refparam, struct dmctx *ctx, void *data, char *
|
||||||
string_to_bool(value, &b);
|
string_to_bool(value, &b);
|
||||||
|
|
||||||
// wireless config: Update disabled option
|
// wireless config: Update disabled option
|
||||||
dmuci_set_value_by_section((((struct wifi_ssid_args *)data)->sections)->config_section, "disabled", b ? "0" : "1");
|
if (((struct wifi_ssid_args *)data)->config_s)
|
||||||
|
dmuci_set_value_by_section(((struct wifi_ssid_args *)data)->config_s, "disabled", b ? "0" : "1");
|
||||||
|
|
||||||
// mapcontroller config: Update the corresponding ap section if exists
|
// mapcontroller config: Update the corresponding ap section if exists
|
||||||
if (map_s)
|
if (map_s)
|
||||||
dmuci_set_value_by_section(map_s, "enabled", b ? "1" : "0");
|
dmuci_set_value_by_section(map_s, "enabled", b ? "1" : "0");
|
||||||
|
|
||||||
|
dmuci_set_value_by_section(((struct wifi_ssid_args *)data)->dmmap_s, "enabled", b ? "1" : "0");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -710,14 +738,14 @@ static int get_wifi_status(char *refparam, struct dmctx *ctx, void *data, char *
|
||||||
{
|
{
|
||||||
char *ifname = NULL;
|
char *ifname = NULL;
|
||||||
|
|
||||||
dmuci_get_value_by_section_string((((struct wifi_ssid_args *)data)->sections)->config_section, "ifname", &ifname);
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->dmmap_s, "ifname", &ifname);
|
||||||
return get_net_device_status(ifname, value);
|
return get_net_device_status(ifname, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#Device.WiFi.SSID.{i}.SSID!UCI:wireless/wifi-iface,@i-1/ssid*/
|
/*#Device.WiFi.SSID.{i}.SSID!UCI:wireless/wifi-iface,@i-1/ssid*/
|
||||||
static int get_wlan_ssid(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
static int get_wlan_ssid(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
{
|
{
|
||||||
dmuci_get_value_by_section_string((((struct wifi_ssid_args *)data)->sections)->config_section, "ssid", value);
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->dmmap_s, "ssid", value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -726,26 +754,28 @@ static int set_wlan_ssid(char *refparam, struct dmctx *ctx, void *data, char *in
|
||||||
struct uci_section *map_s = NULL;
|
struct uci_section *map_s = NULL;
|
||||||
char *multi_ap = NULL;
|
char *multi_ap = NULL;
|
||||||
|
|
||||||
map_s = find_mapcontroller_section((((struct wifi_ssid_args *)data)->sections)->config_section);
|
map_s = find_mapcontroller_section(((struct wifi_ssid_args *)data)->config_s);
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case VALUECHECK:
|
case VALUECHECK:
|
||||||
if (bbfdm_validate_string(ctx, value, -1, 32, NULL, NULL))
|
if (bbfdm_validate_string(ctx, value, -1, 32, NULL, NULL))
|
||||||
return FAULT_9007;
|
return FAULT_9007;
|
||||||
|
|
||||||
dmuci_get_value_by_section_string((((struct wifi_ssid_args *)data)->sections)->config_section, "multi_ap", &multi_ap);
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->config_s, "multi_ap", &multi_ap);
|
||||||
if (DM_STRLEN(multi_ap) && !map_s)
|
if (DM_STRLEN(multi_ap) && !map_s)
|
||||||
return FAULT_9007;
|
return FAULT_9007;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case VALUESET:
|
case VALUESET:
|
||||||
// wireless config: Update ssid option
|
// wireless config: Update ssid option
|
||||||
dmuci_set_value_by_section((((struct wifi_ssid_args *)data)->sections)->config_section, "ssid", value);
|
if (((struct wifi_ssid_args *)data)->config_s)
|
||||||
|
dmuci_set_value_by_section(((struct wifi_ssid_args *)data)->config_s, "ssid", value);
|
||||||
|
|
||||||
// mapcontroller config: Update the corresponding ap section if exists
|
// mapcontroller config: Update the corresponding ap section if exists
|
||||||
if (map_s)
|
if (map_s)
|
||||||
dmuci_set_value_by_section(map_s, "ssid", value);
|
dmuci_set_value_by_section(map_s, "ssid", value);
|
||||||
|
|
||||||
|
dmuci_set_value_by_section(((struct wifi_ssid_args *)data)->dmmap_s, "ssid", value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -753,7 +783,7 @@ static int set_wlan_ssid(char *refparam, struct dmctx *ctx, void *data, char *in
|
||||||
|
|
||||||
static int get_wlan_name(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
static int get_wlan_name(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
{
|
{
|
||||||
*value = dmstrdup(section_name((((struct wifi_ssid_args *)data)->sections)->config_section));
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->dmmap_s, "name", value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1331,15 +1361,15 @@ static int set_radio_auto_channel_enable(char *refparam, struct dmctx *ctx, void
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#Device.WiFi.SSID.{i}.SSIDAdvertisementEnabled!UCI:wireless/wifi-iface,@i-1/hidden*/
|
/*#Device.WiFi.AccessPoint.{i}.SSIDAdvertisementEnabled!UCI:wireless/wifi-iface,@i-1/hidden*/
|
||||||
static int get_wlan_ssid_advertisement_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
static int get_wlan_ap_advertisement_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
{
|
{
|
||||||
dmuci_get_value_by_section_string((((struct wifi_ssid_args *)data)->sections)->config_section, "hidden", value);
|
dmuci_get_value_by_section_string((((struct wifi_acp_args *)data)->sections)->config_section, "hidden", value);
|
||||||
*value = ((*value)[0] == '1') ? "0" : "1";
|
*value = ((*value)[0] == '1') ? "0" : "1";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int set_wlan_ssid_advertisement_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
static int set_wlan_ap_advertisement_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||||
{
|
{
|
||||||
bool b;
|
bool b;
|
||||||
|
|
||||||
|
|
@ -1350,7 +1380,7 @@ static int set_wlan_ssid_advertisement_enable(char *refparam, struct dmctx *ctx,
|
||||||
return 0;
|
return 0;
|
||||||
case VALUESET:
|
case VALUESET:
|
||||||
string_to_bool(value, &b);
|
string_to_bool(value, &b);
|
||||||
dmuci_set_value_by_section((((struct wifi_ssid_args *)data)->sections)->config_section, "hidden", b ? "0" : "1");
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "hidden", b ? "0" : "1");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1741,7 +1771,7 @@ static int set_access_point_security_shared_key(char *refparam, struct dmctx *ct
|
||||||
char *encryption = NULL;
|
char *encryption = NULL;
|
||||||
char *multi_ap = NULL;
|
char *multi_ap = NULL;
|
||||||
|
|
||||||
map_s = find_mapcontroller_section((((struct wifi_ssid_args *)data)->sections)->config_section);
|
map_s = find_mapcontroller_section((((struct wifi_acp_args *)data)->sections)->config_section);
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case VALUECHECK:
|
case VALUECHECK:
|
||||||
|
|
@ -1820,7 +1850,7 @@ static int set_WiFiAccessPointSecurity_SAEPassphrase(char *refparam, struct dmct
|
||||||
char *encryption = NULL;
|
char *encryption = NULL;
|
||||||
char *multi_ap = NULL;
|
char *multi_ap = NULL;
|
||||||
|
|
||||||
map_s = find_mapcontroller_section((((struct wifi_ssid_args *)data)->sections)->config_section);
|
map_s = find_mapcontroller_section((((struct wifi_acp_args *)data)->sections)->config_section);
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case VALUECHECK:
|
case VALUECHECK:
|
||||||
|
|
@ -2398,7 +2428,7 @@ static int set_WiFiEndPointProfileSecurity_ModeEnabled(char *refparam, struct dm
|
||||||
char *supported_modes = NULL;
|
char *supported_modes = NULL;
|
||||||
char *multi_ap = NULL;
|
char *multi_ap = NULL;
|
||||||
|
|
||||||
map_s = find_mapcontroller_section((((struct wifi_ssid_args *)data)->sections)->config_section);
|
map_s = find_mapcontroller_section((((struct wifi_acp_args *)data)->sections)->config_section);
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case VALUECHECK:
|
case VALUECHECK:
|
||||||
|
|
@ -2626,7 +2656,7 @@ static int set_radio_alias(char *refparam, struct dmctx *ctx, void *data, char *
|
||||||
/*#Device.WiFi.SSID.{i}.Alias!UCI:dmmap_wireless/wifi-iface,@i-1/ssidalias*/
|
/*#Device.WiFi.SSID.{i}.Alias!UCI:dmmap_wireless/wifi-iface,@i-1/ssidalias*/
|
||||||
static int get_ssid_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
static int get_ssid_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
{
|
{
|
||||||
dmuci_get_value_by_section_string((((struct wifi_ssid_args *)data)->sections)->dmmap_section, "ssidalias", value);
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->dmmap_s, "ssid_alias", value);
|
||||||
if ((*value)[0] == '\0')
|
if ((*value)[0] == '\0')
|
||||||
dmasprintf(value, "cpe-%s", instance);
|
dmasprintf(value, "cpe-%s", instance);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -2640,7 +2670,7 @@ static int set_ssid_alias(char *refparam, struct dmctx *ctx, void *data, char *i
|
||||||
return FAULT_9007;
|
return FAULT_9007;
|
||||||
return 0;
|
return 0;
|
||||||
case VALUESET:
|
case VALUESET:
|
||||||
dmuci_set_value_by_section((((struct wifi_ssid_args *)data)->sections)->dmmap_section, "ssidalias", value);
|
dmuci_set_value_by_section(((struct wifi_ssid_args *)data)->dmmap_s, "ssid_alias", value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -2671,7 +2701,10 @@ static int set_access_point_alias(char *refparam, struct dmctx *ctx, void *data,
|
||||||
|
|
||||||
static int get_ssid_lower_layer(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
static int get_ssid_lower_layer(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
{
|
{
|
||||||
adm_entry_get_linker_param(ctx, "Device.WiFi.Radio.", ((struct wifi_ssid_args *)data)->linker, value);
|
char *device = NULL;
|
||||||
|
|
||||||
|
dmuci_get_value_by_section_string(((struct wifi_ssid_args *)data)->dmmap_s, "device", &device);
|
||||||
|
adm_entry_get_linker_param(ctx, "Device.WiFi.Radio.", device, value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2691,7 +2724,10 @@ static int set_ssid_lower_layer(char *refparam, struct dmctx *ctx, void *data, c
|
||||||
return 0;
|
return 0;
|
||||||
case VALUESET:
|
case VALUESET:
|
||||||
adm_entry_get_linker_value(ctx, value, &linker);
|
adm_entry_get_linker_value(ctx, value, &linker);
|
||||||
dmuci_set_value_by_section((((struct wifi_ssid_args *)data)->sections)->config_section, "device", linker ? linker : "");
|
dmuci_set_value_by_section(((struct wifi_ssid_args *)data)->dmmap_s, "device", linker ? linker : "");
|
||||||
|
|
||||||
|
if (((struct wifi_ssid_args *)data)->config_s)
|
||||||
|
dmuci_set_value_by_section(((struct wifi_ssid_args *)data)->config_s, "device", linker ? linker : "");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -2706,7 +2742,6 @@ static int get_ap_ssid_ref(char *refparam, struct dmctx *ctx, void *data, char *
|
||||||
static int set_ap_ssid_ref(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
static int set_ap_ssid_ref(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||||
{
|
{
|
||||||
char *allowed_objects[] = {"Device.WiFi.SSID.", NULL};
|
char *allowed_objects[] = {"Device.WiFi.SSID.", NULL};
|
||||||
struct uci_section *s = NULL, *ssid_dmmap_s = NULL;
|
|
||||||
char *linker = NULL;
|
char *linker = NULL;
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
@ -2719,36 +2754,30 @@ static int set_ap_ssid_ref(char *refparam, struct dmctx *ctx, void *data, char *
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case VALUESET:
|
case VALUESET:
|
||||||
if ((((struct wifi_acp_args *)data)->ifname)[0] != '\0' || *value == '\0')
|
|
||||||
break;
|
|
||||||
|
|
||||||
adm_entry_get_linker_value(ctx, value, &linker);
|
adm_entry_get_linker_value(ctx, value, &linker);
|
||||||
|
|
||||||
uci_foreach_sections("wireless", "wifi-iface", s) {
|
if (linker) {
|
||||||
struct uci_section *dmmap_section = NULL;
|
struct uci_section *ss = NULL;
|
||||||
char *ifname;
|
char *device = NULL, *ssid = NULL, *enabled = NULL;
|
||||||
|
|
||||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name(s), &dmmap_section);
|
ss = get_dup_section_in_dmmap_opt("dmmap_wireless", "ssid", "ifname", linker);
|
||||||
dmuci_get_value_by_section_string(s, "ifname", &ifname);
|
|
||||||
if (DM_STRCMP(ifname, linker) == 0) {
|
|
||||||
ssid_dmmap_s = dmmap_section;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
dmuci_get_value_by_section_string(dmmap_section, "ifname", &ifname);
|
dmuci_get_value_by_section_string(ss, "device", &device);
|
||||||
if (DM_STRCMP(ifname, linker) == 0) {
|
dmuci_get_value_by_section_string(ss, "ssid", &ssid);
|
||||||
ssid_dmmap_s = dmmap_section;
|
dmuci_get_value_by_section_string(ss, "enabled", &enabled);
|
||||||
break;
|
|
||||||
}
|
bool b = dmuci_string_to_boolean(enabled);
|
||||||
|
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "device", device);
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "ssid", ssid);
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "disabled", b ? "0" : "1");
|
||||||
|
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "ifname", linker);
|
||||||
|
} else {
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "ifname", "");
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "ssid", "");
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "device", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssid_dmmap_s != NULL) {
|
|
||||||
dmuci_set_value_by_section(ssid_dmmap_s, "ap_instance", instance);
|
|
||||||
dmuci_delete_by_section(ssid_dmmap_s, "ssid_added_by_user", NULL);
|
|
||||||
dmuci_delete_by_section((((struct wifi_acp_args *)data)->sections)->config_section, NULL, NULL);
|
|
||||||
dmuci_delete_by_section((((struct wifi_acp_args *)data)->sections)->dmmap_section, NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -3114,6 +3143,46 @@ static int get_access_point_associative_device_statistics_retrans_count(char *re
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*#Device.WiFi.AccessPoint.{i}.Enable!UCI:wireless/wifi-iface,@i-1/disabled*/
|
||||||
|
static int get_access_point_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
|
{
|
||||||
|
dmuci_get_value_by_section_string((((struct wifi_acp_args *)data)->sections)->config_section, "disabled", value);
|
||||||
|
*value = ((*value)[0] == '1') ? "0" : "1";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int set_access_point_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||||
|
{
|
||||||
|
struct uci_section *map_s = NULL;
|
||||||
|
char *multi_ap = NULL;
|
||||||
|
bool b;
|
||||||
|
|
||||||
|
map_s = find_mapcontroller_section((((struct wifi_acp_args *)data)->sections)->config_section);
|
||||||
|
|
||||||
|
switch (action) {
|
||||||
|
case VALUECHECK:
|
||||||
|
if (bbfdm_validate_boolean(ctx, value))
|
||||||
|
return FAULT_9007;
|
||||||
|
|
||||||
|
dmuci_get_value_by_section_string((((struct wifi_acp_args *)data)->sections)->config_section, "multi_ap", &multi_ap);
|
||||||
|
if (DM_STRLEN(multi_ap) && !map_s)
|
||||||
|
return FAULT_9007;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
case VALUESET:
|
||||||
|
string_to_bool(value, &b);
|
||||||
|
|
||||||
|
// wireless config: Update disabled option
|
||||||
|
dmuci_set_value_by_section((((struct wifi_acp_args *)data)->sections)->config_section, "disabled", b ? "0" : "1");
|
||||||
|
|
||||||
|
// mapcontroller config: Update the corresponding ap section if exists
|
||||||
|
if (map_s)
|
||||||
|
dmuci_set_value_by_section(map_s, "enabled", b ? "1" : "0");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*#Device.WiFi.AccessPoint.{i}.Status!UBUS:wifi.ap.@Name/status//status*/
|
/*#Device.WiFi.AccessPoint.{i}.Status!UBUS:wifi.ap.@Name/status//status*/
|
||||||
static int get_wifi_access_point_status(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
static int get_wifi_access_point_status(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||||
|
|
@ -3637,7 +3706,7 @@ DMOBJ tWiFiSSIDObj[] = {
|
||||||
DMLEAF tWiFiSSIDParams[] = {
|
DMLEAF tWiFiSSIDParams[] = {
|
||||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type, version*/
|
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type, version*/
|
||||||
{"Alias", &DMWRITE, DMT_STRING, get_ssid_alias, set_ssid_alias, BBFDM_BOTH, "2.0"},
|
{"Alias", &DMWRITE, DMT_STRING, get_ssid_alias, set_ssid_alias, BBFDM_BOTH, "2.0"},
|
||||||
{"Enable", &DMWRITE, DMT_BOOL, get_wifi_enable, set_wifi_enable, BBFDM_BOTH, "2.0"},
|
{"Enable", &DMWRITE, DMT_BOOL, get_wifi_ssid_enable, set_wifi_ssid_enable, BBFDM_BOTH, "2.0"},
|
||||||
{"Status", &DMREAD, DMT_STRING, get_wifi_status, NULL, BBFDM_BOTH, "2.0"},
|
{"Status", &DMREAD, DMT_STRING, get_wifi_status, NULL, BBFDM_BOTH, "2.0"},
|
||||||
{"SSID", &DMWRITE, DMT_STRING, get_wlan_ssid, set_wlan_ssid, BBFDM_BOTH, "2.0"},
|
{"SSID", &DMWRITE, DMT_STRING, get_wlan_ssid, set_wlan_ssid, BBFDM_BOTH, "2.0"},
|
||||||
{"Name", &DMREAD, DMT_STRING, get_wlan_name, NULL, BBFDM_BOTH, "2.0"},
|
{"Name", &DMREAD, DMT_STRING, get_wlan_name, NULL, BBFDM_BOTH, "2.0"},
|
||||||
|
|
@ -3687,10 +3756,10 @@ DMOBJ tWiFiAccessPointObj[] = {
|
||||||
DMLEAF tWiFiAccessPointParams[] = {
|
DMLEAF tWiFiAccessPointParams[] = {
|
||||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type, version*/
|
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type, version*/
|
||||||
{"Alias", &DMWRITE, DMT_STRING, get_access_point_alias, set_access_point_alias, BBFDM_BOTH, "2.0"},
|
{"Alias", &DMWRITE, DMT_STRING, get_access_point_alias, set_access_point_alias, BBFDM_BOTH, "2.0"},
|
||||||
{"Enable", &DMWRITE, DMT_BOOL, get_wifi_enable, set_wifi_enable, BBFDM_BOTH, "2.0"},
|
{"Enable", &DMWRITE, DMT_BOOL, get_access_point_enable, set_access_point_enable, BBFDM_BOTH, "2.0"},
|
||||||
{"Status", &DMREAD, DMT_STRING, get_wifi_access_point_status, NULL, BBFDM_BOTH, "2.0"},
|
{"Status", &DMREAD, DMT_STRING, get_wifi_access_point_status, NULL, BBFDM_BOTH, "2.0"},
|
||||||
{"SSIDReference", &DMWRITE, DMT_STRING, get_ap_ssid_ref, set_ap_ssid_ref, BBFDM_BOTH, "2.0"},
|
{"SSIDReference", &DMWRITE, DMT_STRING, get_ap_ssid_ref, set_ap_ssid_ref, BBFDM_BOTH, "2.0"},
|
||||||
{"SSIDAdvertisementEnabled", &DMWRITE, DMT_BOOL, get_wlan_ssid_advertisement_enable, set_wlan_ssid_advertisement_enable, BBFDM_BOTH, "2.0"},
|
{"SSIDAdvertisementEnabled", &DMWRITE, DMT_BOOL, get_wlan_ap_advertisement_enable, set_wlan_ap_advertisement_enable, BBFDM_BOTH, "2.0"},
|
||||||
{"WMMEnable", &DMWRITE, DMT_BOOL, get_wmm_enabled, set_wmm_enabled, BBFDM_BOTH, "2.0"},
|
{"WMMEnable", &DMWRITE, DMT_BOOL, get_wmm_enabled, set_wmm_enabled, BBFDM_BOTH, "2.0"},
|
||||||
{"UAPSDEnable", &DMWRITE, DMT_BOOL, get_WiFiAccessPoint_UAPSDEnable, set_WiFiAccessPoint_UAPSDEnable, BBFDM_BOTH, "2.0"},
|
{"UAPSDEnable", &DMWRITE, DMT_BOOL, get_WiFiAccessPoint_UAPSDEnable, set_WiFiAccessPoint_UAPSDEnable, BBFDM_BOTH, "2.0"},
|
||||||
{"AssociatedDeviceNumberOfEntries", &DMREAD, DMT_UNINT, get_access_point_total_associations, NULL, BBFDM_BOTH, "2.0"},
|
{"AssociatedDeviceNumberOfEntries", &DMREAD, DMT_UNINT, get_access_point_total_associations, NULL, BBFDM_BOTH, "2.0"},
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ config wifi-iface 'no_mp_test1'
|
||||||
option device 'test1'
|
option device 'test1'
|
||||||
option network 'lan'
|
option network 'lan'
|
||||||
option mode 'ap'
|
option mode 'ap'
|
||||||
option ifname 'test1'
|
option ifname 'test1_0'
|
||||||
option encryption 'psk2'
|
option encryption 'psk2'
|
||||||
option wps_pushbutton '1'
|
option wps_pushbutton '1'
|
||||||
option ieee80211k '1'
|
option ieee80211k '1'
|
||||||
|
|
@ -23,7 +23,7 @@ config wifi-iface 'default_test1'
|
||||||
option device 'test1'
|
option device 'test1'
|
||||||
option network 'lan'
|
option network 'lan'
|
||||||
option mode 'ap'
|
option mode 'ap'
|
||||||
option ifname 'test1'
|
option ifname 'test1_1'
|
||||||
option ssid 'MAP-44D43771B810-BH-5GHz'
|
option ssid 'MAP-44D43771B810-BH-5GHz'
|
||||||
option encryption 'psk2'
|
option encryption 'psk2'
|
||||||
option wps_pushbutton '1'
|
option wps_pushbutton '1'
|
||||||
|
|
@ -45,7 +45,7 @@ config wifi-iface 'default_test2'
|
||||||
option device 'test2'
|
option device 'test2'
|
||||||
option network 'lan'
|
option network 'lan'
|
||||||
option mode 'ap'
|
option mode 'ap'
|
||||||
option ifname 'test2'
|
option ifname 'test2_0'
|
||||||
option ssid 'iopsysWrt-44D43771B810'
|
option ssid 'iopsysWrt-44D43771B810'
|
||||||
option encryption 'psk2'
|
option encryption 'psk2'
|
||||||
option key 'MPUEO3L7WHJ45P'
|
option key 'MPUEO3L7WHJ45P'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue