} else if (os_strcmp(buf, "P2P_LO_STOP") == 0) {
if (wpas_p2p_lo_stop(wpa_s))
reply_len = -1;
+ } else if (os_strcmp(buf, "P2P_REMOVE_IDENTITY") == 0) {
+ if (wpas_p2p_remove_all_identity(wpa_s))
+ reply_len = -1;
#endif /* CONFIG_P2P */
#ifdef CONFIG_WIFI_DISPLAY
} else if (os_strncmp(buf, "WFD_SUBELEM_SET ", 16) == 0) {
}
+int wpas_p2p_remove_all_identity(struct wpa_supplicant *wpa_s)
+{
+ struct wpa_dev_ik *ik;
+
+ for (ik = wpa_s->conf->identity; ik; ik = ik->next)
+ wpa_config_remove_identity(wpa_s->conf, ik->id);
+
+ if (wpa_s->conf->update_config &&
+ wpa_config_write(wpa_s->confname, wpa_s->conf)) {
+ wpa_printf(MSG_DEBUG, "P2P: Failed to update configuration");
+ return -1;
+ }
+ return 0;
+}
+
+
static void wpas_p2p_store_identity(struct wpa_supplicant *wpa_s, u8 cipher,
const u8 *dik_data, size_t dik_len,
const u8 *pmk, size_t pmk_len,
unsigned int freq);
int wpas_p2p_pasn_auth_tx_status(struct wpa_supplicant *wpa_s, const u8 *data,
size_t data_len, bool acked);
+int wpas_p2p_remove_all_identity(struct wpa_supplicant *wpa_s);
#ifdef CONFIG_P2P