developer | 0d67a39 | 2022-07-15 11:55:52 +0800 | [diff] [blame] | 1 | From 3d2602233dc6190f9627fe48beb6ed05b5546783 Mon Sep 17 00:00:00 2001 |
| 2 | From: "howard.hsu" <howard-yh.hsu@mediatek.com> |
| 3 | Date: Tue, 8 Mar 2022 16:33:44 +0800 |
| 4 | Subject: [PATCH 13/18] [patch] HAL: implement wifi_getProxyArp() |
| 5 | |
| 6 | Change-Id: I9e1d04eac09fe7ae1d43600a6c8549feb0ea7858 |
| 7 | --- |
| 8 | source/wifi/wifi_hal.c | 22 ++++++++++++++++++++++ |
| 9 | 1 file changed, 22 insertions(+) |
| 10 | |
| 11 | diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c |
| 12 | index cb5c6109..f10e16ab 100644 |
| 13 | --- a/source/wifi/wifi_hal.c |
| 14 | +++ b/source/wifi/wifi_hal.c |
| 15 | @@ -8957,3 +8957,25 @@ INT wifi_getApAssociatedDevice(INT ap_index, CHAR *output_buf, INT output_buf_si |
| 16 | return RETURN_OK; |
| 17 | } |
| 18 | #endif |
| 19 | + |
| 20 | +INT wifi_getProxyArp(INT apIndex, BOOL *enable) |
| 21 | +{ |
| 22 | + char output[16]={'\0'}; |
| 23 | + char config_file[MAX_BUF_SIZE] = {0}; |
| 24 | + |
| 25 | + if (!enable) |
| 26 | + return RETURN_ERR; |
| 27 | + |
| 28 | + sprintf(config_file, "%s%d.conf", CONFIG_PREFIX, apIndex); |
| 29 | + wifi_hostapdRead(config_file, "proxy_arp", output, sizeof(output)); |
| 30 | + |
| 31 | + if (strlen(output) == 0) |
| 32 | + *enable = FALSE; |
| 33 | + else if (strncmp(output, "1", 1) == 0) |
| 34 | + *enable = TRUE; |
| 35 | + else |
| 36 | + *enable = FALSE; |
| 37 | + |
| 38 | + wifi_dbg_printf("\n[%s]: proxy_arp is : %s", __func__, output); |
| 39 | + return RETURN_OK; |
| 40 | +} |
| 41 | -- |
| 42 | 2.29.2 |
| 43 | |