mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
ubus: fix wrong parsing policy
This commit is contained in:
parent
2151db28ef
commit
534f786616
1 changed files with 6 additions and 6 deletions
|
@ -213,7 +213,6 @@ enum {
|
||||||
CLIENT_TABLE_BANDWIDTH,
|
CLIENT_TABLE_BANDWIDTH,
|
||||||
CLIENT_TABLE_WEIGHT,
|
CLIENT_TABLE_WEIGHT,
|
||||||
CLIENT_TABLE_NEIGHBOR,
|
CLIENT_TABLE_NEIGHBOR,
|
||||||
CLIENT_TABLE_RRM,
|
|
||||||
__CLIENT_TABLE_MAX,
|
__CLIENT_TABLE_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -230,7 +229,6 @@ static const struct blobmsg_policy client_table_policy[__CLIENT_TABLE_MAX] = {
|
||||||
[CLIENT_TABLE_BANDWIDTH] = {.name = "bandwidth", .type = BLOBMSG_TYPE_INT32},
|
[CLIENT_TABLE_BANDWIDTH] = {.name = "bandwidth", .type = BLOBMSG_TYPE_INT32},
|
||||||
[CLIENT_TABLE_WEIGHT] = {.name = "ap_weight", .type = BLOBMSG_TYPE_INT32},
|
[CLIENT_TABLE_WEIGHT] = {.name = "ap_weight", .type = BLOBMSG_TYPE_INT32},
|
||||||
[CLIENT_TABLE_NEIGHBOR] = {.name = "neighbor_report", .type = BLOBMSG_TYPE_STRING},
|
[CLIENT_TABLE_NEIGHBOR] = {.name = "neighbor_report", .type = BLOBMSG_TYPE_STRING},
|
||||||
[CLIENT_TABLE_RRM] = {.name = "rrm", .type = BLOBMSG_TYPE_ARRAY},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -246,6 +244,7 @@ enum {
|
||||||
CLIENT_WPS,
|
CLIENT_WPS,
|
||||||
CLIENT_MFP,
|
CLIENT_MFP,
|
||||||
CLIENT_AID,
|
CLIENT_AID,
|
||||||
|
CLIENT_RRM,
|
||||||
__CLIENT_MAX,
|
__CLIENT_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -262,6 +261,7 @@ static const struct blobmsg_policy client_policy[__CLIENT_MAX] = {
|
||||||
[CLIENT_WPS] = {.name = "wps", .type = BLOBMSG_TYPE_INT8},
|
[CLIENT_WPS] = {.name = "wps", .type = BLOBMSG_TYPE_INT8},
|
||||||
[CLIENT_MFP] = {.name = "mfp", .type = BLOBMSG_TYPE_INT8},
|
[CLIENT_MFP] = {.name = "mfp", .type = BLOBMSG_TYPE_INT8},
|
||||||
[CLIENT_AID] = {.name = "aid", .type = BLOBMSG_TYPE_INT32},
|
[CLIENT_AID] = {.name = "aid", .type = BLOBMSG_TYPE_INT32},
|
||||||
|
[CLIENT_RRM] = {.name = "rrm", .type = BLOBMSG_TYPE_ARRAY},
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -938,9 +938,9 @@ dump_client(struct blob_attr **tb, uint8_t client_addr[], const char *bssid_addr
|
||||||
client_entry.aid = blobmsg_get_u32(tb[CLIENT_AID]);
|
client_entry.aid = blobmsg_get_u32(tb[CLIENT_AID]);
|
||||||
}
|
}
|
||||||
/* RRM Caps */
|
/* RRM Caps */
|
||||||
if (tb[CLIENT_TABLE_RRM]) {
|
if (tb[CLIENT_RRM]) {
|
||||||
client_entry.rrm_enabled_capa = dump_rrm_table(blobmsg_data(tb[CLIENT_TABLE_RRM]),
|
client_entry.rrm_enabled_capa = dump_rrm_table(blobmsg_data(tb[CLIENT_RRM]),
|
||||||
blobmsg_data_len(tb[CLIENT_TABLE_RRM]));// get the first byte from rrm array
|
blobmsg_data_len(tb[CLIENT_RRM]));// get the first byte from rrm array
|
||||||
//ap_entry.ap_weight = blobmsg_get_u32(tb[CLIENT_TABLE_RRM]);
|
//ap_entry.ap_weight = blobmsg_get_u32(tb[CLIENT_TABLE_RRM]);
|
||||||
} else {
|
} else {
|
||||||
client_entry.rrm_enabled_capa = 0;
|
client_entry.rrm_enabled_capa = 0;
|
||||||
|
@ -953,7 +953,7 @@ dump_client(struct blob_attr **tb, uint8_t client_addr[], const char *bssid_addr
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
memset(client_entry.signature, 0, 1024);
|
memset(client_entry.signature, 0, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_client_to_array(client_entry);
|
insert_client_to_array(client_entry);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue