aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-12-17 09:45:53 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-17 09:45:53 (GMT)
commit70619a5d8a3d32faa43d66bcb1b670cacf0c243e (patch)
tree23c4670546359ec80a745c62f04efb693cdf32b8 /src
parenta97bde0af453e5e4bbe4b1fdd6883e258730fe10 (diff)
downloadhostap-70619a5d8a3d32faa43d66bcb1b670cacf0c243e.zip
hostap-70619a5d8a3d32faa43d66bcb1b670cacf0c243e.tar.gz
hostap-70619a5d8a3d32faa43d66bcb1b670cacf0c243e.tar.bz2
AP: Consider U-APSD driver support
Check whether the driver advertises support for U-APSD in AP mode, and evaluate wmm_uapsd only in this case. Signed-off-by: Eliad Peller <eliad@wizery.com>
Diffstat (limited to 'src')
-rw-r--r--src/ap/wmm.c3
-rw-r--r--src/drivers/driver.h2
-rw-r--r--src/drivers/driver_nl80211.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/src/ap/wmm.c b/src/ap/wmm.c
index d6d8a10..1d05c4f 100644
--- a/src/ap/wmm.c
+++ b/src/ap/wmm.c
@@ -72,7 +72,8 @@ u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid)
wmm->version = WMM_VERSION;
wmm->qos_info = hapd->parameter_set_count & 0xf;
- if (hapd->conf->wmm_uapsd)
+ if (hapd->conf->wmm_uapsd &&
+ (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_UAPSD))
wmm->qos_info |= 0x80;
wmm->reserved = 0;
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 76c4e8c..98d82e6 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -774,6 +774,8 @@ struct wpa_driver_capa {
#define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP 0x00100000
/* Driver indicates support for Probe Response offloading in AP mode */
#define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD 0x00200000
+/* Driver supports U-APSD in AP mode */
+#define WPA_DRIVER_FLAGS_AP_UAPSD 0x00400000
unsigned int flags;
int max_scan_ssids;
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0a68c5f..e87b702 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2434,6 +2434,9 @@ broken_combination:
/* default to 5000 since early versions of mac80211 don't set it */
capa->max_remain_on_chan = 5000;
+ if (tb[NL80211_ATTR_SUPPORT_AP_UAPSD])
+ capa->flags |= WPA_DRIVER_FLAGS_AP_UAPSD;
+
if (tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION])
capa->max_remain_on_chan =
nla_get_u32(tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION]);