While initiating PASN authentication during P2P connect, use the peer’s
listen frequency instead of the previously used force_freq. The
force_freq is intended to be used as operating channel for the P2P group
formation, it may not match the peer’s current listen channel and can
lead to off-channel PASN attempts.
Signed-off-by: Shivani Baranwal <shivbara@qti.qualcomm.com>
}
#ifdef CONFIG_PASN
- if (wpa_s->p2p2 && !wpa_s->p2p_pd_before_go_neg)
- wpas_p2p_initiate_pasn_auth(wpa_s, peer_addr, force_freq);
+ if (wpa_s->p2p2 && !wpa_s->p2p_pd_before_go_neg) {
+ int listen_freq = p2p_get_listen_freq(wpa_s->global->p2p,
+ peer_addr);
+
+ wpas_p2p_initiate_pasn_auth(wpa_s, peer_addr, listen_freq);
+ }
#endif /* CONFIG_PASN */
return ret;