1 /** @file wifi_nxp.h 2 * 3 * @brief This file provides Core Wi-Fi definition for wpa supplicant RTOS driver. 4 * 5 * Copyright 2008-2024 NXP 6 * 7 * SPDX-License-Identifier: BSD-3-Clause 8 * 9 */ 10 11 #ifndef __WIFI_NXP_H__ 12 #define __WIFI_NXP_H__ 13 14 #include <stdio.h> 15 #include <wm_net.h> 16 #if CONFIG_WPA_SUPP 17 #include <drivers/driver_zephyr.h> 18 19 typedef struct zep_wpa_supp_dev_callbk_fns rtos_wpa_supp_dev_callbk_fns; 20 21 #if CONFIG_WPA_SUPP_AP 22 typedef struct zep_hostapd_dev_callbk_fns rtos_hostapd_dev_callbk_fns; 23 #endif 24 25 typedef struct zep_wpa_supp_dev_ops rtos_wpa_supp_dev_ops; 26 27 struct wifi_nxp_ctx_rtos 28 { 29 const struct netif *iface_ctx; 30 void *supp_drv_if_ctx; 31 32 void *hapd_drv_if_ctx; 33 unsigned int bss_type; 34 35 bool scan_in_progress; 36 uint64_t scan_start_tsf; 37 uint8_t scan_start_tsf_bssid[ETH_ALEN]; 38 39 unsigned int assoc_freq; 40 uint8_t attempt_bssid[ETH_ALEN]; 41 uint8_t assoc_bssid[ETH_ALEN]; 42 bool associated; 43 bool uap_started; 44 bool hostapd; 45 rtos_wpa_supp_dev_callbk_fns supp_callbk_fns; 46 bool supp_called_remain_on_chan; 47 unsigned int remain_on_channel_freq; 48 unsigned int remain_on_channel_duration; 49 bool remain_on_chan_is_canceled; 50 #if CONFIG_WPA_SUPP_AP 51 rtos_hostapd_dev_callbk_fns hostapd_callbk_fns; 52 #endif 53 int mgmt_tx_status; 54 uint8_t *last_mgmt_tx_data; 55 size_t last_mgmt_tx_data_len; 56 bool ft_roaming; 57 struct wpa_driver_set_key_params *key_params; 58 }; 59 60 int wifi_supp_init(void); 61 void wifi_supp_deinit(void); 62 int monitor_start(void); 63 void monitor_stop(void); 64 void wifi_scan_start(struct wifi_message *msg); 65 void wifi_scan_done(struct wifi_message *msg); 66 void wifi_process_remain_on_channel(struct wifi_message *msg); 67 void wifi_process_mgmt_tx_status(struct wifi_message *msg); 68 void wifi_scan_result_get(struct wifi_message *msg); 69 void wifi_survey_result_get(struct wifi_message *msg); 70 71 #endif /* CONFIG_WPA_SUPP */ 72 73 #endif /* __WIFI_NXP_H__ */ 74