]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix ACS offloading behavior with p2p_no_group_iface=1
authorJayachandran Sreekumaran <jsreekum@codeaurora.org>
Fri, 8 Mar 2019 10:30:56 +0000 (16:00 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 13 Mar 2019 11:22:40 +0000 (13:22 +0200)
wpa_s->p2p_go_do_acs was not cleared during P2P group deletion and that
resulted in the case of no separate group interface continuing to assume
ACS was to be used for consecutive GO starts even if they tried to
specify a frequency. Fix this by explicitly clearing
wpa_s->p2p_go_do_acs during P2P group deletion and also clear this when
processing the P2P_GROUP_ADD if the parameters do not request ACS to be
used.

Fixes: 37ed3254de22 ("P2P: ACS offload for the autonomous GO")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/p2p_supplicant.c

index 013d05cb382116328cac0dc597056586ef133236..c627443a8d63e25f1475598fcd64098a687bc19d 100644 (file)
@@ -6418,6 +6418,8 @@ static int p2p_ctrl_group_add(struct wpa_supplicant *wpa_s, char *cmd)
                        wpa_s->p2p_go_acs_band = HOSTAPD_MODE_IEEE80211ANY;
                        wpa_s->p2p_go_do_acs = 1;
                }
+       } else {
+               wpa_s->p2p_go_do_acs = 0;
        }
 #endif /* CONFIG_ACS */
 
index 937b70f4ed90446b8c33d86b2094ded7169e3439..412903f1d6e2eaef1b7eff2393b4ee27528d6702 100644 (file)
@@ -980,6 +980,7 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
        os_free(wpa_s->p2p_group_common_freqs);
        wpa_s->p2p_group_common_freqs = NULL;
        wpa_s->p2p_group_common_freqs_num = 0;
+       wpa_s->p2p_go_do_acs = 0;
 
        wpa_s->waiting_presence_resp = 0;