diff --git a/wifimngr.c b/wifimngr.c index 887e9ac59984594edfd083c5192c853eff451c1f..94259214b1edf2ec3d3f7f6f466de02c9f919837 100644 --- a/wifimngr.c +++ b/wifimngr.c @@ -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);