diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index a0805e343..0773c0452 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -830,6 +830,8 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s, wpa_s->sae_commit_override = wpabuf_parse_bin(value); } else if (os_strcasecmp(cmd, "driver_signal_override") == 0) { ret = wpas_ctrl_iface_set_dso(wpa_s, value); + } else if (os_strcasecmp(cmd, "disable_scs_support") == 0) { + wpa_s->disable_scs_support = !!atoi(value); #ifdef CONFIG_DPP } else if (os_strcasecmp(cmd, "dpp_config_obj_override") == 0) { os_free(wpa_s->dpp_config_obj_override); @@ -8551,6 +8553,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s) wpabuf_free(wpa_s->rsnxe_override_eapol); wpa_s->rsnxe_override_eapol = NULL; wpas_clear_driver_signal_override(wpa_s); + wpa_s->disable_scs_support = 0; wpa_s->oci_freq_override_eapol = 0; wpa_s->oci_freq_override_saquery_req = 0; wpa_s->oci_freq_override_saquery_resp = 0; diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index a855b1f24..4eda013fc 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1874,6 +1874,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s, static void wpas_ext_capab_byte(struct wpa_supplicant *wpa_s, u8 *pos, int idx) { + bool scs = true; + *pos = 0x00; switch (idx) { @@ -1917,7 +1919,12 @@ static void wpas_ext_capab_byte(struct wpa_supplicant *wpa_s, u8 *pos, int idx) #endif /* CONFIG_MBO */ break; case 6: /* Bits 48-55 */ - *pos |= 0x40; /* Bit 54 - SCS */ +#ifdef CONFIG_TESTING_OPTIONS + if (wpa_s->disable_scs_support) + scs = false; +#endif /* CONFIG_TESTING_OPTIONS */ + if (scs) + *pos |= 0x40; /* Bit 54 - SCS */ break; case 7: /* Bits 56-63 */ break; diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 3417cc11f..417a479aa 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1478,6 +1478,9 @@ struct wpa_supplicant { #endif /* CONFIG_PASN */ struct scs_robust_av_data scs_robust_av_req; u8 scs_dialog_token; +#ifdef CONFIG_TESTING_OPTIONS + unsigned int disable_scs_support:1; +#endif /* CONFIG_TESTING_OPTIONS */ };