Commit 9487952a authored by Maochen Wang's avatar Maochen Wang Committed by Anas Nashif
Browse files

net: fix build error in DPP struct



Fix build error in DPP struct when building Matter over Wi-Fi.
The struct declaration must be done outside of the anonymous union.
Only struct definition can be done inside the anonymous union.

Signed-off-by: default avatarMaochen Wang <maochen.wang@nxp.com>
parent 838ff13f
Loading
Loading
Loading
Loading
+76 −58
Original line number Diff line number Diff line
@@ -947,19 +947,14 @@ enum wifi_dpp_bootstrap_type {
	WIFI_DPP_BOOTSTRAP_TYPE_NFC_URI
};

/** Wi-Fi DPP params for various operations
 */
struct wifi_dpp_params {
	/** Operation enum */
	int action;
	union {
/** Params to add DPP configurator */
struct wifi_dpp_configurator_add_params {
	/** ECP curves for private key */
	int curve;
	/** ECP curves for net access key */
	int net_access_key_curve;
		} configurator_add;
};

/** Params to initiate a DPP auth procedure */
struct wifi_dpp_auth_init_params {
	/** Peer bootstrap id */
@@ -972,21 +967,24 @@ struct wifi_dpp_params {
	int conf;
	/** SSID in string */
	char ssid[WIFI_SSID_MAX_LEN + 1];
		} auth_init;
};

/** Params to do DPP chirp */
struct wifi_dpp_chirp_params {
	/** Own bootstrap id */
	int id;
	/** Chirp on frequency */
	int freq;
		} chirp;
};

/** Params to do DPP listen */
struct wifi_dpp_listen_params {
	/** Listen on frequency */
	int freq;
	/** Role configurator or enrollee */
	int role;
		} listen;
};

/** Params to generate a DPP bootstrap */
struct wifi_dpp_bootstrap_gen_params {
	/** Bootstrap type */
@@ -999,7 +997,8 @@ struct wifi_dpp_params {
	int curve;
	/** Own mac address */
	uint8_t mac[WIFI_MAC_ADDR_LEN];
		} bootstrap_gen;
};

/** Params to set specific DPP configurator */
struct wifi_dpp_configurator_set_params {
	/** Peer bootstrap id */
@@ -1016,7 +1015,26 @@ struct wifi_dpp_params {
	int net_access_key_curve;
	/** Own mac address */
	char ssid[WIFI_SSID_MAX_LEN + 1];
		} configurator_set;
};

/** Wi-Fi DPP params for various operations
 */
struct wifi_dpp_params {
	/** Operation enum */
	int action;
	union {
		/** Params to add DPP configurator */
		struct wifi_dpp_configurator_add_params configurator_add;
		/** Params to initiate a DPP auth procedure */
		struct wifi_dpp_auth_init_params auth_init;
		/** Params to do DPP chirp */
		struct wifi_dpp_chirp_params chirp;
		/** Params to do DPP listen */
		struct wifi_dpp_listen_params listen;
		/** Params to generate a DPP bootstrap */
		struct wifi_dpp_bootstrap_gen_params bootstrap_gen;
		/** Params to set specific DPP configurator */
		struct wifi_dpp_configurator_set_params configurator_set;
		/** Bootstrap get uri id */
		int id;
		/** Timeout for DPP frame response rx */