Skip to content

Commit 7ae1e47

Browse files
committed
[nrf fromlist] net: lib: wifi_credentials: Use getopt API for adding network options
Use getopt API to process arguments for `cred add` command. Upstream PR #: 86918 Signed-off-by: Triveni Danda <[email protected]>
1 parent a17094e commit 7ae1e47

File tree

2 files changed

+207
-170
lines changed

2 files changed

+207
-170
lines changed

include/zephyr/net/wifi_credentials.h

+12-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ extern "C" {
3232
#define WIFI_CREDENTIALS_FLAG_2_4GHz BIT(2)
3333
/* this entry can use the 5 GHz band */
3434
#define WIFI_CREDENTIALS_FLAG_5GHz BIT(3)
35+
/* this entry can use the 6 GHz band */
36+
#define WIFI_CREDENTIALS_FLAG_6GHz BIT(4)
3537
/* this entry requires management frame protection */
36-
#define WIFI_CREDENTIALS_FLAG_MFP_REQUIRED BIT(4)
38+
#define WIFI_CREDENTIALS_FLAG_MFP_REQUIRED BIT(5)
3739
/* this entry disables management frame protection */
38-
#define WIFI_CREDENTIALS_FLAG_MFP_DISABLED BIT(5)
40+
#define WIFI_CREDENTIALS_FLAG_MFP_DISABLED BIT(6)
41+
/* this entry has anonymous identity configured */
42+
#define WIFI_CREDENTIALS_FLAG_ANONYMOUS_IDENTITY BIT(7)
43+
/* this entry has key password configured */
44+
#define WIFI_CREDENTIALS_FLAG_KEY_PASSWORD BIT(8)
3945

4046
#define WIFI_CREDENTIALS_MAX_PASSWORD_LEN \
4147
MAX(WIFI_PSK_MAX_LEN, CONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH)
@@ -56,6 +62,10 @@ struct wifi_credentials_header {
5662
uint32_t timeout; /**< Timeout for connecting to the network */
5763
uint8_t bssid[WIFI_MAC_ADDR_LEN]; /**< BSSID (Basic Service Set Identifier) */
5864
uint8_t channel; /**< Channel on which the network operates */
65+
char anon_id[16]; /**< Anonymous identifier */
66+
uint8_t aid_length; /**< Length of the Anonymous identifier */
67+
char key_passwd[16]; /**< Password/PSK */
68+
uint8_t key_passwd_length; /**< Length of the Password */
5969
};
6070

6171
/**

0 commit comments

Comments
 (0)