fixed vlan config + 5Ghz Radio (#2)

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-07-11 19:57:01 +01:00
parent a3bad0344d
commit 59e5ac91c1
5 changed files with 200 additions and 32 deletions
+5 -2
View File
@@ -359,11 +359,13 @@ static struct json_object *build_vap_table(const uf_model_t *m)
const char *vap_name = "";
const char *radio = "ng";
const char *bssid = "00:00:00:00:00:00";
const char *vap_id = NULL;
if (json_object_object_get_ex(vap, "essid", &v)) essid = json_object_get_string(v);
if (json_object_object_get_ex(vap, "name", &v)) vap_name = json_object_get_string(v);
if (json_object_object_get_ex(vap, "radio", &v)) radio = json_object_get_string(v);
if (json_object_object_get_ex(vap, "bssid", &v)) bssid = json_object_get_string(v);
if (json_object_object_get_ex(vap, "id", &v)) vap_id = json_object_get_string(v);
/* Mapear banda → interfaz wlan y canal actual */
char wlan_iface[32] = "wlan0";
@@ -430,8 +432,9 @@ static struct json_object *build_vap_table(const uf_model_t *m)
json_object_new_int64(iface_st.rx_dropped));
json_object_object_add(o, "tx_dropped",
json_object_new_int64(iface_st.tx_dropped));
json_object_object_add(o, "id",
json_object_new_string("user"));
/* Only controller-issued ObjectIds are valid in this field. */
if (vap_id)
json_object_object_add(o, "id", json_object_new_string(vap_id));
json_object_object_add(o, "usage",
json_object_new_string("user"));
json_object_object_add(o, "ccq",