diff --git a/components/wpa_supplicant/src/ap/hostapd.h b/components/wpa_supplicant/src/ap/hostapd.h index 92192c609f..8708a68c7c 100644 --- a/components/wpa_supplicant/src/ap/hostapd.h +++ b/components/wpa_supplicant/src/ap/hostapd.h @@ -93,8 +93,8 @@ struct hostapd_data { u8 own_addr[ETH_ALEN]; struct sta_info *sta_list; /* STA info list head */ -#define STA_HASH_SIZE 10 -#define STA_HASH(sta) (sta[5] & 0xa) +#define STA_HASH_SIZE 16 +#define STA_HASH(sta) (sta[5] & 0xf) struct sta_info *sta_hash[STA_HASH_SIZE]; int num_sta; /* number of entries in sta_list */ diff --git a/components/wpa_supplicant/src/ap/wpa_auth.c b/components/wpa_supplicant/src/ap/wpa_auth.c index 57af43b250..6c0e902876 100644 --- a/components/wpa_supplicant/src/ap/wpa_auth.c +++ b/components/wpa_supplicant/src/ap/wpa_auth.c @@ -37,7 +37,6 @@ #define STATE_MACHINE_ADDR sm->addr -static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx); static int wpa_sm_step(struct wpa_state_machine *sm); static int wpa_verify_key_mic(int akmp, struct wpa_ptk *PTK, u8 *data, size_t data_len); @@ -805,7 +804,7 @@ continue_processing: return; } sm->MICVerified = TRUE; - eloop_cancel_timeout(wpa_send_eapol_timeout, wpa_auth, sm); + eloop_cancel_timeout(resend_eapol_handle, (void*)(sm->index), NULL); sm->pending_1_of_4_timeout = 0; } @@ -916,16 +915,6 @@ static int wpa_gmk_to_gtk(const u8 *gmk, const char *label, const u8 *addr, } -static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx) -{ - struct wpa_state_machine *sm = timeout_ctx; - - sm->pending_1_of_4_timeout = 0; - sm->TimeoutEvt = TRUE; - wpa_sm_step(sm); -} - - void __wpa_send_eapol(struct wpa_authenticator *wpa_auth, struct wpa_state_machine *sm, int key_info, const u8 *key_rsc, const u8 *nonce, @@ -1549,7 +1538,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING) #endif /* CONFIG_IEEE80211R_AP */ sm->pending_1_of_4_timeout = 0; - eloop_cancel_timeout(wpa_send_eapol_timeout, sm->wpa_auth, sm); + eloop_cancel_timeout(resend_eapol_handle, (void*)(sm->index), NULL); if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) && sm->PMK != pmk) { /* PSK may have changed from the previous choice, so update