developer | b49b430 | 2022-04-25 14:01:57 +0800 | [diff] [blame] | 1 | From db41fa4fb08c4d6e7f7d89f3283b875a89408763 Mon Sep 17 00:00:00 2001 |
| 2 | From: Allen Ye <allen.ye@mediatek.com> |
| 3 | Date: Tue, 12 Apr 2022 10:36:58 +0800 |
| 4 | Subject: [PATCH] HAL: add wifi_getApAssociatedDevice() |
| 5 | |
| 6 | --- |
| 7 | source/wifi/wifi_hal.c | 6 +++++- |
| 8 | 1 file changed, 5 insertions(+), 1 deletion(-) |
| 9 | |
| 10 | diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c |
| 11 | index f6c2aa2..19a6281 100644 |
| 12 | --- a/source/wifi/wifi_hal.c |
| 13 | +++ b/source/wifi/wifi_hal.c |
| 14 | @@ -9607,7 +9607,11 @@ INT wifi_getApAssociatedDevice(INT ap_index, mac_address_t *output_deviceMacAddr |
| 15 | #else |
| 16 | INT wifi_getApAssociatedDevice(INT ap_index, CHAR *output_buf, INT output_buf_size) |
| 17 | { |
| 18 | - return RETURN_OK; |
| 19 | + char cmd[128]; |
| 20 | + |
| 21 | + sprintf(cmd, "hostapd_cli -i %s%d list_sta | tr -d \"\\n\"", AP_PREFIX, ap_index); |
| 22 | + _syscmd(cmd, output_buf, output_buf_size); |
| 23 | + return RETURN_OK; |
| 24 | } |
| 25 | #endif |
| 26 | |
| 27 | -- |
| 28 | 2.18.0 |
| 29 | |