developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame^] | 1 | From 135e2f4368bba88d8823da63a134fdcc587fe698 Mon Sep 17 00:00:00 2001 |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Tue, 20 Sep 2022 19:33:45 +0800 |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 02/54] mtk: hostapd: print sae groups by hostapd ctrl |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 5 | |
| 6 | --- |
| 7 | hostapd/ctrl_iface.c | 13 +++++++++++++ |
| 8 | 1 file changed, 13 insertions(+) |
| 9 | |
| 10 | diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame^] | 11 | index 98d598ea9..c03e6f608 100644 |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 12 | --- a/hostapd/ctrl_iface.c |
| 13 | +++ b/hostapd/ctrl_iface.c |
developer | bddc9db | 2023-09-11 13:34:36 +0800 | [diff] [blame] | 14 | @@ -1364,6 +1364,19 @@ static int hostapd_ctrl_iface_get(struct hostapd_data *hapd, char *cmd, |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 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 | -- |
developer | bddc9db | 2023-09-11 13:34:36 +0800 | [diff] [blame] | 35 | 2.18.0 |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 36 | |