blob: cc307c414c7cf4668f0a4bbf2789dc68ea2e6fec [file] [log] [blame]
developerb49b4302022-04-25 14:01:57 +08001From db41fa4fb08c4d6e7f7d89f3283b875a89408763 Mon Sep 17 00:00:00 2001
2From: Allen Ye <allen.ye@mediatek.com>
3Date: Tue, 12 Apr 2022 10:36:58 +0800
4Subject: [PATCH] HAL: add wifi_getApAssociatedDevice()
5
6---
7 source/wifi/wifi_hal.c | 6 +++++-
8 1 file changed, 5 insertions(+), 1 deletion(-)
9
10diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c
11index 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--
282.18.0
29