[][WPA3: print the sae groups by hostapd ctrl interface]

[Description]
Add the sae_groups item to the hostapd_cli command 'get_config'.
WPA3 R3 certification need a CMD to check the available sae groups.

[Release-log]

Change-Id: Id84cb073d5856d2182ab6a438c282d8f2a016780
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5307082
diff --git a/openwrt_patches-21.02/500-print-sae-groups-by-hostapd-ctrl.patch b/openwrt_patches-21.02/500-print-sae-groups-by-hostapd-ctrl.patch
new file mode 100644
index 0000000..f90b6a9
--- /dev/null
+++ b/openwrt_patches-21.02/500-print-sae-groups-by-hostapd-ctrl.patch
@@ -0,0 +1,34 @@
+diff --git a/package/network/services/hostapd/patches/902-print-sae-groups-by-hostapd-ctrl.patch b/package/network/services/hostapd/patches/902-print-sae-groups-by-hostapd-ctrl.patch
+new file mode 100644
+index 0000000..c14aef9
+--- /dev/null
++++ b/package/network/services/hostapd/patches/902-print-sae-groups-by-hostapd-ctrl.patch
+@@ -0,0 +1,28 @@
++--- a/hostapd/ctrl_iface.c
+++++ b/hostapd/ctrl_iface.c
++@@ -1301,6 +1301,25 @@ static int hostapd_ctrl_iface_get_config
++ 		pos += ret;
++ 	}
++ 
+++	if (hapd->conf->wpa && wpa_key_mgmt_sae(hapd->conf->wpa_key_mgmt)) {
+++		int *groups = hapd->conf->sae_groups;
+++		int default_groups[] = { 19, 0 };
+++		int i;
+++
+++		if (!groups)
+++			groups = default_groups;
+++
+++		for (i = 0; groups[i] > 0; i++) {
+++			ret = os_snprintf(pos, end - pos, "%s%d%s",
+++					  i == 0 ? "sae_groups=" : "",
+++					  groups[i],
+++					  groups[i + 1] > 0 ? " " : "\n");
+++			if (os_snprintf_error(end - pos, ret))
+++				return pos - buf;
+++			pos += ret;
+++		}
+++	}
+++
++ 	if (hapd->conf->wpa) {
++ 		ret = os_snprintf(pos, end - pos, "group_cipher=%s\n",
++ 				  wpa_cipher_txt(hapd->conf->wpa_group));