1 /** 2 * Copyright 2023-2024 NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef __HAPD_API_H_ 8 #define __HAPD_API_H_ 9 10 #ifdef CONFIG_WIFI_NM_HOSTAPD_CRYPTO_ENTERPRISE 11 int hostapd_add_enterprise_creds(const struct device *dev, 12 struct wifi_enterprise_creds_params *creds); 13 #endif 14 15 /** 16 * @brief Wi-Fi AP configuration parameter. 17 * 18 * @param dev Wi-Fi device 19 * @param params AP parameters 20 * @return 0 for OK; -1 for ERROR 21 */ 22 int hostapd_ap_config_params(const struct device *dev, struct wifi_ap_config_params *params); 23 24 /** 25 * @brief Set Wi-Fi AP region domain 26 * 27 * @param reg_domain region domain parameters 28 * @return true for OK; false for ERROR 29 */ 30 bool hostapd_ap_reg_domain(struct wifi_reg_domain *reg_domain); 31 32 #ifdef CONFIG_WIFI_NM_HOSTAPD_WPS 33 /** Start AP WPS PBC/PIN 34 * 35 * @param dev Pointer to the device structure for the driver instance 36 * @param params wps operarion parameters 37 * 38 * @return 0 if ok, < 0 if error 39 */ 40 int hostapd_ap_wps_config(const struct device *dev, struct wifi_wps_config_params *params); 41 #endif 42 43 /** 44 * @brief Get Wi-Fi SAP status 45 * 46 * @param dev Wi-Fi device 47 * @param status SAP status 48 * @return 0 for OK; -1 for ERROR 49 */ 50 int hostapd_ap_status(const struct device *dev, struct wifi_iface_status *status); 51 52 /** 53 * @brief Set Wi-Fi AP configuration 54 * 55 * @param dev Wi-Fi interface name to use 56 * @param params AP configuration parameters to set 57 * @return 0 for OK; -1 for ERROR 58 */ 59 int hostapd_ap_enable(const struct device *dev, 60 struct wifi_connect_req_params *params); 61 62 /** 63 * @brief Disable Wi-Fi AP 64 * @param dev Wi-Fi interface name to use 65 * @return 0 for OK; -1 for ERROR 66 */ 67 int hostapd_ap_disable(const struct device *dev); 68 69 /** 70 * @brief Set Wi-Fi AP STA disconnect 71 * @param dev Wi-Fi interface name to use 72 * @param mac_addr MAC address of the station to disconnect 73 * @return 0 for OK; -1 for ERROR 74 */ 75 int hostapd_ap_sta_disconnect(const struct device *dev, 76 const uint8_t *mac_addr); 77 78 #ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP 79 #ifdef CONFIG_WIFI_NM_HOSTAPD_AP 80 /** 81 * @brief Dispatch DPP operations for AP 82 * 83 * @param dev Wi-Fi interface name to use 84 * @param dpp_params DPP action enum and params in string 85 * @return 0 for OK; -1 for ERROR 86 */ 87 int hostapd_dpp_dispatch(const struct device *dev, struct wifi_dpp_params *params); 88 #endif /* CONFIG_WIFI_NM_HOSTAPD_AP */ 89 #endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */ 90 91 #endif /* __HAPD_API_H_ */ 92