Lines Matching refs:header
43 ssid_len, wifi_security_txt(creds.header.type)); in print_network_info()
45 if (creds.header.type == WIFI_SECURITY_TYPE_PSK || in print_network_info()
46 creds.header.type == WIFI_SECURITY_TYPE_PSK_SHA256 || in print_network_info()
47 creds.header.type == WIFI_SECURITY_TYPE_SAE || in print_network_info()
48 creds.header.type == WIFI_SECURITY_TYPE_WPA_PSK) { in print_network_info()
54 if (creds.header.flags & WIFI_CREDENTIALS_FLAG_BSSID) { in print_network_info()
56 creds.header.bssid[0], creds.header.bssid[1], creds.header.bssid[2], in print_network_info()
57 creds.header.bssid[3], creds.header.bssid[4], creds.header.bssid[5]); in print_network_info()
60 if (creds.header.flags & WIFI_CREDENTIALS_FLAG_2_4GHz) { in print_network_info()
64 if (creds.header.flags & WIFI_CREDENTIALS_FLAG_5GHz) { in print_network_info()
68 if (creds.header.channel) { in print_network_info()
69 shell_fprintf(sh, SHELL_VT100_COLOR_DEFAULT, ", channel: %d", creds.header.channel); in print_network_info()
72 if (creds.header.flags & WIFI_CREDENTIALS_FLAG_FAVORITE) { in print_network_info()
76 if (creds.header.flags & WIFI_CREDENTIALS_FLAG_MFP_REQUIRED) { in print_network_info()
78 } else if (creds.header.flags & WIFI_CREDENTIALS_FLAG_MFP_DISABLED) { in print_network_info()
84 if (creds.header.timeout) { in print_network_info()
85 shell_fprintf(sh, SHELL_VT100_COLOR_DEFAULT, ", timeout: %d", creds.header.timeout); in print_network_info()
147 .header.ssid_len = strlen(argv[1]), in cmd_add_network()
148 .header.type = parse_sec_type(argv[2]), in cmd_add_network()
151 memcpy(creds.header.ssid, argv[1], creds.header.ssid_len); in cmd_add_network()
153 if (creds.header.type == WIFI_SECURITY_TYPE_UNKNOWN) { in cmd_add_network()
160 if (creds.header.type == WIFI_SECURITY_TYPE_PSK || in cmd_add_network()
161 creds.header.type == WIFI_SECURITY_TYPE_PSK_SHA256 || in cmd_add_network()
162 creds.header.type == WIFI_SECURITY_TYPE_SAE || in cmd_add_network()
163 creds.header.type == WIFI_SECURITY_TYPE_WPA_PSK) { in cmd_add_network()
176 creds.header.type == WIFI_SECURITY_TYPE_SAE) || in cmd_add_network()
178 creds.header.type != WIFI_SECURITY_TYPE_SAE)) { in cmd_add_network()
188 ret = sscanf(argv[arg_idx], MACSTR, &creds.header.bssid[0], &creds.header.bssid[1], in cmd_add_network()
189 &creds.header.bssid[2], &creds.header.bssid[3], &creds.header.bssid[4], in cmd_add_network()
190 &creds.header.bssid[5]); in cmd_add_network()
192 creds.header.flags |= WIFI_CREDENTIALS_FLAG_BSSID; in cmd_add_network()
202 creds.header.flags |= WIFI_CREDENTIALS_FLAG_2_4GHz; in cmd_add_network()
206 creds.header.flags |= WIFI_CREDENTIALS_FLAG_5GHz; in cmd_add_network()
215 creds.header.channel = strtol(argv[arg_idx], &end, 10); in cmd_add_network()
224 creds.header.flags |= WIFI_CREDENTIALS_FLAG_FAVORITE; in cmd_add_network()
232 creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_DISABLED; in cmd_add_network()
235 creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_REQUIRED; in cmd_add_network()
244 creds.header.timeout = strtol(argv[arg_idx], &end, 10); in cmd_add_network()