Replace int status/reason_code with u16 variable
These cases are for the IEEE 802.11 Status Code and Reason Code and those fields are unsigned 16 bit values, so use the more appropriate type consistently. This is mainly to document the uses and to make the source code easier to understand. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
cfde99a84b
commit
4be17ffbd9
20 changed files with 38 additions and 38 deletions
|
@ -26,7 +26,7 @@ struct wpa_sm_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 (*deauthenticate)(void * ctx, u16 reason_code);
|
||||
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,
|
||||
|
|
|
@ -188,7 +188,7 @@ static inline enum wpa_states wpa_sm_get_state(struct wpa_sm *sm)
|
|||
return sm->ctx->get_state(sm->ctx->ctx);
|
||||
}
|
||||
|
||||
static inline void wpa_sm_deauthenticate(struct wpa_sm *sm, int reason_code)
|
||||
static inline void wpa_sm_deauthenticate(struct wpa_sm *sm, u16 reason_code)
|
||||
{
|
||||
WPA_ASSERT(sm->ctx->deauthenticate);
|
||||
sm->ctx->deauthenticate(sm->ctx->ctx, reason_code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue