2 * hostapd / WMM (Wi-Fi Multimedia)
3 * Copyright 2002-2003, Instant802 Networks, Inc.
4 * Copyright 2005-2006, Devicescape Software, Inc.
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
13 * See README and COPYING for more details.
21 #endif /* __linux__ */
23 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
24 #include <sys/types.h>
25 #include <sys/endian.h>
26 #endif /* defined(__FreeBSD__) || defined(__NetBSD__) ||
27 * defined(__DragonFly__) */
30 static inline u16 tsinfo(int tag1d, int contention_based, int direction)
32 return (tag1d << 11) | (contention_based << 7) | (direction << 5) |
37 struct wme_information_element {
38 /* required fields for WME version 1 */
45 } __attribute__ ((packed));
47 struct wme_ac_parameter {
48 #if __BYTE_ORDER == __LITTLE_ENDIAN
58 #elif __BYTE_ORDER == __BIG_ENDIAN
69 #error "Please fix <endian.h>"
74 } __attribute__ ((packed));
76 struct wme_parameter_element {
77 /* required fields for WME version 1 */
84 struct wme_ac_parameter ac[4];
86 } __attribute__ ((packed));
88 struct wme_tspec_info_element {
96 u16 nominal_msdu_size;
97 u16 maximum_msdu_size;
98 u32 minimum_service_interval;
99 u32 maximum_service_interval;
100 u32 inactivity_interval;
102 u32 minimum_data_rate;
104 u32 maximum_burst_size;
105 u32 minimum_phy_rate;
108 u16 surplus_bandwidth_allowance;
110 } __attribute__ ((packed));
113 /* Access Categories */
121 struct ieee80211_mgmt;
123 u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid);
124 int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len);
125 int hostapd_wme_sta_config(struct hostapd_data *hapd, struct sta_info *sta);
126 void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,