@@ -18,15 +18,72 @@ LOG_MODULE_REGISTER(net_wifi_mgmt, CONFIG_NET_L2_WIFI_MGMT_LOG_LEVEL);
1818#include <zephyr/net/wifi_nm.h>
1919#endif /* CONFIG_WIFI_NM */
2020
21+ #ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
22+ #define MAX_NEIGHBOR_AP_LIMIT 6U
23+ #define MAX_EVENT_STR_LEN 32
24+
25+ struct wifi_rrm_neighbor_ap_t {
26+ char ssid [WIFI_SSID_MAX_LEN + 1 ];
27+ uint8_t bssid [WIFI_SSID_MAX_LEN ];
28+ uint8_t bssid_info [WIFI_SSID_MAX_LEN ];
29+ int op_class ;
30+ int channel ;
31+ int phy_type ;
32+ };
33+
34+ struct wifi_rrm_neighbor_report_t {
35+ struct wifi_rrm_neighbor_ap_t neighbor_ap [MAX_NEIGHBOR_AP_LIMIT ];
36+ int neighbor_cnt ;
37+ };
38+
39+ struct wifi_roaming_params {
40+ bool is_11r_used ;
41+ bool is_11k_enabled ;
42+ struct wifi_rrm_neighbor_report_t neighbor_rep ;
43+ };
44+
45+ static struct wifi_roaming_params roaming_params ;
46+ #endif
47+
48+ const bool is_enterprise_security (enum wifi_security_type security )
49+ {
50+ switch (security ) {
51+ case WIFI_SECURITY_TYPE_EAP_TLS :
52+ case WIFI_SECURITY_TYPE_EAP_TLS_SHA256 :
53+ case WIFI_SECURITY_TYPE_EAP_PEAP_MSCHAPV2 :
54+ case WIFI_SECURITY_TYPE_EAP_PEAP_GTC :
55+ case WIFI_SECURITY_TYPE_EAP_TTLS_MSCHAPV2 :
56+ case WIFI_SECURITY_TYPE_EAP_PEAP_TLS :
57+ return true;
58+ default :
59+ return false;
60+ }
61+ }
62+
63+ const char * wifi_suiteb_txt (enum wifi_cipher_suite_b suiteb )
64+ {
65+ switch (suiteb ) {
66+ case WIFI_CIPHER_SUITE_B_NA :
67+ return "Not Applicable" ;
68+ case WIFI_CIPHER_SUITE_B_NONE :
69+ return "Not Enabled" ;
70+ case WIFI_CIPHER_SUITE_B :
71+ return "SUITE-B" ;
72+ case WIFI_CIPHER_SUITE_B_192 :
73+ return "SUITE-B-192" ;
74+ default :
75+ return "UNKNOWN" ;
76+ }
77+ }
2178const char * wifi_security_txt (enum wifi_security_type security )
2279{
80+ if (is_enterprise_security (security )) {
81+ return "IEEE_8021_x" ;
82+ }
83+
2384 switch (security ) {
2485 case WIFI_SECURITY_TYPE_NONE :
2586 return "OPEN" ;
26- case WIFI_SECURITY_TYPE_WEP :
27- return "WEP" ;
28- case WIFI_SECURITY_TYPE_WPA_PSK :
29- return "WPA-PSK" ;
3087 case WIFI_SECURITY_TYPE_PSK :
3188 return "WPA2-PSK" ;
3289 case WIFI_SECURITY_TYPE_PSK_SHA256 :
@@ -39,10 +96,22 @@ const char *wifi_security_txt(enum wifi_security_type security)
3996 return "WPA3-SAE-AUTO" ;
4097 case WIFI_SECURITY_TYPE_WAPI :
4198 return "WAPI" ;
42- case WIFI_SECURITY_TYPE_EAP_TLS :
43- return "EAP" ;
99+ case WIFI_SECURITY_TYPE_WEP :
100+ return "WEP" ;
101+ case WIFI_SECURITY_TYPE_WPA_PSK :
102+ return "WPA-PSK" ;
44103 case WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL :
45104 return "WPA/WPA2/WPA3 PSK" ;
105+ case WIFI_SECURITY_TYPE_DPP :
106+ return "DPP" ;
107+ case WIFI_SECURITY_TYPE_FT_PSK :
108+ return "FT-PSK" ;
109+ case WIFI_SECURITY_TYPE_FT_SAE :
110+ return "FT-SAE" ;
111+ case WIFI_SECURITY_TYPE_FT_EAP :
112+ return "FT-EAP" ;
113+ case WIFI_SECURITY_TYPE_FT_EAP_SHA384 :
114+ return "FT-EAP-SHA384" ;
46115 case WIFI_SECURITY_TYPE_UNKNOWN :
47116 default :
48117 return "UNKNOWN" ;
0 commit comments