Get rid of unnecessary typedefs for enums.
This commit is contained in:
parent
81f4f6195e
commit
719347511a
43 changed files with 156 additions and 125 deletions
|
@ -452,7 +452,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
|
|||
const struct wpa_eapol_key *key)
|
||||
{
|
||||
int keylen, rsclen;
|
||||
wpa_alg alg;
|
||||
enum wpa_alg alg;
|
||||
const u8 *key_rsc;
|
||||
u8 null_rsc[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
|
@ -506,7 +506,8 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
|
|||
|
||||
static int wpa_supplicant_check_group_cipher(int group_cipher,
|
||||
int keylen, int maxkeylen,
|
||||
int *key_rsc_len, wpa_alg *alg)
|
||||
int *key_rsc_len,
|
||||
enum wpa_alg *alg)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -560,7 +561,7 @@ static int wpa_supplicant_check_group_cipher(int group_cipher,
|
|||
|
||||
|
||||
struct wpa_gtk_data {
|
||||
wpa_alg alg;
|
||||
enum wpa_alg alg;
|
||||
int tx, key_rsc_len, keyidx;
|
||||
u8 gtk[32];
|
||||
int gtk_len;
|
||||
|
|
|
@ -27,11 +27,11 @@ struct wpa_sm_ctx {
|
|||
void *ctx; /* pointer to arbitrary upper level context */
|
||||
void *msg_ctx; /* upper level context for wpa_msg() calls */
|
||||
|
||||
void (*set_state)(void *ctx, wpa_states state);
|
||||
wpa_states (*get_state)(void *ctx);
|
||||
void (*set_state)(void *ctx, enum wpa_states state);
|
||||
enum wpa_states (*get_state)(void *ctx);
|
||||
void (*deauthenticate)(void * ctx, int reason_code);
|
||||
void (*disassociate)(void *ctx, int reason_code);
|
||||
int (*set_key)(void *ctx, wpa_alg alg,
|
||||
int (*set_key)(void *ctx, enum wpa_alg alg,
|
||||
const u8 *addr, int key_idx, int set_tx,
|
||||
const u8 *seq, size_t seq_len,
|
||||
const u8 *key, size_t key_len);
|
||||
|
|
|
@ -457,7 +457,7 @@ static int wpa_ft_parse_ies(const u8 *ies, size_t ies_len,
|
|||
static int wpa_ft_install_ptk(struct wpa_sm *sm, const u8 *bssid)
|
||||
{
|
||||
int keylen;
|
||||
wpa_alg alg;
|
||||
enum wpa_alg alg;
|
||||
u8 null_rsc[6] = { 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
wpa_printf(MSG_DEBUG, "FT: Installing PTK to the driver.");
|
||||
|
@ -662,7 +662,7 @@ static int wpa_ft_process_gtk_subelem(struct wpa_sm *sm, const u8 *gtk_elem,
|
|||
{
|
||||
u8 gtk[32];
|
||||
int keyidx;
|
||||
wpa_alg alg;
|
||||
enum wpa_alg alg;
|
||||
size_t gtk_len, keylen, rsc_len;
|
||||
|
||||
if (gtk_elem == NULL) {
|
||||
|
|
|
@ -109,13 +109,13 @@ struct wpa_sm {
|
|||
};
|
||||
|
||||
|
||||
static inline void wpa_sm_set_state(struct wpa_sm *sm, wpa_states state)
|
||||
static inline void wpa_sm_set_state(struct wpa_sm *sm, enum wpa_states state)
|
||||
{
|
||||
WPA_ASSERT(sm->ctx->set_state);
|
||||
sm->ctx->set_state(sm->ctx->ctx, state);
|
||||
}
|
||||
|
||||
static inline wpa_states wpa_sm_get_state(struct wpa_sm *sm)
|
||||
static inline enum wpa_states wpa_sm_get_state(struct wpa_sm *sm)
|
||||
{
|
||||
WPA_ASSERT(sm->ctx->get_state);
|
||||
return sm->ctx->get_state(sm->ctx->ctx);
|
||||
|
@ -133,7 +133,7 @@ static inline void wpa_sm_disassociate(struct wpa_sm *sm, int reason_code)
|
|||
sm->ctx->disassociate(sm->ctx->ctx, reason_code);
|
||||
}
|
||||
|
||||
static inline int wpa_sm_set_key(struct wpa_sm *sm, wpa_alg alg,
|
||||
static inline int wpa_sm_set_key(struct wpa_sm *sm, enum wpa_alg alg,
|
||||
const u8 *addr, int key_idx, int set_tx,
|
||||
const u8 *seq, size_t seq_len,
|
||||
const u8 *key, size_t key_len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue