Disable pri/sec channel switch for GO with force frequency

Do not allow 40 MHz co-ex PRI/SEC switch to force
to change Autonomous GO PRI channel, when P2P group
add is called with a force frequency. This is to,
1. Avoid 20/40 coex scan & reduce GO bring up time.
2. Allow supplicant to follow the same frequency requested
by the application.

Bug: 250456161
Test: Tested autonomous GO & confirmed from the logs that
P2P GO is not triggering 20/40 coex scan .

Signed-off-by: Sunil Ravi <sunilravi@google.com>
Change-Id: Ib891f0c6de948580b9868e898a88ff61c598af66
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 0261362..bee4fe7 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -414,7 +414,9 @@
 		}
 	}
 
-	if (conf->secondary_channel) {
+	if (wpa_s->p2p_go_no_pri_sec_switch) {
+		conf->no_pri_sec_switch = 1;
+	} else if (conf->secondary_channel) {
 		struct wpa_supplicant *iface;
 
 		for (iface = wpa_s->global->ifaces; iface; iface = iface->next)