[PATCH v2] hostap: set ht_capab from wiphy when in P2P GO mode

Jouni Malinen j at w1.fi
Thu Nov 24 14:51:52 EST 2011


On Tue, Aug 09, 2011 at 08:08:46AM +0300, Arik Nemtsov wrote:
> Set the HT capabilities of a P2P GO according to the wiphy supported
> ones. Mask-in a white-list of HT capabilities that won't cause problems
> for non-supporting stations.

> diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
> @@ -101,8 +102,20 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,

> +			/*
> +			 * white-list capabilities that won't cause issues
> +			 * to connecting stations.
> +			 */
> +			conf->ht_capab = mode->ht_capab &
> +					 (HT_CAP_INFO_GREEN_FIELD |
> +					 HT_CAP_INFO_SHORT_GI20MHZ |
> +					 HT_CAP_INFO_SHORT_GI40MHZ |
> +					 HT_CAP_INFO_RX_STBC_MASK |
> +					 HT_CAP_INFO_MAX_AMSDU_SIZE);

This does not look safe.. Wouldn't that hardcode static SMPS to be
enabled? The default value for ht_capab is HT_CAP_INFO_SMPS_DISABLED
which seems to be getting cleared here. At minimum, this would need to
OR that to conf->ht_capab after the AND.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list