aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_drv_ops.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-03-14 14:45:21 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-14 15:07:17 (GMT)
commit67e1a402dfddc771c0307efacca8de002a826c4f (patch)
tree6260540149539359be7551458f2ce62d13c65558 /src/ap/ap_drv_ops.c
parent656a3ef276093e6a93d94c028312d3d8019630d2 (diff)
downloadhostap-67e1a402dfddc771c0307efacca8de002a826c4f.zip
hostap-67e1a402dfddc771c0307efacca8de002a826c4f.tar.gz
hostap-67e1a402dfddc771c0307efacca8de002a826c4f.tar.bz2
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>
Diffstat (limited to 'src/ap/ap_drv_ops.c')
-rw-r--r--src/ap/ap_drv_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 5ba48c9..83cfd0f 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -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;