Skip to content

Commit e78a076

Browse files
MaochenWang1krish2718
authored andcommitted
[nrf fromtree] 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: Maochen Wang <[email protected]> (cherry picked from commit 9487952)
1 parent b7db759 commit e78a076

File tree

1 file changed

+76
-58
lines changed

1 file changed

+76
-58
lines changed

include/zephyr/net/wifi_mgmt.h

Lines changed: 76 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -949,76 +949,94 @@ enum wifi_dpp_bootstrap_type {
949949
WIFI_DPP_BOOTSTRAP_TYPE_NFC_URI
950950
};
951951

952+
/** Params to add DPP configurator */
953+
struct wifi_dpp_configurator_add_params {
954+
/** ECP curves for private key */
955+
int curve;
956+
/** ECP curves for net access key */
957+
int net_access_key_curve;
958+
};
959+
960+
/** Params to initiate a DPP auth procedure */
961+
struct wifi_dpp_auth_init_params {
962+
/** Peer bootstrap id */
963+
int peer;
964+
/** Configuration parameter id */
965+
int configurator;
966+
/** Role configurator or enrollee */
967+
int role;
968+
/** Security type */
969+
int conf;
970+
/** SSID in string */
971+
char ssid[WIFI_SSID_MAX_LEN + 1];
972+
};
973+
974+
/** Params to do DPP chirp */
975+
struct wifi_dpp_chirp_params {
976+
/** Own bootstrap id */
977+
int id;
978+
/** Chirp on frequency */
979+
int freq;
980+
};
981+
982+
/** Params to do DPP listen */
983+
struct wifi_dpp_listen_params {
984+
/** Listen on frequency */
985+
int freq;
986+
/** Role configurator or enrollee */
987+
int role;
988+
};
989+
990+
/** Params to generate a DPP bootstrap */
991+
struct wifi_dpp_bootstrap_gen_params {
992+
/** Bootstrap type */
993+
int type;
994+
/** Own operating class */
995+
int op_class;
996+
/** Own working channel */
997+
int chan;
998+
/** ECP curves */
999+
int curve;
1000+
/** Own mac address */
1001+
uint8_t mac[WIFI_MAC_ADDR_LEN];
1002+
};
1003+
1004+
/** Params to set specific DPP configurator */
1005+
struct wifi_dpp_configurator_set_params {
1006+
/** Peer bootstrap id */
1007+
int peer;
1008+
/** Configuration parameter id */
1009+
int configurator;
1010+
/** Role configurator or enrollee */
1011+
int role;
1012+
/** Security type */
1013+
int conf;
1014+
/** ECP curves for private key */
1015+
int curve;
1016+
/** ECP curves for net access key */
1017+
int net_access_key_curve;
1018+
/** Own mac address */
1019+
char ssid[WIFI_SSID_MAX_LEN + 1];
1020+
};
1021+
9521022
/** Wi-Fi DPP params for various operations
9531023
*/
9541024
struct wifi_dpp_params {
9551025
/** Operation enum */
9561026
int action;
9571027
union {
9581028
/** Params to add DPP configurator */
959-
struct wifi_dpp_configurator_add_params {
960-
/** ECP curves for private key */
961-
int curve;
962-
/** ECP curves for net access key */
963-
int net_access_key_curve;
964-
} configurator_add;
1029+
struct wifi_dpp_configurator_add_params configurator_add;
9651030
/** Params to initiate a DPP auth procedure */
966-
struct wifi_dpp_auth_init_params {
967-
/** Peer bootstrap id */
968-
int peer;
969-
/** Configuration parameter id */
970-
int configurator;
971-
/** Role configurator or enrollee */
972-
int role;
973-
/** Security type */
974-
int conf;
975-
/** SSID in string */
976-
char ssid[WIFI_SSID_MAX_LEN + 1];
977-
} auth_init;
1031+
struct wifi_dpp_auth_init_params auth_init;
9781032
/** Params to do DPP chirp */
979-
struct wifi_dpp_chirp_params {
980-
/** Own bootstrap id */
981-
int id;
982-
/** Chirp on frequency */
983-
int freq;
984-
} chirp;
1033+
struct wifi_dpp_chirp_params chirp;
9851034
/** Params to do DPP listen */
986-
struct wifi_dpp_listen_params {
987-
/** Listen on frequency */
988-
int freq;
989-
/** Role configurator or enrollee */
990-
int role;
991-
} listen;
1035+
struct wifi_dpp_listen_params listen;
9921036
/** Params to generate a DPP bootstrap */
993-
struct wifi_dpp_bootstrap_gen_params {
994-
/** Bootstrap type */
995-
int type;
996-
/** Own operating class */
997-
int op_class;
998-
/** Own working channel */
999-
int chan;
1000-
/** ECP curves */
1001-
int curve;
1002-
/** Own mac address */
1003-
uint8_t mac[WIFI_MAC_ADDR_LEN];
1004-
} bootstrap_gen;
1037+
struct wifi_dpp_bootstrap_gen_params bootstrap_gen;
10051038
/** Params to set specific DPP configurator */
1006-
struct wifi_dpp_configurator_set_params {
1007-
/** Peer bootstrap id */
1008-
int peer;
1009-
/** Configuration parameter id */
1010-
int configurator;
1011-
/** Role configurator or enrollee */
1012-
int role;
1013-
/** Security type */
1014-
int conf;
1015-
/** ECP curves for private key */
1016-
int curve;
1017-
/** ECP curves for net access key */
1018-
int net_access_key_curve;
1019-
/** Own mac address */
1020-
char ssid[WIFI_SSID_MAX_LEN + 1];
1021-
} configurator_set;
1039+
struct wifi_dpp_configurator_set_params configurator_set;
10221040
/** Bootstrap get uri id */
10231041
int id;
10241042
/** Timeout for DPP frame response rx */

0 commit comments

Comments
 (0)