[PATCH v4 4/7] wpa_supplicant: fix frequency config for non p2p vht/he cases

Jouni Malinen j at w1.fi
Wed Oct 14 05:54:27 EDT 2020


On Tue, Jun 30, 2020 at 01:53:20PM +0200, Markus Theil wrote:
> Fix compile without CONFIG_P2P and only set secondary channel seg idx
> if we use a mode supporting a sec channel for vht/he.

> diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
> @@ -52,8 +52,8 @@ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
>  #ifdef CONFIG_P2P
>  	u8 center_chan = 0;
>  	u8 channel = conf->channel;
> -	u8 freq_seg_idx;
>  #endif /* CONFIG_P2P */
> +	u8 freq_seg_idx;

This seems to be making freq_seg_idx more generic to apply to both P2P
and non-P2P cases..

> @@ -62,24 +62,27 @@ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
>  	if (ssid->max_oper_chwidth)
>  		hostapd_set_oper_chwidth(conf, ssid->max_oper_chwidth);
>  
> -	ieee80211_freq_to_chan(ssid->vht_center_freq2,
> -			       &freq_seg_idx);
> -	hostapd_set_oper_centr_freq_seg1_idx(conf, freq_seg_idx);
> -
>  	if (!ssid->p2p_group) {
...
> +		if (hostapd_get_oper_chwidth(conf) == CHANWIDTH_80P80MHZ) {
> +			ieee80211_freq_to_chan(ssid->vht_center_freq2,
> +					       &freq_seg_idx);
> +			hostapd_set_oper_centr_freq_seg1_idx(conf, freq_seg_idx);
> +		}

.. but this moves the code using freq_seg_idx to apply only for non-P2P
cases.

Can you please clarify why this would be conditional on !ssid->p2p_group
now?
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list