hostapd: For VHT 20/40, allow center segment 0 to be zero

The 802.11ac amendment specifies that that the center segment 0 field
is reserved, so it should be zero. Hostapd previously required it to
be set, which is likely a good idea for interoperability, but allow it
to be unset. However, don't allow it to be set to a random value, only
allow zero and the correct channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2014-03-14 16:45:21 +02:00 committed by Jouni Malinen
parent 656a3ef276
commit 67e1a402df
1 changed files with 2 additions and 1 deletions

View File

@ -503,7 +503,8 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data, int mode,
case VHT_CHANWIDTH_USE_HT:
if (center_segment1)
return -1;
if (5000 + center_segment0 * 5 != data->center_freq1 &&
if (center_segment0 != 0 &&
5000 + center_segment0 * 5 != data->center_freq1 &&
2407 + center_segment0 * 5 != data->center_freq1)
return -1;
break;