Sync usage with man page.
[netbsd-mini2440.git] / dist / wpa / hostapd / ieee802_11h.c
blob0229dca3fbec6e39cbeaa3e77c06b46c3d5334c0
1 /*
2 * hostapd / IEEE 802.11h
3 * Copyright (c) 2005-2006, Devicescape Software, Inc.
4 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Alternatively, this software may be distributed under the terms of BSD
11 * license.
13 * See README and COPYING for more details.
16 #include "includes.h"
18 #include "hostapd.h"
21 int hostapd_check_power_cap(struct hostapd_data *hapd, u8 *power, u8 len)
23 unsigned int max_pwr;
25 if (len < 2) {
26 wpa_printf(MSG_DEBUG, "Too short power capability IE");
27 return -1;
29 max_pwr = power[1];
30 if (max_pwr > hapd->iface->sta_max_power)
31 return -1;
32 return 0;