[PATCH 2/2] Add get function for global freq_list value

Jouni Malinen j at w1.fi
Tue Sep 30 13:43:33 PDT 2025


On Thu, Jul 24, 2025 at 06:04:00PM +0200, Clemens Famulla-Conrad wrote:
> Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad at suse.com>
> ---

Thanks, both patch applied with some changes. I added a more complete
commit message for this second patch and fixed this:

> diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
> +static int wpa_config_get_freq_list (const char *name, struct wpa_config *config, long offset,
> +		   char *buf, size_t buflen, int pretty_print)
> +{

> +	if (pretty_print) {
> +		if (*val) {
> +			res = os_snprintf(buf, buflen, "%s=\n", name);
> +			if (os_snprintf_error(buflen, res))
> +				return -1;
> +
> +			if ((tmp = wpa_config_print_int_array(buf + res, buflen - res, *val)) == -1)
> +				return -1;
> +			res += tmp;

That would print following in DUMP:

freq_list=
2412 2437 2462next_parameter_here=its_value

i.e., the newline was in incorrect location.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list