]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow advertising of U-APSD functionality in Beacon
authorYogesh Ashok Powar <yogeshp@marvell.com>
Sun, 11 Apr 2010 08:32:15 +0000 (11:32 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 Apr 2010 08:32:15 +0000 (11:32 +0300)
hostapd does not implement UAPSD functionality. However, if U-APSD
functionality is implemented outside hostapd, add support to advertise
the functionality in beacon.

Signed-off-by: yogeshp@marvell.com
hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h
src/ap/wmm.c
src/ap/wpa_auth.h
src/ap/wpa_auth_glue.c

index 10b7a3597c9d395347a86a5e47b60a5adfa3464d..8916b03db826377f29839d8ac2b17eaaef98ffbe 100644 (file)
@@ -1815,6 +1815,8 @@ struct hostapd_config * hostapd_config_read(const char *fname)
                } else if (os_strcmp(buf, "wme_enabled") == 0 ||
                           os_strcmp(buf, "wmm_enabled") == 0) {
                        bss->wmm_enabled = atoi(pos);
+               } else if (os_strcmp(buf, "uapsd_advertisement_enabled") == 0) {
+                       bss->wmm_uapsd = 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)) {
index 473d6b823bfacfd7de135a8e51cdb990d4e6cd92..041b947cf6a42153fcfb42eea7602906803c0e2a 100644 (file)
@@ -283,6 +283,10 @@ ignore_broadcast_ssid=0
 #
 wmm_enabled=1
 #
+# WMM-PS Unscheduled Automatic Power Save Delivery [U-APSD]
+# Enable this flag if U-APSD supported outside hostapd (eg., Firmware/driver)
+#uapsd_advertisement_enabled=1
+#
 # Low priority / AC_BK = background
 wmm_ac_bk_cwmin=4
 wmm_ac_bk_cwmax=10
index ce3085fe4ed222773a4a38581596c2a857f10577..f509b5bbb197eb951b8bda0afc5586eb47c781a4 100644 (file)
@@ -270,6 +270,7 @@ struct hostapd_bss_config {
        int ignore_broadcast_ssid;
 
        int wmm_enabled;
+       int wmm_uapsd;
 
        struct hostapd_vlan *vlan, *vlan_tail;
 
index bbed83d6f581702dd2161aa69425cb45aba133cd..36681309c3dcfab764247a121a0ee583798b92e6 100644 (file)
@@ -71,6 +71,9 @@ 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)
+               wmm->qos_info |= 0x80;
+
        /* fill in a parameter set record for each AC */
        for (e = 0; e < 4; e++) {
                struct wmm_ac_parameter *ac = &wmm->ac[e];
index daf28518641e0fe510101247cbd86bf000afb97a..d0136c71b6665217563665a0b22abc9862414496 100644 (file)
@@ -142,6 +142,7 @@ struct wpa_auth_config {
        int eapol_version;
        int peerkey;
        int wmm_enabled;
+       int wmm_uapsd;
        int okc;
 #ifdef CONFIG_IEEE80211W
        enum mfp_options ieee80211w;
index 4cc1f61e54832cb2142575d600999be172931d6e..fdaf21467e22c5dc0656f99d1591e89e3ad0efc7 100644 (file)
@@ -47,6 +47,7 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
        wconf->eapol_version = conf->eapol_version;
        wconf->peerkey = conf->peerkey;
        wconf->wmm_enabled = conf->wmm_enabled;
+       wconf->wmm_uapsd = conf->wmm_uapsd;
        wconf->okc = conf->okc;
 #ifdef CONFIG_IEEE80211W
        wconf->ieee80211w = conf->ieee80211w;