Skip to content
Snippets Groups Projects
Commit b3d33786 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

add rx/tx bytes to status output

parent 9cd787de
Branches
Tags
No related merge requests found
......@@ -230,6 +230,7 @@ static int wl_status(struct ubus_context *ctx, struct ubus_object *obj,
char cpr_buf[32] = {0};
struct bss b;
struct blob_buf bb;
struct wifi_ap_stats ap_stats;
memset(&bb, 0, sizeof(bb));
blobmsg_parse(wl_vif_policy, __WL_MAX, tb, blob_data(msg), blob_len(msg));
......@@ -283,6 +284,12 @@ static int wl_status(struct ubus_context *ctx, struct ubus_object *obj,
blobmsg_add_u32(&bb, "bssload", b.load.utilization);
}
memset(&ap_stats, 0, sizeof(struct wifi_ap_stats));
wifi_get_ap_stats(wldev, &ap_stats);
blobmsg_add_u32(&bb, "rx_bytes", ap_stats.rx_bytes);
blobmsg_add_u32(&bb, "tx_bytes", ap_stats.tx_bytes);
ubus_send_reply(ctx, req, bb.head);
blob_buf_free(&bb);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment