OCV: OCI channel override support for testing (STA)
Add override parameters to use the specified channel while populating OCI element in EAPOL-Key group msg 2/2, FT reassoc request, FILS assoc request and WNM sleep request frames. Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
This commit is contained in:
parent
d309dd52b0
commit
b28b9dfcbf
8 changed files with 78 additions and 0 deletions
|
@ -2039,6 +2039,15 @@ static int wpa_supplicant_send_2_of_2(struct wpa_sm *sm,
|
|||
os_free(rbuf);
|
||||
return -1;
|
||||
}
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (sm->oci_freq_override_eapol_g2) {
|
||||
wpa_printf(MSG_INFO,
|
||||
"TEST: Override OCI KDE frequency %d -> %d MHz",
|
||||
ci.frequency,
|
||||
sm->oci_freq_override_eapol_g2);
|
||||
ci.frequency = sm->oci_freq_override_eapol_g2;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
pos = key_mic + mic_len + 2; /* Key Data */
|
||||
if (ocv_insert_oci_kde(&ci, &pos) < 0) {
|
||||
|
@ -3308,6 +3317,15 @@ int wpa_sm_set_param(struct wpa_sm *sm, enum wpa_sm_conf_params param,
|
|||
case WPA_PARAM_OCI_FREQ_EAPOL:
|
||||
sm->oci_freq_override_eapol = value;
|
||||
break;
|
||||
case WPA_PARAM_OCI_FREQ_EAPOL_G2:
|
||||
sm->oci_freq_override_eapol_g2 = value;
|
||||
break;
|
||||
case WPA_PARAM_OCI_FREQ_FT_ASSOC:
|
||||
sm->oci_freq_override_ft_assoc = value;
|
||||
break;
|
||||
case WPA_PARAM_OCI_FREQ_FILS_ASSOC:
|
||||
sm->oci_freq_override_fils_assoc = value;
|
||||
break;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
#ifdef CONFIG_DPP2
|
||||
case WPA_PARAM_DPP_PFS:
|
||||
|
@ -4565,6 +4583,15 @@ struct wpabuf * fils_build_assoc_req(struct wpa_sm *sm, const u8 **kek,
|
|||
wpabuf_free(buf);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (sm->oci_freq_override_fils_assoc) {
|
||||
wpa_printf(MSG_INFO,
|
||||
"TEST: Override OCI KDE frequency %d -> %d MHz",
|
||||
ci.frequency,
|
||||
sm->oci_freq_override_fils_assoc);
|
||||
ci.frequency = sm->oci_freq_override_fils_assoc;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
pos = wpabuf_put(buf, OCV_OCI_EXTENDED_LEN);
|
||||
if (ocv_insert_extended_oci(&ci, pos) < 0) {
|
||||
|
|
|
@ -110,6 +110,9 @@ enum wpa_sm_conf_params {
|
|||
WPA_PARAM_FT_RSNXE_USED,
|
||||
WPA_PARAM_DPP_PFS,
|
||||
WPA_PARAM_OCI_FREQ_EAPOL,
|
||||
WPA_PARAM_OCI_FREQ_EAPOL_G2,
|
||||
WPA_PARAM_OCI_FREQ_FT_ASSOC,
|
||||
WPA_PARAM_OCI_FREQ_FILS_ASSOC,
|
||||
};
|
||||
|
||||
struct rsn_supp_config {
|
||||
|
|
|
@ -353,6 +353,14 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len,
|
|||
os_free(buf);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (sm->oci_freq_override_ft_assoc) {
|
||||
wpa_printf(MSG_INFO,
|
||||
"TEST: Override OCI KDE frequency %d -> %d MHz",
|
||||
ci.frequency, sm->oci_freq_override_ft_assoc);
|
||||
ci.frequency = sm->oci_freq_override_ft_assoc;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
*pos++ = FTIE_SUBELEM_OCI;
|
||||
*pos++ = OCV_OCI_LEN;
|
||||
|
|
|
@ -156,6 +156,9 @@ struct wpa_sm {
|
|||
struct wpabuf *test_assoc_ie;
|
||||
int ft_rsnxe_used;
|
||||
unsigned int oci_freq_override_eapol;
|
||||
unsigned int oci_freq_override_eapol_g2;
|
||||
unsigned int oci_freq_override_ft_assoc;
|
||||
unsigned int oci_freq_override_fils_assoc;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
#ifdef CONFIG_FILS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue