--- a/interfaces/opensync.ovsschema +++ b/interfaces/opensync.ovsschema @@ -2107,6 +2107,14 @@ "type": "string" } } + }, + "custom_options": { + "type": { + "key": "string", + "value": "string", + "min": 0, + "max": "unlimited" + } } }, "isRoot": true, @@ -2466,6 +2474,14 @@ "type": "string" } } + }, + "custom_options": { + "type": { + "key": "string", + "value": "string", + "min": 0, + "max": "unlimited" + } } }, "isRoot": true, --- a/src/lib/schema/inc/schema_consts.h +++ b/src/lib/schema/inc/schema_consts.h @@ -142,5 +142,14 @@ typedef enum { #define SCHEMA_CONSTS_INET_DHCP_LEASE_TIME "lease_time" #define SCHEMA_CONSTS_INET_DHCP_FORCE "force" +/* Custom options */ +#define SCHEMA_CONSTS_RATE_LIMIT "rate_limit_en" +#define SCHEMA_CONSTS_RATE_DL "ssid_dl_limit" +#define SCHEMA_CONSTS_RATE_UL "ssid_ul_limit" +#define SCHEMA_CONSTS_CLIENT_RATE_DL "client_dl_limit" +#define SCHEMA_CONSTS_CLIENT_RATE_UL "client_ul_limit" +#define SCHEMA_CONSTS_RTS_THRESHOLD "rts_threshold" +#define SCHEMA_CONSTS_FRAG_THRESHOLD "frag_threshold" +#define SCHEMA_CONSTS_DTIM_PERIOD "dtim_period" #endif /* SCHEMA_CONSTS_H_INCLUDED */ --- a/src/wm2/src/wm2_radio1.c +++ b/src/wm2/src/wm2_radio1.c @@ -934,6 +934,23 @@ wm2_vif_equal( } } + if (ovsdb_update_changed(mon, SCHEMA_COLUMN(Wifi_VIF_Config, custom_options))) { + if (vconf->custom_options_len == vstate.custom_options_len) { + for (index = 0; index < vconf->custom_options_len; index++) { + VIF_EQUAL(SCHEMA_FIELD_CMP_MAP_STR(vconf, &vstate, custom_options, index)); + } + } else { + is_equal = false; + } + if (!is_equal) { + for (index = 0; index < vconf->custom_options_len; index++) { + strcpy(vconf_set->custom_options[index], vconf->custom_options[index]); + strcpy(vconf_set->custom_options_keys[index], vconf->custom_options_keys[index]); + } + vconf_set->custom_options_len = vconf->custom_options_len; + } + } + #undef VIF_EQUAL return is_equal; --- a/src/wm2/src/wm2_radio.c +++ b/src/wm2/src/wm2_radio.c @@ -554,6 +554,7 @@ wm2_vconf_changed(const struct schema_Wi CMP(CHANGED_INT, wps); CMP(CHANGED_INT, wps_pbc); CMP(CHANGED_STR, wps_pbc_key_id); + CMP(CHANGED_MAP_STRSTR, custom_options); if (changed) LOGD("%s: changed (forced=%d)", conf->if_name, changedf->_uuid);