WMM cleanup (WME -> WMM rename, comments, etc.)
This updates the terminogy to match with the final WMM specification. In addition, some of the WMM TSPEC structure fields were in incorrect order and used without byte order swapping. Those are also taken care of this cleanup patch.
This commit is contained in:
parent
1c6965f7db
commit
3ae0800c5f
16 changed files with 274 additions and 243 deletions
|
@ -30,7 +30,7 @@
|
|||
#define WLAN_STA_PENDING_POLL BIT(6) /* pending activity poll not ACKed */
|
||||
#define WLAN_STA_SHORT_PREAMBLE BIT(7)
|
||||
#define WLAN_STA_PREAUTH BIT(8)
|
||||
#define WLAN_STA_WME BIT(9)
|
||||
#define WLAN_STA_WMM BIT(9)
|
||||
#define WLAN_STA_MFP BIT(10)
|
||||
#define WLAN_STA_HT BIT(11)
|
||||
#define WLAN_STA_WPS BIT(12)
|
||||
|
|
|
@ -298,8 +298,8 @@ void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
|||
|
||||
pos = hostapd_eid_wpa(hapd, pos, epos - pos, sta);
|
||||
|
||||
/* Wi-Fi Wireless Multimedia Extensions */
|
||||
pos = hostapd_eid_wme(hapd, pos);
|
||||
/* Wi-Fi Alliance WMM */
|
||||
pos = hostapd_eid_wmm(hapd, pos);
|
||||
|
||||
pos = hostapd_eid_ht_capabilities_info(hapd, pos);
|
||||
pos = hostapd_eid_ht_operation(hapd, pos);
|
||||
|
@ -395,8 +395,8 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
|
|||
tailpos = hostapd_eid_wpa(hapd, tailpos, tail + BEACON_TAIL_BUF_SIZE -
|
||||
tailpos, NULL);
|
||||
|
||||
/* Wi-Fi Wireless Multimedia Extensions */
|
||||
tailpos = hostapd_eid_wme(hapd, tailpos);
|
||||
/* Wi-Fi Alliance WMM */
|
||||
tailpos = hostapd_eid_wmm(hapd, tailpos);
|
||||
|
||||
#ifdef CONFIG_IEEE80211N
|
||||
if (hapd->iconf->ieee80211n) {
|
||||
|
|
|
@ -204,13 +204,13 @@ static struct hostapd_config * hostapd_config_defaults(void)
|
|||
struct hostapd_bss_config *bss;
|
||||
int i;
|
||||
const int aCWmin = 15, aCWmax = 1024;
|
||||
const struct hostapd_wme_ac_params ac_bk =
|
||||
const struct hostapd_wmm_ac_params ac_bk =
|
||||
{ aCWmin, aCWmax, 7, 0, 0 }; /* background traffic */
|
||||
const struct hostapd_wme_ac_params ac_be =
|
||||
const struct hostapd_wmm_ac_params ac_be =
|
||||
{ aCWmin, aCWmax, 3, 0, 0 }; /* best effort traffic */
|
||||
const struct hostapd_wme_ac_params ac_vi = /* video traffic */
|
||||
const struct hostapd_wmm_ac_params ac_vi = /* video traffic */
|
||||
{ aCWmin >> 1, aCWmin, 2, 3000 / 32, 1 };
|
||||
const struct hostapd_wme_ac_params ac_vo = /* voice traffic */
|
||||
const struct hostapd_wmm_ac_params ac_vo = /* voice traffic */
|
||||
{ aCWmin >> 2, aCWmin >> 1, 2, 1500 / 32, 1 };
|
||||
|
||||
conf = os_zalloc(sizeof(*conf));
|
||||
|
@ -253,10 +253,10 @@ static struct hostapd_config * hostapd_config_defaults(void)
|
|||
for (i = 0; i < NUM_TX_QUEUES; i++)
|
||||
conf->tx_queue[i].aifs = -1; /* use hw default */
|
||||
|
||||
conf->wme_ac_params[0] = ac_be;
|
||||
conf->wme_ac_params[1] = ac_bk;
|
||||
conf->wme_ac_params[2] = ac_vi;
|
||||
conf->wme_ac_params[3] = ac_vo;
|
||||
conf->wmm_ac_params[0] = ac_be;
|
||||
conf->wmm_ac_params[1] = ac_bk;
|
||||
conf->wmm_ac_params[2] = ac_vi;
|
||||
conf->wmm_ac_params[3] = ac_vo;
|
||||
|
||||
#ifdef CONFIG_IEEE80211N
|
||||
conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED;
|
||||
|
@ -1170,14 +1170,14 @@ static int hostapd_config_tx_queue(struct hostapd_config *conf, char *name,
|
|||
}
|
||||
|
||||
|
||||
static int hostapd_config_wme_ac(struct hostapd_config *conf, char *name,
|
||||
char *val)
|
||||
static int hostapd_config_wmm_ac(struct hostapd_config *conf, char *name,
|
||||
char *val)
|
||||
{
|
||||
int num, v;
|
||||
char *pos;
|
||||
struct hostapd_wme_ac_params *ac;
|
||||
struct hostapd_wmm_ac_params *ac;
|
||||
|
||||
/* skip 'wme_ac_' prefix */
|
||||
/* skip 'wme_ac_' or 'wmm_ac_' prefix */
|
||||
pos = name + 7;
|
||||
if (os_strncmp(pos, "be_", 3) == 0) {
|
||||
num = 0;
|
||||
|
@ -1192,11 +1192,11 @@ static int hostapd_config_wme_ac(struct hostapd_config *conf, char *name,
|
|||
num = 3;
|
||||
pos += 3;
|
||||
} else {
|
||||
wpa_printf(MSG_ERROR, "Unknown wme name '%s'", pos);
|
||||
wpa_printf(MSG_ERROR, "Unknown WMM name '%s'", pos);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ac = &conf->wme_ac_params[num];
|
||||
ac = &conf->wmm_ac_params[num];
|
||||
|
||||
if (os_strcmp(pos, "aifs") == 0) {
|
||||
v = atoi(val);
|
||||
|
@ -1225,7 +1225,7 @@ static int hostapd_config_wme_ac(struct hostapd_config *conf, char *name,
|
|||
wpa_printf(MSG_ERROR, "Invalid txop value %d", v);
|
||||
return -1;
|
||||
}
|
||||
ac->txopLimit = v;
|
||||
ac->txop_limit = v;
|
||||
} else if (os_strcmp(pos, "acm") == 0) {
|
||||
v = atoi(val);
|
||||
if (v < 0 || v > 1) {
|
||||
|
@ -1234,7 +1234,7 @@ static int hostapd_config_wme_ac(struct hostapd_config *conf, char *name,
|
|||
}
|
||||
ac->admission_control_mandatory = v;
|
||||
} else {
|
||||
wpa_printf(MSG_ERROR, "Unknown wme_ac_ field '%s'", pos);
|
||||
wpa_printf(MSG_ERROR, "Unknown wmm_ac_ field '%s'", pos);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -2080,11 +2080,13 @@ struct hostapd_config * hostapd_config_read(const char *fname)
|
|||
"queue item", line);
|
||||
errors++;
|
||||
}
|
||||
} else if (os_strcmp(buf, "wme_enabled") == 0) {
|
||||
bss->wme_enabled = atoi(pos);
|
||||
} else if (os_strncmp(buf, "wme_ac_", 7) == 0) {
|
||||
if (hostapd_config_wme_ac(conf, buf, pos)) {
|
||||
wpa_printf(MSG_ERROR, "Line %d: invalid wme "
|
||||
} else if (os_strcmp(buf, "wme_enabled") == 0 ||
|
||||
os_strcmp(buf, "wmm_enabled") == 0) {
|
||||
bss->wmm_enabled = atoi(pos);
|
||||
} else if (os_strncmp(buf, "wme_ac_", 7) == 0 ||
|
||||
os_strncmp(buf, "wmm_ac_", 7) == 0) {
|
||||
if (hostapd_config_wmm_ac(conf, buf, pos)) {
|
||||
wpa_printf(MSG_ERROR, "Line %d: invalid WMM "
|
||||
"ac item", line);
|
||||
errors++;
|
||||
}
|
||||
|
|
|
@ -135,11 +135,11 @@ struct hostapd_tx_queue_params {
|
|||
int configured;
|
||||
};
|
||||
|
||||
struct hostapd_wme_ac_params {
|
||||
struct hostapd_wmm_ac_params {
|
||||
int cwmin;
|
||||
int cwmax;
|
||||
int aifs;
|
||||
int txopLimit; /* in units of 32us */
|
||||
int txop_limit; /* in units of 32us */
|
||||
int admission_control_mandatory;
|
||||
};
|
||||
|
||||
|
@ -271,7 +271,7 @@ struct hostapd_bss_config {
|
|||
int ap_max_inactivity;
|
||||
int ignore_broadcast_ssid;
|
||||
|
||||
int wme_enabled;
|
||||
int wmm_enabled;
|
||||
|
||||
struct hostapd_vlan *vlan, *vlan_tail;
|
||||
|
||||
|
@ -371,13 +371,13 @@ struct hostapd_config {
|
|||
struct hostapd_tx_queue_params tx_queue[NUM_TX_QUEUES];
|
||||
|
||||
/*
|
||||
* WME AC parameters, in same order as 802.1D, i.e.
|
||||
* WMM AC parameters, in same order as 802.1D, i.e.
|
||||
* 0 = BE (best effort)
|
||||
* 1 = BK (background)
|
||||
* 2 = VI (video)
|
||||
* 3 = VO (voice)
|
||||
*/
|
||||
struct hostapd_wme_ac_params wme_ac_params[4];
|
||||
struct hostapd_wmm_ac_params wmm_ac_params[4];
|
||||
|
||||
enum {
|
||||
INTERNAL_BRIDGE_DO_NOT_CONTROL = -1,
|
||||
|
|
|
@ -913,7 +913,7 @@ static int i802_sta_set_flags(void *priv, const u8 *addr,
|
|||
if (total_flags & WLAN_STA_AUTHORIZED || !drv->ieee802_1x_active)
|
||||
NLA_PUT_FLAG(flags, NL80211_STA_FLAG_AUTHORIZED);
|
||||
|
||||
if (total_flags & WLAN_STA_WME)
|
||||
if (total_flags & WLAN_STA_WMM)
|
||||
NLA_PUT_FLAG(flags, NL80211_STA_FLAG_WME);
|
||||
|
||||
if (total_flags & WLAN_STA_SHORT_PREAMBLE)
|
||||
|
|
|
@ -103,7 +103,7 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
if (!hapd->conf->ieee802_1x && !hapd->conf->wpa)
|
||||
accounting_sta_start(hapd, sta);
|
||||
|
||||
hostapd_wme_sta_config(hapd, sta);
|
||||
hostapd_wmm_sta_config(hapd, sta);
|
||||
|
||||
/* Start IEEE 802.1X authentication process for new stations */
|
||||
ieee802_1x_new_station(hapd, sta);
|
||||
|
|
|
@ -229,7 +229,7 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
|
|||
wconf->rsn_preauth = conf->rsn_preauth;
|
||||
wconf->eapol_version = conf->eapol_version;
|
||||
wconf->peerkey = conf->peerkey;
|
||||
wconf->wme_enabled = conf->wme_enabled;
|
||||
wconf->wmm_enabled = conf->wmm_enabled;
|
||||
wconf->okc = conf->okc;
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
wconf->ieee80211w = conf->ieee80211w;
|
||||
|
@ -388,7 +388,7 @@ static void hostapd_dump_state(struct hostapd_data *hapd)
|
|||
(sta->flags & WLAN_STA_SHORT_PREAMBLE ?
|
||||
"[SHORT_PREAMBLE]" : ""),
|
||||
(sta->flags & WLAN_STA_PREAUTH ? "[PREAUTH]" : ""),
|
||||
(sta->flags & WLAN_STA_WME ? "[WME]" : ""),
|
||||
(sta->flags & WLAN_STA_WMM ? "[WMM]" : ""),
|
||||
(sta->flags & WLAN_STA_MFP ? "[MFP]" : ""),
|
||||
(sta->flags & WLAN_STA_WPS ? "[WPS]" : ""),
|
||||
(sta->flags & WLAN_STA_MAYBE_WPS ? "[MAYBE_WPS]" : ""),
|
||||
|
|
|
@ -273,38 +273,38 @@ ignore_broadcast_ssid=0
|
|||
# note - here cwMin and cmMax are in exponent form. the actual cw value used
|
||||
# will be (2^n)-1 where n is the value given here
|
||||
#
|
||||
wme_enabled=1
|
||||
wmm_enabled=1
|
||||
#
|
||||
# Low priority / AC_BK = background
|
||||
wme_ac_bk_cwmin=4
|
||||
wme_ac_bk_cwmax=10
|
||||
wme_ac_bk_aifs=7
|
||||
wme_ac_bk_txop_limit=0
|
||||
wme_ac_bk_acm=0
|
||||
wmm_ac_bk_cwmin=4
|
||||
wmm_ac_bk_cwmax=10
|
||||
wmm_ac_bk_aifs=7
|
||||
wmm_ac_bk_txop_limit=0
|
||||
wmm_ac_bk_acm=0
|
||||
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10
|
||||
#
|
||||
# Normal priority / AC_BE = best effort
|
||||
wme_ac_be_aifs=3
|
||||
wme_ac_be_cwmin=4
|
||||
wme_ac_be_cwmax=10
|
||||
wme_ac_be_txop_limit=0
|
||||
wme_ac_be_acm=0
|
||||
wmm_ac_be_aifs=3
|
||||
wmm_ac_be_cwmin=4
|
||||
wmm_ac_be_cwmax=10
|
||||
wmm_ac_be_txop_limit=0
|
||||
wmm_ac_be_acm=0
|
||||
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7
|
||||
#
|
||||
# High priority / AC_VI = video
|
||||
wme_ac_vi_aifs=2
|
||||
wme_ac_vi_cwmin=3
|
||||
wme_ac_vi_cwmax=4
|
||||
wme_ac_vi_txop_limit=94
|
||||
wme_ac_vi_acm=0
|
||||
wmm_ac_vi_aifs=2
|
||||
wmm_ac_vi_cwmin=3
|
||||
wmm_ac_vi_cwmax=4
|
||||
wmm_ac_vi_txop_limit=94
|
||||
wmm_ac_vi_acm=0
|
||||
# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188
|
||||
#
|
||||
# Highest priority / AC_VO = voice
|
||||
wme_ac_vo_aifs=2
|
||||
wme_ac_vo_cwmin=2
|
||||
wme_ac_vo_cwmax=3
|
||||
wme_ac_vo_txop_limit=47
|
||||
wme_ac_vo_acm=0
|
||||
wmm_ac_vo_aifs=2
|
||||
wmm_ac_vo_cwmin=2
|
||||
wmm_ac_vo_cwmax=3
|
||||
wmm_ac_vo_txop_limit=47
|
||||
wmm_ac_vo_acm=0
|
||||
# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102
|
||||
|
||||
# Static WEP key configuration
|
||||
|
@ -375,6 +375,7 @@ wme_ac_vo_acm=0
|
|||
# ieee80211n: Whether IEEE 802.11n (HT) is enabled
|
||||
# 0 = disabled (default)
|
||||
# 1 = enabled
|
||||
# Note: You will also need to enable WMM for full HT functionality.
|
||||
#ieee80211n=1
|
||||
|
||||
# ht_capab: HT capabilities (list of flags)
|
||||
|
|
|
@ -766,16 +766,16 @@ static void handle_assoc(struct hostapd_data *hapd,
|
|||
goto fail;
|
||||
}
|
||||
|
||||
sta->flags &= ~WLAN_STA_WME;
|
||||
if (elems.wme && hapd->conf->wme_enabled) {
|
||||
if (hostapd_eid_wme_valid(hapd, elems.wme, elems.wme_len))
|
||||
sta->flags &= ~WLAN_STA_WMM;
|
||||
if (elems.wmm && hapd->conf->wmm_enabled) {
|
||||
if (hostapd_eid_wmm_valid(hapd, elems.wmm, elems.wmm_len))
|
||||
hostapd_logger(hapd, sta->addr,
|
||||
HOSTAPD_MODULE_WPA,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
"invalid WME element in association "
|
||||
"invalid WMM element in association "
|
||||
"request");
|
||||
else
|
||||
sta->flags |= WLAN_STA_WME;
|
||||
sta->flags |= WLAN_STA_WMM;
|
||||
}
|
||||
|
||||
if (!elems.supp_rates) {
|
||||
|
@ -1124,8 +1124,8 @@ static void handle_assoc(struct hostapd_data *hapd,
|
|||
p = hostapd_eid_supp_rates(hapd, reply->u.assoc_resp.variable);
|
||||
/* Extended supported rates */
|
||||
p = hostapd_eid_ext_supp_rates(hapd, p);
|
||||
if (sta->flags & WLAN_STA_WME)
|
||||
p = hostapd_eid_wme(hapd, p);
|
||||
if (sta->flags & WLAN_STA_WMM)
|
||||
p = hostapd_eid_wmm(hapd, p);
|
||||
|
||||
p = hostapd_eid_ht_capabilities_info(hapd, p);
|
||||
p = hostapd_eid_ht_operation(hapd, p);
|
||||
|
@ -1366,7 +1366,7 @@ static void handle_action(struct hostapd_data *hapd,
|
|||
}
|
||||
#endif /* CONFIG_IEEE80211R */
|
||||
case WLAN_ACTION_WMM:
|
||||
hostapd_wme_action(hapd, mgmt, len);
|
||||
hostapd_wmm_action(hapd, mgmt, len);
|
||||
return;
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
case WLAN_ACTION_SA_QUERY:
|
||||
|
|
170
hostapd/wme.c
170
hostapd/wme.c
|
@ -24,47 +24,50 @@
|
|||
|
||||
/* TODO: maintain separate sequence and fragment numbers for each AC
|
||||
* TODO: IGMP snooping to track which multicasts to forward - and use QOS-DATA
|
||||
* if only WME stations are receiving a certain group */
|
||||
* if only WMM stations are receiving a certain group */
|
||||
|
||||
|
||||
static u8 wme_oui[3] = { 0x00, 0x50, 0xf2 };
|
||||
static u8 wmm_oui[3] = { 0x00, 0x50, 0xf2 };
|
||||
|
||||
|
||||
/* Add WME Parameter Element to Beacon and Probe Response frames. */
|
||||
u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid)
|
||||
/*
|
||||
* Add WMM Parameter Element to Beacon, Probe Response, and (Re)Association
|
||||
* Response frames.
|
||||
*/
|
||||
u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid)
|
||||
{
|
||||
u8 *pos = eid;
|
||||
struct wme_parameter_element *wme =
|
||||
(struct wme_parameter_element *) (pos + 2);
|
||||
struct wmm_parameter_element *wmm =
|
||||
(struct wmm_parameter_element *) (pos + 2);
|
||||
int e;
|
||||
|
||||
if (!hapd->conf->wme_enabled)
|
||||
if (!hapd->conf->wmm_enabled)
|
||||
return eid;
|
||||
eid[0] = WLAN_EID_VENDOR_SPECIFIC;
|
||||
wme->oui[0] = 0x00;
|
||||
wme->oui[1] = 0x50;
|
||||
wme->oui[2] = 0xf2;
|
||||
wme->oui_type = WME_OUI_TYPE;
|
||||
wme->oui_subtype = WME_OUI_SUBTYPE_PARAMETER_ELEMENT;
|
||||
wme->version = WME_VERSION;
|
||||
wme->acInfo = hapd->parameter_set_count & 0xf;
|
||||
wmm->oui[0] = 0x00;
|
||||
wmm->oui[1] = 0x50;
|
||||
wmm->oui[2] = 0xf2;
|
||||
wmm->oui_type = WMM_OUI_TYPE;
|
||||
wmm->oui_subtype = WMM_OUI_SUBTYPE_PARAMETER_ELEMENT;
|
||||
wmm->version = WMM_VERSION;
|
||||
wmm->qos_info = hapd->parameter_set_count & 0xf;
|
||||
|
||||
/* fill in a parameter set record for each AC */
|
||||
for (e = 0; e < 4; e++) {
|
||||
struct wme_ac_parameter *ac = &wme->ac[e];
|
||||
struct hostapd_wme_ac_params *acp =
|
||||
&hapd->iconf->wme_ac_params[e];
|
||||
struct wmm_ac_parameter *ac = &wmm->ac[e];
|
||||
struct hostapd_wmm_ac_params *acp =
|
||||
&hapd->iconf->wmm_ac_params[e];
|
||||
|
||||
ac->aifsn = acp->aifs;
|
||||
ac->acm = acp->admission_control_mandatory;
|
||||
ac->aci = e;
|
||||
ac->reserved = 0;
|
||||
ac->eCWmin = acp->cwmin;
|
||||
ac->eCWmax = acp->cwmax;
|
||||
ac->txopLimit = host_to_le16(acp->txopLimit);
|
||||
ac->e_cw_min = acp->cwmin;
|
||||
ac->e_cw_max = acp->cwmax;
|
||||
ac->txop_limit = host_to_le16(acp->txop_limit);
|
||||
}
|
||||
|
||||
pos = (u8 *) (wme + 1);
|
||||
pos = (u8 *) (wmm + 1);
|
||||
eid[1] = pos - eid - 2; /* element length */
|
||||
|
||||
return pos;
|
||||
|
@ -72,30 +75,30 @@ u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid)
|
|||
|
||||
|
||||
/* This function is called when a station sends an association request with
|
||||
* WME info element. The function returns zero on success or non-zero on any
|
||||
* error in WME element. eid does not include Element ID and Length octets. */
|
||||
int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
|
||||
* WMM info element. The function returns zero on success or non-zero on any
|
||||
* error in WMM element. eid does not include Element ID and Length octets. */
|
||||
int hostapd_eid_wmm_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
|
||||
{
|
||||
struct wme_information_element *wme;
|
||||
struct wmm_information_element *wmm;
|
||||
|
||||
wpa_hexdump(MSG_MSGDUMP, "WME IE", eid, len);
|
||||
wpa_hexdump(MSG_MSGDUMP, "WMM IE", eid, len);
|
||||
|
||||
if (len < sizeof(struct wme_information_element)) {
|
||||
wpa_printf(MSG_DEBUG, "Too short WME IE (len=%lu)",
|
||||
if (len < sizeof(struct wmm_information_element)) {
|
||||
wpa_printf(MSG_DEBUG, "Too short WMM IE (len=%lu)",
|
||||
(unsigned long) len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
wme = (struct wme_information_element *) eid;
|
||||
wpa_printf(MSG_DEBUG, "Validating WME IE: OUI %02x:%02x:%02x "
|
||||
wmm = (struct wmm_information_element *) eid;
|
||||
wpa_printf(MSG_DEBUG, "Validating WMM IE: OUI %02x:%02x:%02x "
|
||||
"OUI type %d OUI sub-type %d version %d",
|
||||
wme->oui[0], wme->oui[1], wme->oui[2], wme->oui_type,
|
||||
wme->oui_subtype, wme->version);
|
||||
if (os_memcmp(wme->oui, wme_oui, sizeof(wme_oui)) != 0 ||
|
||||
wme->oui_type != WME_OUI_TYPE ||
|
||||
wme->oui_subtype != WME_OUI_SUBTYPE_INFORMATION_ELEMENT ||
|
||||
wme->version != WME_VERSION) {
|
||||
wpa_printf(MSG_DEBUG, "Unsupported WME IE OUI/Type/Subtype/"
|
||||
wmm->oui[0], wmm->oui[1], wmm->oui[2], wmm->oui_type,
|
||||
wmm->oui_subtype, wmm->version);
|
||||
if (os_memcmp(wmm->oui, wmm_oui, sizeof(wmm_oui)) != 0 ||
|
||||
wmm->oui_type != WMM_OUI_TYPE ||
|
||||
wmm->oui_subtype != WMM_OUI_SUBTYPE_INFORMATION_ELEMENT ||
|
||||
wmm->version != WMM_VERSION) {
|
||||
wpa_printf(MSG_DEBUG, "Unsupported WMM IE OUI/Type/Subtype/"
|
||||
"Version");
|
||||
return -1;
|
||||
}
|
||||
|
@ -105,31 +108,30 @@ int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
|
|||
|
||||
|
||||
/* This function is called when a station sends an ACK frame for an AssocResp
|
||||
* frame (status=success) and the matching AssocReq contained a WME element.
|
||||
* frame (status=success) and the matching AssocReq contained a WMM element.
|
||||
*/
|
||||
int hostapd_wme_sta_config(struct hostapd_data *hapd, struct sta_info *sta)
|
||||
int hostapd_wmm_sta_config(struct hostapd_data *hapd, struct sta_info *sta)
|
||||
{
|
||||
/* update kernel STA data for WME related items (WLAN_STA_WPA flag) */
|
||||
if (sta->flags & WLAN_STA_WME)
|
||||
/* update kernel STA data for WMM related items (WLAN_STA_WPA flag) */
|
||||
if (sta->flags & WLAN_STA_WMM)
|
||||
hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
||||
WLAN_STA_WME, ~0);
|
||||
WLAN_STA_WMM, ~0);
|
||||
else
|
||||
hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
||||
0, ~WLAN_STA_WME);
|
||||
0, ~WLAN_STA_WMM);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void wme_send_action(struct hostapd_data *hapd, const u8 *addr,
|
||||
const struct wme_tspec_info_element *tspec,
|
||||
static void wmm_send_action(struct hostapd_data *hapd, const u8 *addr,
|
||||
const struct wmm_tspec_element *tspec,
|
||||
u8 action_code, u8 dialogue_token, u8 status_code)
|
||||
{
|
||||
u8 buf[256];
|
||||
struct ieee80211_mgmt *m = (struct ieee80211_mgmt *) buf;
|
||||
struct wme_tspec_info_element *t =
|
||||
(struct wme_tspec_info_element *)
|
||||
m->u.action.u.wme_action.variable;
|
||||
struct wmm_tspec_element *t = (struct wmm_tspec_element *)
|
||||
m->u.action.u.wmm_action.variable;
|
||||
int len;
|
||||
|
||||
hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
|
||||
|
@ -142,21 +144,21 @@ static void wme_send_action(struct hostapd_data *hapd, const u8 *addr,
|
|||
os_memcpy(m->sa, hapd->own_addr, ETH_ALEN);
|
||||
os_memcpy(m->bssid, hapd->own_addr, ETH_ALEN);
|
||||
m->u.action.category = WLAN_ACTION_WMM;
|
||||
m->u.action.u.wme_action.action_code = action_code;
|
||||
m->u.action.u.wme_action.dialog_token = dialogue_token;
|
||||
m->u.action.u.wme_action.status_code = status_code;
|
||||
os_memcpy(t, tspec, sizeof(struct wme_tspec_info_element));
|
||||
m->u.action.u.wmm_action.action_code = action_code;
|
||||
m->u.action.u.wmm_action.dialog_token = dialogue_token;
|
||||
m->u.action.u.wmm_action.status_code = status_code;
|
||||
os_memcpy(t, tspec, sizeof(struct wmm_tspec_element));
|
||||
len = ((u8 *) (t + 1)) - buf;
|
||||
|
||||
if (hostapd_send_mgmt_frame(hapd, m, len, 0) < 0)
|
||||
perror("wme_send_action: send");
|
||||
perror("wmm_send_action: send");
|
||||
}
|
||||
|
||||
|
||||
/* given frame data payload size in bytes, and data_rate in bits per second
|
||||
* returns time to complete frame exchange */
|
||||
/* FIX: should not use floating point types */
|
||||
static double wme_frame_exchange_time(int bytes, int data_rate, int encryption,
|
||||
static double wmm_frame_exchange_time(int bytes, int data_rate, int encryption,
|
||||
int cts_protection)
|
||||
{
|
||||
/* TODO: account for MAC/PHY headers correctly */
|
||||
|
@ -168,9 +170,9 @@ static double wme_frame_exchange_time(int bytes, int data_rate, int encryption,
|
|||
}
|
||||
|
||||
|
||||
static void wme_setup_request(struct hostapd_data *hapd,
|
||||
struct ieee80211_mgmt *mgmt,
|
||||
struct wme_tspec_info_element *tspec, size_t len)
|
||||
static void wmm_addts_req(struct hostapd_data *hapd,
|
||||
struct ieee80211_mgmt *mgmt,
|
||||
struct wmm_tspec_element *tspec, size_t len)
|
||||
{
|
||||
/* FIX: should not use floating point types */
|
||||
double medium_time, pps;
|
||||
|
@ -178,19 +180,22 @@ static void wme_setup_request(struct hostapd_data *hapd,
|
|||
/* TODO: account for airtime and answer no to tspec setup requests
|
||||
* when none left!! */
|
||||
|
||||
pps = (tspec->mean_data_rate / 8.0) / tspec->nominal_msdu_size;
|
||||
medium_time = (tspec->surplus_bandwidth_allowance / 8) * pps *
|
||||
wme_frame_exchange_time(tspec->nominal_msdu_size,
|
||||
tspec->minimum_phy_rate, 0, 0);
|
||||
tspec->medium_time = medium_time * 1000000.0 / 32.0;
|
||||
pps = (le_to_host32(tspec->mean_data_rate) / 8.0) /
|
||||
le_to_host16(tspec->nominal_msdu_size);
|
||||
medium_time = (le_to_host16(tspec->surplus_bandwidth_allowance) / 8) *
|
||||
pps *
|
||||
wmm_frame_exchange_time(le_to_host16(tspec->nominal_msdu_size),
|
||||
le_to_host32(tspec->minimum_phy_rate),
|
||||
0, 0);
|
||||
tspec->medium_time = host_to_le16(medium_time * 1000000.0 / 32.0);
|
||||
|
||||
wme_send_action(hapd, mgmt->sa, tspec, WME_ACTION_CODE_SETUP_RESPONSE,
|
||||
mgmt->u.action.u.wme_action.dialog_token,
|
||||
WME_SETUP_RESPONSE_STATUS_ADMISSION_ACCEPTED);
|
||||
wmm_send_action(hapd, mgmt->sa, tspec, WMM_ACTION_CODE_ADDTS_RESP,
|
||||
mgmt->u.action.u.wmm_action.dialog_token,
|
||||
WMM_ADDTS_STATUS_ADMISSION_ACCEPTED);
|
||||
}
|
||||
|
||||
|
||||
void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
||||
void hostapd_wmm_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
||||
size_t len)
|
||||
{
|
||||
int action_code;
|
||||
|
@ -201,11 +206,11 @@ void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
|||
|
||||
/* check that the request comes from a valid station */
|
||||
if (!sta ||
|
||||
(sta->flags & (WLAN_STA_ASSOC | WLAN_STA_WME)) !=
|
||||
(WLAN_STA_ASSOC | WLAN_STA_WME)) {
|
||||
(sta->flags & (WLAN_STA_ASSOC | WLAN_STA_WMM)) !=
|
||||
(WLAN_STA_ASSOC | WLAN_STA_WMM)) {
|
||||
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
"wme action received is not from associated wme"
|
||||
"wmm action received is not from associated wmm"
|
||||
" station");
|
||||
/* TODO: respond with action frame refused status code */
|
||||
return;
|
||||
|
@ -215,19 +220,18 @@ void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
|||
if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) {
|
||||
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
"hostapd_wme_action - could not parse wme "
|
||||
"hostapd_wmm_action - could not parse wmm "
|
||||
"action");
|
||||
/* TODO: respond with action frame invalid parameters status
|
||||
* code */
|
||||
return;
|
||||
}
|
||||
|
||||
if (!elems.wme_tspec ||
|
||||
elems.wme_tspec_len != (sizeof(struct wme_tspec_info_element) - 2))
|
||||
{
|
||||
if (!elems.wmm_tspec ||
|
||||
elems.wmm_tspec_len != (sizeof(struct wmm_tspec_element) - 2)) {
|
||||
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
"hostapd_wme_action - missing or wrong length "
|
||||
"hostapd_wmm_action - missing or wrong length "
|
||||
"tspec");
|
||||
/* TODO: respond with action frame invalid parameters status
|
||||
* code */
|
||||
|
@ -237,26 +241,26 @@ void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
|||
/* TODO: check the request is for an AC with ACM set, if not, refuse
|
||||
* request */
|
||||
|
||||
action_code = mgmt->u.action.u.wme_action.action_code;
|
||||
action_code = mgmt->u.action.u.wmm_action.action_code;
|
||||
switch (action_code) {
|
||||
case WME_ACTION_CODE_SETUP_REQUEST:
|
||||
wme_setup_request(hapd, mgmt, (struct wme_tspec_info_element *)
|
||||
elems.wme_tspec, len);
|
||||
case WMM_ACTION_CODE_ADDTS_REQ:
|
||||
wmm_addts_req(hapd, mgmt, (struct wmm_tspec_element *)
|
||||
(elems.wmm_tspec - 2), len);
|
||||
return;
|
||||
#if 0
|
||||
/* TODO: needed for client implementation */
|
||||
case WME_ACTION_CODE_SETUP_RESPONSE:
|
||||
wme_setup_request(hapd, mgmt, len);
|
||||
case WMM_ACTION_CODE_ADDTS_RESP:
|
||||
wmm_setup_request(hapd, mgmt, len);
|
||||
return;
|
||||
/* TODO: handle station teardown requests */
|
||||
case WME_ACTION_CODE_TEARDOWN:
|
||||
wme_teardown(hapd, mgmt, len);
|
||||
case WMM_ACTION_CODE_DELTS:
|
||||
wmm_teardown(hapd, mgmt, len);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
"hostapd_wme_action - unknown action code %d",
|
||||
"hostapd_wmm_action - unknown action code %d",
|
||||
action_code);
|
||||
}
|
||||
|
|
139
hostapd/wme.h
139
hostapd/wme.h
|
@ -27,104 +27,117 @@
|
|||
* defined(__DragonFly__) */
|
||||
|
||||
|
||||
struct wme_information_element {
|
||||
/* required fields for WME version 1 */
|
||||
u8 oui[3];
|
||||
u8 oui_type;
|
||||
u8 oui_subtype;
|
||||
u8 version;
|
||||
u8 acInfo;
|
||||
/*
|
||||
* WMM Information Element (used in (Re)Association Request frames; may also be
|
||||
* used in Beacon frames)
|
||||
*/
|
||||
struct wmm_information_element {
|
||||
/* Element ID: 221 (0xdd); Length: 7 */
|
||||
/* required fields for WMM version 1 */
|
||||
u8 oui[3]; /* 00:50:f2 */
|
||||
u8 oui_type; /* 2 */
|
||||
u8 oui_subtype; /* 0 */
|
||||
u8 version; /* 1 for WMM version 1.0 */
|
||||
u8 qos_info; /* AP/STA specific QoS info */
|
||||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct wme_ac_parameter {
|
||||
struct wmm_ac_parameter {
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
/* byte 1 */
|
||||
/* byte 1: ACI/AIFSN */
|
||||
u8 aifsn:4,
|
||||
acm:1,
|
||||
aci:2,
|
||||
reserved:1;
|
||||
aci:2,
|
||||
reserved:1;
|
||||
|
||||
/* byte 2 */
|
||||
u8 eCWmin:4,
|
||||
eCWmax:4;
|
||||
/* byte 2: ECWmin/ECWmax (CW = 2^ECW - 1) */
|
||||
u8 e_cw_min:4,
|
||||
e_cw_max:4;
|
||||
#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
/* byte 1 */
|
||||
/* byte 1: ACI/AIFSN */
|
||||
u8 reserved:1,
|
||||
aci:2,
|
||||
acm:1,
|
||||
aifsn:4;
|
||||
aci:2,
|
||||
acm:1,
|
||||
aifsn:4;
|
||||
|
||||
/* byte 2 */
|
||||
u8 eCWmax:4,
|
||||
eCWmin:4;
|
||||
/* byte 2: ECWmin/ECWmax */
|
||||
u8 e_cw_max:4,
|
||||
e_cw_min:4;
|
||||
#else
|
||||
#error "Please fix <endian.h>"
|
||||
#endif
|
||||
|
||||
/* bytes 3 & 4 */
|
||||
le16 txopLimit;
|
||||
le16 txop_limit;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct wme_parameter_element {
|
||||
/* required fields for WME version 1 */
|
||||
u8 oui[3];
|
||||
u8 oui_type;
|
||||
u8 oui_subtype;
|
||||
u8 version;
|
||||
u8 acInfo;
|
||||
u8 reserved;
|
||||
struct wme_ac_parameter ac[4];
|
||||
/*
|
||||
* WMM Parameter Element (used in Beacon, Probe Response, and (Re)Association
|
||||
* Response frmaes)
|
||||
*/
|
||||
struct wmm_parameter_element {
|
||||
/* Element ID: 221 (0xdd); Length: 24 */
|
||||
/* required fields for WMM version 1 */
|
||||
u8 oui[3]; /* 00:50:f2 */
|
||||
u8 oui_type; /* 2 */
|
||||
u8 oui_subtype; /* 1 */
|
||||
u8 version; /* 1 for WMM version 1.0 */
|
||||
u8 qos_info; /* AP/STA specif QoS info */
|
||||
u8 reserved; /* 0 */
|
||||
struct wmm_ac_parameter ac[4]; /* AC_BE, AC_BK, AC_VI, AC_VO */
|
||||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct wme_tspec_info_element {
|
||||
u8 eid;
|
||||
u8 length;
|
||||
u8 oui[3];
|
||||
u8 oui_type;
|
||||
u8 oui_subtype;
|
||||
u8 version;
|
||||
u16 ts_info;
|
||||
u16 nominal_msdu_size;
|
||||
u16 maximum_msdu_size;
|
||||
u32 minimum_service_interval;
|
||||
u32 maximum_service_interval;
|
||||
u32 inactivity_interval;
|
||||
u32 start_time;
|
||||
u32 minimum_data_rate;
|
||||
u32 mean_data_rate;
|
||||
u32 maximum_burst_size;
|
||||
u32 minimum_phy_rate;
|
||||
u32 peak_data_rate;
|
||||
u32 delay_bound;
|
||||
u16 surplus_bandwidth_allowance;
|
||||
u16 medium_time;
|
||||
/* WMM TSPEC Element */
|
||||
struct wmm_tspec_element {
|
||||
u8 eid; /* 221 = 0xdd */
|
||||
u8 length; /* 6 + 55 = 61 */
|
||||
u8 oui[3]; /* 00:50:f2 */
|
||||
u8 oui_type; /* 2 */
|
||||
u8 oui_subtype; /* 2 */
|
||||
u8 version; /* 1 */
|
||||
/* WMM TSPEC body (55 octets): */
|
||||
u8 ts_info[3];
|
||||
le16 nominal_msdu_size;
|
||||
le16 maximum_msdu_size;
|
||||
le32 minimum_service_interval;
|
||||
le32 maximum_service_interval;
|
||||
le32 inactivity_interval;
|
||||
le32 suspension_interval;
|
||||
le32 service_start_time;
|
||||
le32 minimum_data_rate;
|
||||
le32 mean_data_rate;
|
||||
le32 peak_data_rate;
|
||||
le32 maximum_burst_size;
|
||||
le32 delay_bound;
|
||||
le32 minimum_phy_rate;
|
||||
le16 surplus_bandwidth_allowance;
|
||||
le16 medium_time;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
/* Access Categories */
|
||||
/* Access Categories / ACI to AC coding */
|
||||
enum {
|
||||
WME_AC_BK = 1,
|
||||
WME_AC_BE = 0,
|
||||
WME_AC_VI = 2,
|
||||
WME_AC_VO = 3
|
||||
WMM_AC_BE = 0 /* Best Effort */,
|
||||
WMM_AC_BK = 1 /* Background */,
|
||||
WMM_AC_VI = 2 /* Video */,
|
||||
WMM_AC_VO = 3 /* Voice */
|
||||
};
|
||||
|
||||
struct ieee80211_mgmt;
|
||||
|
||||
u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid);
|
||||
int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len);
|
||||
u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid);
|
||||
int hostapd_eid_wmm_valid(struct hostapd_data *hapd, u8 *eid, size_t len);
|
||||
#ifdef NEED_MLME
|
||||
int hostapd_wme_sta_config(struct hostapd_data *hapd, struct sta_info *sta);
|
||||
int hostapd_wmm_sta_config(struct hostapd_data *hapd, struct sta_info *sta);
|
||||
#else /* NEED_MLME */
|
||||
static inline int hostapd_wme_sta_config(struct hostapd_data *hapd,
|
||||
static inline int hostapd_wmm_sta_config(struct hostapd_data *hapd,
|
||||
struct sta_info *sta)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* NEED_MLME */
|
||||
void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
||||
void hostapd_wmm_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
||||
size_t len);
|
||||
|
||||
#endif /* WME_H */
|
||||
|
|
|
@ -141,7 +141,7 @@ struct wpa_auth_config {
|
|||
int rsn_preauth;
|
||||
int eapol_version;
|
||||
int peerkey;
|
||||
int wme_enabled;
|
||||
int wmm_enabled;
|
||||
int okc;
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
enum {
|
||||
|
|
|
@ -215,8 +215,8 @@ int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
|
|||
capab |= WPA_CAPABILITY_PREAUTH;
|
||||
if (conf->peerkey)
|
||||
capab |= WPA_CAPABILITY_PEERKEY_ENABLED;
|
||||
if (conf->wme_enabled) {
|
||||
/* 4 PTKSA replay counters when using WME */
|
||||
if (conf->wmm_enabled) {
|
||||
/* 4 PTKSA replay counters when using WMM */
|
||||
capab |= (RSN_NUM_REPLAY_COUNTERS_16 << 2);
|
||||
}
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
|
|
|
@ -49,26 +49,33 @@ static int ieee802_11_parse_vendor_specific(u8 *pos, size_t elen,
|
|||
elems->wpa_ie = pos;
|
||||
elems->wpa_ie_len = elen;
|
||||
break;
|
||||
case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
|
||||
case WMM_OUI_TYPE:
|
||||
/* WMM information element */
|
||||
if (elen < 5) {
|
||||
wpa_printf(MSG_MSGDUMP, "short WME "
|
||||
wpa_printf(MSG_MSGDUMP, "short WMM "
|
||||
"information element ignored "
|
||||
"(len=%lu)",
|
||||
(unsigned long) elen);
|
||||
return -1;
|
||||
}
|
||||
switch (pos[4]) {
|
||||
case WME_OUI_SUBTYPE_INFORMATION_ELEMENT:
|
||||
case WME_OUI_SUBTYPE_PARAMETER_ELEMENT:
|
||||
elems->wme = pos;
|
||||
elems->wme_len = elen;
|
||||
case WMM_OUI_SUBTYPE_INFORMATION_ELEMENT:
|
||||
case WMM_OUI_SUBTYPE_PARAMETER_ELEMENT:
|
||||
/*
|
||||
* Share same pointer since only one of these
|
||||
* is used and they start with same data.
|
||||
* Length field can be used to distinguish the
|
||||
* IEs.
|
||||
*/
|
||||
elems->wmm = pos;
|
||||
elems->wmm_len = elen;
|
||||
break;
|
||||
case WME_OUI_SUBTYPE_TSPEC_ELEMENT:
|
||||
elems->wme_tspec = pos;
|
||||
elems->wme_tspec_len = elen;
|
||||
case WMM_OUI_SUBTYPE_TSPEC_ELEMENT:
|
||||
elems->wmm_tspec = pos;
|
||||
elems->wmm_tspec_len = elen;
|
||||
break;
|
||||
default:
|
||||
wpa_printf(MSG_MSGDUMP, "unknown WME "
|
||||
wpa_printf(MSG_MSGDUMP, "unknown WMM "
|
||||
"information element ignored "
|
||||
"(subtype=%d len=%lu)",
|
||||
pos[4], (unsigned long) elen);
|
||||
|
|
|
@ -41,10 +41,10 @@ struct ieee802_11_elems {
|
|||
u8 wpa_ie_len;
|
||||
u8 *rsn_ie;
|
||||
u8 rsn_ie_len;
|
||||
u8 *wme;
|
||||
u8 wme_len;
|
||||
u8 *wme_tspec;
|
||||
u8 wme_tspec_len;
|
||||
u8 *wmm; /* WMM Information or Parameter Element */
|
||||
u8 wmm_len; /* 7 = WMM Information; 24 = WMM Parameter */
|
||||
u8 *wmm_tspec;
|
||||
u8 wmm_tspec_len;
|
||||
u8 *wps_ie;
|
||||
u8 wps_ie_len;
|
||||
u8 *power_cap;
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
#define WLAN_ACTION_RADIO_MEASUREMENT 5
|
||||
#define WLAN_ACTION_FT 6
|
||||
#define WLAN_ACTION_SA_QUERY 8
|
||||
#define WLAN_ACTION_WMM 17
|
||||
#define WLAN_ACTION_WMM 17 /* WMM Specification 1.1 */
|
||||
|
||||
/* SA Query Action frame (IEEE 802.11w/D7.0, 7.4.9) */
|
||||
#define WLAN_SA_QUERY_REQUEST 0
|
||||
|
@ -301,7 +301,7 @@ struct ieee80211_mgmt {
|
|||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} STRUCT_PACKED wme_action;
|
||||
} STRUCT_PACKED wmm_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 element_id;
|
||||
|
@ -562,23 +562,27 @@ struct mimo_pwr_save_action {
|
|||
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
||||
* 00:50:F2 */
|
||||
|
||||
#define WME_OUI_TYPE 2
|
||||
#define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
||||
#define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1
|
||||
#define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2
|
||||
#define WME_VERSION 1
|
||||
#define WMM_OUI_TYPE 2
|
||||
#define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
||||
#define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
|
||||
#define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
|
||||
#define WMM_VERSION 1
|
||||
|
||||
#define WME_ACTION_CODE_SETUP_REQUEST 0
|
||||
#define WME_ACTION_CODE_SETUP_RESPONSE 1
|
||||
#define WME_ACTION_CODE_TEARDOWN 2
|
||||
#define WMM_ACTION_CODE_ADDTS_REQ 0
|
||||
#define WMM_ACTION_CODE_ADDTS_RESP 1
|
||||
#define WMM_ACTION_CODE_DELTS 2
|
||||
|
||||
#define WME_SETUP_RESPONSE_STATUS_ADMISSION_ACCEPTED 0
|
||||
#define WME_SETUP_RESPONSE_STATUS_INVALID_PARAMETERS 1
|
||||
#define WME_SETUP_RESPONSE_STATUS_REFUSED 3
|
||||
#define WMM_ADDTS_STATUS_ADMISSION_ACCEPTED 0
|
||||
#define WMM_ADDTS_STATUS_INVALID_PARAMETERS 1
|
||||
/* 2 - Reserved */
|
||||
#define WMM_ADDTS_STATUS_REFUSED 3
|
||||
/* 4-255 - Reserved */
|
||||
|
||||
#define WME_TSPEC_DIRECTION_UPLINK 0
|
||||
#define WME_TSPEC_DIRECTION_DOWNLINK 1
|
||||
#define WME_TSPEC_DIRECTION_BI_DIRECTIONAL 3
|
||||
/* WMM TSPEC Direction Field Values */
|
||||
#define WMM_TSPEC_DIRECTION_UPLINK 0
|
||||
#define WMM_TSPEC_DIRECTION_DOWNLINK 1
|
||||
/* 2 - Reserved */
|
||||
#define WMM_TSPEC_DIRECTION_BI_DIRECTIONAL 3
|
||||
|
||||
|
||||
#define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
|
||||
|
|
Loading…
Reference in a new issue