Message ID | 1487049224-3877-2-git-send-email-masashi.honma@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
On Tue, Feb 14, 2017 at 02:13:43PM +0900, Masashi Honma wrote: > diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c > @@ -1883,10 +1883,10 @@ static int drv_supports_vht(struct wpa_supplicant *wpa_s, > - if (!mode) > + if (!mode || mode->vht_capab == 0) > return 0; This part is fine.. > - return mode->vht_capab != 0; > + return !ieee80211ac_cap_check(mode->vht_capab, ssid->vht_capa); but this looks problematic. ssid->vht_capa is included only in CONFIG_VHT_OVERRIDES=y builds, so this would break common builds. In addition, this breaks number of hwsim test cases (e.g., wpas_mesh_open_vht_80p80 ibss_vht_80p80 mesh_open_vht_160) if VHT overrides are included. It looks like those test cases end up using only 40 MHz channels (HT only?) after this patch. ssid->vht_capa is cannot really be used without checking ssid->vht_capa_mask. I'm not completely sure I understand what this patch is trying to do taken into account ssid->vht_capa is a VHT override to allow some capabilities to be disabled for testing purposes; not a normal "enable/disable VHT" parameter.
On 2017/02/19 23:11, Jouni Malinen wrote: >> - return mode->vht_capab != 0; >> + return !ieee80211ac_cap_check(mode->vht_capab, ssid->vht_capa); > > but this looks problematic. ssid->vht_capa is included only in > CONFIG_VHT_OVERRIDES=y builds, so this would break common builds. In > addition, this breaks number of hwsim test cases (e.g., > wpas_mesh_open_vht_80p80 ibss_vht_80p80 mesh_open_vht_160) if VHT > overrides are included. It looks like those test cases end up using only > 40 MHz channels (HT only?) after this patch. > > ssid->vht_capa is cannot really be used without checking > ssid->vht_capa_mask. I'm not completely sure I understand what this > patch is trying to do taken into account ssid->vht_capa is a VHT > override to allow some capabilities to be disabled for testing purposes; > not a normal "enable/disable VHT" parameter. Oh, I understand ssid->vht_capa is for testing functionality. I will drop this patch. Masashi Honma.
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 11bb7b9..08de6f6 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1883,10 +1883,10 @@ static int drv_supports_vht(struct wpa_supplicant *wpa_s, } } - if (!mode) + if (!mode || mode->vht_capab == 0) return 0; - return mode->vht_capab != 0; + return !ieee80211ac_cap_check(mode->vht_capab, ssid->vht_capa); }
Signed-off-by: Masashi Honma <masashi.honma@gmail.com> --- wpa_supplicant/wpa_supplicant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)