Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_wrong_typecast_spp' into 'master'
Browse files Browse the repository at this point in the history
fix(wifi): Fix wrong typecasting of sta_info while getting SPP Caps

Closes WIFIBUG-737

See merge request espressif/esp-idf!33040
  • Loading branch information
nachiketkukade committed Aug 27, 2024
2 parents 76102f3 + 1bedadc commit e220f1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ bool wpa_ap_rx_eapol(void *hapd_data, void *sm_data, u8 *data, size_t data_len)

void wpa_ap_get_peer_spp_msg(void *sm_data, bool *spp_cap, bool *spp_req)
{
struct wpa_state_machine *sm = (struct wpa_state_machine *)sm_data;
struct sta_info *sta = sm_data;

if (!sm) {
if (!sta || !sta->wpa_sm) {
return;
}

*spp_cap = sm->spp_sup.capable;
*spp_req = sm->spp_sup.require;
*spp_cap = sta->wpa_sm->spp_sup.capable;
*spp_req = sta->wpa_sm->spp_sup.require;
}

bool wpa_deattach(void)
Expand Down

0 comments on commit e220f1f

Please sign in to comment.