When PASN auth 1 frame does not get an ack or gets failure, the call to
ap_free_sta() clears the hostapd context but the driver/firmware is not
aware of this and as such, still holds the context making it impossible
to initiate next PASN request.
Clear PASN context in underlying drivers by setting NULL context with
hostapd_drv_set_secure_ranging_ctx().
Signed-off-by: Khanjan Desai <khanjan@qti.qualcomm.com>
mgmt, len, false);
wpabuf_free(sta->pasn->frame);
sta->pasn->frame = NULL;
- if (ret < 0)
+ if (ret < 0) {
+ hostapd_drv_set_secure_ranging_ctx(hapd, hapd->own_addr,
+ sta->addr, 0, 0,
+ NULL, 0, NULL, 1);
ap_free_sta(hapd, sta);
+ }
} else if (trans_seq == 3) {
if (!sta->pasn) {
wpa_printf(MSG_DEBUG,