diff --git a/docs/api/wifi.ap.md b/docs/api/wifi.ap.md index fa81140df9ceb0fc557935557e0d8bb6b3c97564..15c81ba81b9a3d2dd4ede8f17667c75632fd8a5d 100644 --- a/docs/api/wifi.ap.md +++ b/docs/api/wifi.ap.md @@ -2188,6 +2188,14 @@ All items must be of the type: `integer` | `tx_pkts_retries` | integer | **Required** | | `tx_total_bytes` | integer | **Required** | | `tx_total_pkts` | integer | **Required** | +| `tx_ucast_pkts` | integer | **Required** | +| `tx_ucast_bytes` | integer | **Required** | +| `tx_mcast_pkts` | integer | **Required** | +| `tx_mcast_bytes` | integer | **Required** | +| `rx_ucast_pkts` | integer | **Required** | +| `rx_ucast_bytes` | integer | **Required** | +| `rx_mcast_pkts` | integer | **Required** | +| `rx_mcast_bytes` | integer | **Required** | #### rate_of_last_rx_pkt @@ -2306,6 +2314,110 @@ All items must be of the type: `integer` - minimum value: `0` +#### tx_ucast_pkts + +`tx_ucast_pkts` + +- is **required** +- type: reference + +##### tx_ucast_pkts Type + +`integer` + +- minimum value: `0` + +#### tx_ucast_bytes + +`tx_ucast_bytes` + +- is **required** +- type: reference + +##### tx_ucast_bytes Type + +`integer` + +- minimum value: `0` + +#### tx_mcast_pkts + +`tx_mcast_pkts` + +- is **required** +- type: reference + +##### tx_mcast_pkts Type + +`integer` + +- minimum value: `0` + +#### tx_mcast_bytes + +`tx_mcast_bytes` + +- is **required** +- type: reference + +##### tx_mcast_bytes Type + +`integer` + +- minimum value: `0` + +#### rx_ucast_pkts + +`rx_ucast_pkts` + +- is **required** +- type: reference + +##### rx_ucast_pkts Type + +`integer` + +- minimum value: `0` + +#### rx_ucast_bytes + +`rx_ucast_bytes` + +- is **required** +- type: reference + +##### rx_ucast_bytes Type + +`integer` + +- minimum value: `0` + +#### rx_mcast_pkts + +`rx_mcast_pkts` + +- is **required** +- type: reference + +##### rx_mcast_pkts Type + +`integer` + +- minimum value: `0` + +#### rx_mcast_bytes + +`rx_mcast_bytes` + +- is **required** +- type: reference + +##### rx_mcast_bytes Type + +`integer` + +- minimum value: `0` + #### status `status` diff --git a/schemas/ubus/wifi.ap.json b/schemas/ubus/wifi.ap.json index 19b960d520ae0de201a135234f3d16e846e81f51..8f039435f4ec359c399b5e37bb0e1bf43b7980d5 100644 --- a/schemas/ubus/wifi.ap.json +++ b/schemas/ubus/wifi.ap.json @@ -1172,9 +1172,17 @@ "tx_total_bytes", "tx_failures", "tx_pkts_retries", + "tx_ucast_pkts", + "tx_ucast_bytes", + "tx_mcast_pkts", + "tx_mcast_bytes", "rx_data_pkts", "rx_data_bytes", "rx_failures", + "rx_ucast_pkts", + "rx_ucast_bytes", + "rx_mcast_pkts", + "rx_mcast_bytes", "tx_rate_latest", "rx_rate_latest" ], @@ -1191,6 +1199,18 @@ "tx_pkts_retries": { "$ref": "#/definitions/rxtx_t" }, + "tx_ucast_pkts": { + "$ref": "#/definitions/rxtx_t" + }, + "tx_ucast_bytes": { + "$ref": "#/definitions/rxtx_t" + }, + "tx_mcast_pkts": { + "$ref": "#/definitions/rxtx_t" + }, + "tx_mcast_bytes": { + "$ref": "#/definitions/rxtx_t" + }, "rx_data_pkts": { "$ref": "#/definitions/rxtx_t" }, @@ -1200,6 +1220,18 @@ "rx_failures": { "$ref": "#/definitions/rxtx_t" }, + "rx_ucast_pkts": { + "$ref": "#/definitions/rxtx_t" + }, + "rx_ucast_bytes": { + "$ref": "#/definitions/rxtx_t" + }, + "rx_mcast_pkts": { + "$ref": "#/definitions/rxtx_t" + }, + "rx_mcast_bytes": { + "$ref": "#/definitions/rxtx_t" + }, "tx_rate_latest": { "$ref": "#/definitions/rxtx_latest_t" }, diff --git a/wifimngr.c b/wifimngr.c index 6d84bdf6a21757911ef9ed4d116f7148d783a2e0..e04f64285dda594fb779921aa952b145ab47b6ea 100644 --- a/wifimngr.c +++ b/wifimngr.c @@ -907,9 +907,21 @@ static void wl_print_sta_stats(struct blob_buf *bb, struct wifi_sta_stats *stats blobmsg_add_u64(bb, "tx_total_bytes", stats->tx_bytes); blobmsg_add_u64(bb, "tx_failures", stats->tx_fail_pkts); blobmsg_add_u64(bb, "tx_pkts_retries", stats->tx_retry_pkts); + + blobmsg_add_u64(bb, "tx_ucast_pkts", stats->tx_ucast_pkts); + blobmsg_add_u64(bb, "tx_ucast_bytes", stats->tx_ucast_bytes); + blobmsg_add_u64(bb, "tx_mcast_pkts", stats->tx_mcast_pkts); + blobmsg_add_u64(bb, "tx_mcast_bytes", stats->tx_mcast_bytes); + blobmsg_add_u64(bb, "rx_data_pkts", stats->rx_pkts); blobmsg_add_u64(bb, "rx_data_bytes", stats->rx_bytes); blobmsg_add_u64(bb, "rx_failures", stats->rx_fail_pkts); + + blobmsg_add_u64(bb, "rx_ucast_pkts", stats->rx_ucast_pkts); + blobmsg_add_u64(bb, "rx_ucast_bytes", stats->rx_ucast_bytes); + blobmsg_add_u64(bb, "rx_mcast_pkts", stats->rx_mcast_pkts); + blobmsg_add_u64(bb, "rx_mcast_bytes", stats->rx_mcast_bytes); + blobmsg_close_table(bb, t); }