blob: 14515e75ac25c1d8e23b447517c6f74f02efdd76 [file] [log] [blame]
developer8eb72a32023-03-30 08:32:07 +08001From b585525245cfdb1824b21da47bf55dfae68beba9 Mon Sep 17 00:00:00 2001
developerc41fcd32022-09-20 22:09:06 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Tue, 20 Sep 2022 19:33:45 +0800
developer8eb72a32023-03-30 08:32:07 +08004Subject: [PATCH 02/25] hostapd: mtk: print sae groups by hostapd ctrl
developerc41fcd32022-09-20 22:09:06 +08005
6---
7 hostapd/ctrl_iface.c | 13 +++++++++++++
8 1 file changed, 13 insertions(+)
9
10diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
developer81939a52023-03-25 15:31:11 +080011index c2a2822..bc690c5 100644
developerc41fcd32022-09-20 22:09:06 +080012--- a/hostapd/ctrl_iface.c
13+++ b/hostapd/ctrl_iface.c
14@@ -1412,6 +1412,19 @@ static int hostapd_ctrl_iface_get(struct hostapd_data *hapd, char *cmd,
15 if (os_snprintf_error(buflen, res))
16 return -1;
17 return res;
18+ } else if (os_strcmp(cmd, "sae_group_capability") == 0) {
19+#ifdef CONFIG_SAE
20+ /* see sae_set_group() */
21+ res = os_snprintf(buf, buflen, "%s%s%s%s19 20 21",
22+ dh_groups_get(15) ? "15 ": "",
23+ dh_groups_get(16) ? "16 ": "",
24+ dh_groups_get(17) ? "17 ": "",
25+ dh_groups_get(18) ? "18 ": "");
26+
27+ if (os_snprintf_error(buflen, res))
28+ return -1;
29+ return res;
30+#endif /* CONFIG_SAE */
31 }
32
33 return -1;
34--
developer81939a52023-03-25 15:31:11 +0800352.18.0
developerc41fcd32022-09-20 22:09:06 +080036