Address an issue observed in the following scenario:
- DUT operating in STA+AP SCC mode on 5200 MHz, with P2P GO initially
on 5745 MHz.
- Driver PCL restrictions forced GO to switch to 5200 MHz.
- hostapd attempted to revert to 5745 MHz, as 5200 MHz was listed in the
avoid frequency range reported by the driver.
- Driver again enforced SCC on 5200 MHz.
- Channel switch triggered from hostapd and driver again and again.
- Leftover association events triggered crashes during channel switch
failure and group restart.
Fix: Add an early check in hostapd_notif_assoc() to ignore association
events when the P2P GO instance is not started or has been disabled.
Signed-off-by: Huang Chenming <chenhuan@qti.qualcomm.com>
bool updated = false;
bool driver_acl;
+#ifdef CONFIG_P2P
+ if (hapd->p2p_group && (!hapd->started || hapd->disabled)) {
+ wpa_printf(MSG_DEBUG,
+ "hostapd_notif_assoc: Ignore assoc event - P2P GO not started or disabled");
+ return 0;
+ }
+#endif /* CONFIG_P2P */
+
if (addr == NULL) {
/*
* This could potentially happen with unexpected event from the