ap_set_security: PMKSACaching,disabled support with mac80211-drivers

This argument was already supported but only with OpenWrt-based
configuration. Add support for the case where sigma_dut writes
hostapd.conf. In addition, move ap_reset_default handling of these
parameters to apply to all programs since this can be of use with
non-OCE cases as well.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
diff --git a/ap.c b/ap.c
index 01b3a73..a786538 100644
--- a/ap.c
+++ b/ap.c
@@ -6968,6 +6968,9 @@
 	if (dut->ap_rsn_preauth)
 		fprintf(f, "rsn_preauth=1\n");
 
+	if (dut->ap_pmksa && dut->ap_pmksa_caching)
+		fprintf(f, "disable_pmksa_caching=1\n");
+
 	switch (dut->ap_pmf) {
 	case AP_PMF_DISABLED:
 		break;
@@ -8083,8 +8086,6 @@
 		dut->ap_akm = 0;
 		dut->ap_add_sha256 = 0;
 		dut->ap_add_sha384 = 0;
-		dut->ap_pmksa = 0;
-		dut->ap_pmksa_caching = 0;
 		dut->ap_80plus80 = 0;
 	}
 
@@ -8092,6 +8093,9 @@
 
 	dut->ap_oper_chn = 0;
 
+	dut->ap_pmksa = 0;
+	dut->ap_pmksa_caching = 0;
+
 	free(dut->rsne_override);
 	dut->rsne_override = NULL;