blob: d5ebb617b6106849d4160e02f26d753aa9cb513a [file] [log] [blame]
From 41cf77cdfd1b260a688592a8ae4c1474d492d6e4 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Tue, 20 Sep 2022 19:33:45 +0800
Subject: [PATCH 02/28] hostapd: mtk: print sae groups by hostapd ctrl
---
hostapd/ctrl_iface.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 0355e8b..8e8a1a7 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1421,6 +1421,19 @@ static int hostapd_ctrl_iface_get(struct hostapd_data *hapd, char *cmd,
if (os_snprintf_error(buflen, res))
return -1;
return res;
+ } else if (os_strcmp(cmd, "sae_group_capability") == 0) {
+#ifdef CONFIG_SAE
+ /* see sae_set_group() */
+ res = os_snprintf(buf, buflen, "%s%s%s%s19 20 21",
+ dh_groups_get(15) ? "15 ": "",
+ dh_groups_get(16) ? "16 ": "",
+ dh_groups_get(17) ? "17 ": "",
+ dh_groups_get(18) ? "18 ": "");
+
+ if (os_snprintf_error(buflen, res))
+ return -1;
+ return res;
+#endif /* CONFIG_SAE */
}
return -1;
--
2.18.0