diff options
Diffstat (limited to 'components/drivers/wlan/dev_wlan.c')
| -rw-r--r-- | components/drivers/wlan/dev_wlan.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/components/drivers/wlan/dev_wlan.c b/components/drivers/wlan/dev_wlan.c index ff5b0fb391..a3ed0347a9 100644 --- a/components/drivers/wlan/dev_wlan.c +++ b/components/drivers/wlan/dev_wlan.c @@ -7,6 +7,7 @@ * Date Author Notes * 2018-08-03 tyx the first version * 2024-12-25 Evlers add get_info api for more new sta information + * 2025-01-04 Evlers add ap_get_info api for more ap information */ #include <rthw.h> @@ -269,6 +270,25 @@ rt_err_t rt_wlan_dev_get_info(struct rt_wlan_device *device, struct rt_wlan_info return result; } +rt_err_t rt_wlan_dev_ap_get_info(struct rt_wlan_device *device, struct rt_wlan_info *info) +{ + rt_err_t result = RT_EOK; + + if (device == RT_NULL) + { + return -RT_EIO; + } + + result = rt_device_control(RT_DEVICE(device), RT_WLAN_CMD_AP_GET_INFO, info); + if (result != RT_EOK) + { + rt_set_errno(result); + return 0; + } + + return result; +} + rt_err_t rt_wlan_dev_get_mac(struct rt_wlan_device *device, rt_uint8_t mac[6]) { rt_err_t result = RT_EOK; @@ -815,6 +835,15 @@ static rt_err_t _rt_wlan_dev_control(rt_device_t dev, int cmd, void *args) err = -RT_ERROR; break; } + case RT_WLAN_CMD_AP_GET_INFO: + { + struct rt_wlan_info *info = args; + + LOG_D("%s %d cmd[%d]:%s run......", __FUNCTION__, __LINE__, RT_WLAN_CMD_AP_GET_INFO, "RT_WLAN_CMD_AP_GET_INFO"); + if (wlan->ops->wlan_ap_get_info) + err = wlan->ops->wlan_ap_get_info(wlan, info); + break; + } case RT_WLAN_CMD_SET_POWERSAVE: { int level = *((int *)args); |
