]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HT: Remove SMPS in AP mode
authorJouni Malinen <j@w1.fi>
Sun, 16 Feb 2020 11:58:54 +0000 (13:58 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 16 Feb 2020 11:58:54 +0000 (13:58 +0200)
SM Power Save was described in somewhat unclear manner in IEEE Std
802.11n-2009 as far the use of it locally in an AP to save power. That
was clarified in IEEE Std 802.11-2016 to allow only a non-AP STA to use
SMPS while the AP is required to support an associated STA doing so. The
AP itself cannot use SMPS locally and the HT Capability advertisement
for this is not appropriate.

Remove the parts of SMPS support that involve the AP using it locally.
In practice, this reverts the following commits:
04ee647d58a2 ("HT: Let the driver advertise its supported SMPS modes for AP mode")
8f461b50cfe4 ("HT: Pass the smps_mode in AP parameters")
da1080d7215f ("nl80211: Advertise and configure SMPS modes")

Signed-off-by: Jouni Malinen <j@w1.fi>
12 files changed:
hostapd/config_file.c
hostapd/hostapd.conf
hostapd/main.c
src/ap/beacon.c
src/ap/hostapd.h
src/ap/hw_features.c
src/drivers/driver.h
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211_capa.c
wpa_supplicant/ap.c
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index 602c4a2b9176c846326d1ee57137f6e04f436fe4..3d7c3ced7fec95daf49c0b029c0fd6fe7492012e 100644 (file)
@@ -1171,14 +1171,6 @@ static int hostapd_config_ht_capab(struct hostapd_config *conf,
        }
        if (!os_strstr(capab, "[HT40+]") && !os_strstr(capab, "[HT40-]"))
                conf->secondary_channel = 0;
-       if (os_strstr(capab, "[SMPS-STATIC]")) {
-               conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK;
-               conf->ht_capab |= HT_CAP_INFO_SMPS_STATIC;
-       }
-       if (os_strstr(capab, "[SMPS-DYNAMIC]")) {
-               conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK;
-               conf->ht_capab |= HT_CAP_INFO_SMPS_DYNAMIC;
-       }
        if (os_strstr(capab, "[GF]"))
                conf->ht_capab |= HT_CAP_INFO_GREEN_FIELD;
        if (os_strstr(capab, "[SHORT-GI-20]"))
index eaffed4e66586b70a2e1a577fa7255d6475a1990..395ddfa00bf9eafa0e83aaddb966e541e6a2196e 100644 (file)
@@ -598,8 +598,6 @@ wmm_ac_vo_acm=0
 #      channels if needed or creation of 40 MHz channel maybe rejected based
 #      on overlapping BSSes. These changes are done automatically when hostapd
 #      is setting up the 40 MHz channel.
-# Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC]
-#      (SMPS disabled if neither is set)
 # HT-greenfield: [GF] (disabled if not set)
 # Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set)
 # Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set)
index 9bca26e352e7cc76087bb41ec4c26774e76d59d8..d3657fcfadbfa2fc9d201e5b39e03df319974966 100644 (file)
@@ -218,7 +218,6 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
                struct wowlan_triggers *triggs;
 
                iface->drv_flags = capa.flags;
-               iface->smps_modes = capa.smps_modes;
                iface->probe_resp_offloads = capa.probe_resp_offloads;
                /*
                 * Use default extended capa values from per-radio information
index 3646245c0c37183955eccf346f7e8bb6cd5b9323..0bab464c2dc3b6778f8d30ac9815d9a58de46b37 100644 (file)
@@ -1326,7 +1326,6 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
                break;
        }
        params->isolate = hapd->conf->isolate;
-       params->smps_mode = hapd->iconf->ht_capab & HT_CAP_INFO_SMPS_MASK;
 #ifdef NEED_AP_MLME
        params->cts_protect = !!(ieee802_11_erp_info(hapd) &
                                ERP_INFO_USE_PROTECTION);
index 2358d1664e8b0b14d36196d9f17b731d63e7d614..7605041d164cd48d4a0715de66f6bab69be4003e 100644 (file)
@@ -463,9 +463,6 @@ struct hostapd_iface {
 
        u64 drv_flags;
 
-       /* SMPS modes supported by the driver (WPA_DRIVER_SMPS_MODE_*) */
-       unsigned int smps_modes;
-
        /*
         * A bitmap of supported protocols for probe response offload. See
         * struct wpa_driver_capa in driver.h
index 0d856d5725e8dbcbc3dc1d4b86f82120f827c16b..83aecade3bc332ad94ee2dcacd94ead723d5a921 100644 (file)
@@ -561,26 +561,6 @@ static int ieee80211n_supported_ht_capab(struct hostapd_iface *iface)
                return 0;
        }
 
-       switch (conf & HT_CAP_INFO_SMPS_MASK) {
-       case HT_CAP_INFO_SMPS_STATIC:
-               if (!(iface->smps_modes & WPA_DRIVER_SMPS_MODE_STATIC)) {
-                       wpa_printf(MSG_ERROR,
-                                  "Driver does not support configured HT capability [SMPS-STATIC]");
-                       return 0;
-               }
-               break;
-       case HT_CAP_INFO_SMPS_DYNAMIC:
-               if (!(iface->smps_modes & WPA_DRIVER_SMPS_MODE_DYNAMIC)) {
-                       wpa_printf(MSG_ERROR,
-                                  "Driver does not support configured HT capability [SMPS-DYNAMIC]");
-                       return 0;
-               }
-               break;
-       case HT_CAP_INFO_SMPS_DISABLED:
-       default:
-               break;
-       }
-
        if ((conf & HT_CAP_INFO_GREEN_FIELD) &&
            !(hw & HT_CAP_INFO_GREEN_FIELD)) {
                wpa_printf(MSG_ERROR, "Driver does not support configured "
index caa555bb7580822797ebc84dd0d647913af89d1d..148e4999d3e4a8657d901e1925186bd3c77ec4b3 100644 (file)
@@ -1402,14 +1402,6 @@ struct wpa_driver_ap_params {
         */
        u8 p2p_go_ctwindow;
 
-       /**
-        * smps_mode - SMPS mode
-        *
-        * SMPS mode to be used by the AP, specified as the relevant bits of
-        * ht_capab (i.e. HT_CAP_INFO_SMPS_*).
-        */
-       unsigned int smps_mode;
-
        /**
         * disable_dgaf - Whether group-addressed frames are disabled
         */
@@ -1836,10 +1828,6 @@ struct wpa_driver_capa {
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
        (drv_flags & WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE)
 
-#define WPA_DRIVER_SMPS_MODE_STATIC                    0x00000001
-#define WPA_DRIVER_SMPS_MODE_DYNAMIC                   0x00000002
-       unsigned int smps_modes;
-
        unsigned int wmm_ac_supported:1;
 
        unsigned int mac_addr_rand_scan_supported:1;
index f1c98b90b9e47b1e865cfebdc408da1fca3457f5..6c26e8ba893ae4bd621b1f1a3fddec78dee2bd9e 100644 (file)
@@ -4102,7 +4102,6 @@ static int wpa_driver_nl80211_set_ap(void *priv,
        int ret = -ENOBUFS;
        int beacon_set;
        int num_suites;
-       int smps_mode;
        u32 suites[10], suite;
        u32 ver;
 #ifdef CONFIG_MESH
@@ -4235,27 +4234,6 @@ static int wpa_driver_nl80211_set_ap(void *priv,
            nla_put_u32(msg, NL80211_ATTR_CIPHER_SUITE_GROUP, suite))
                goto fail;
 
-       if (params->ht_opmode != -1) {
-               switch (params->smps_mode) {
-               case HT_CAP_INFO_SMPS_DYNAMIC:
-                       wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - dynamic");
-                       smps_mode = NL80211_SMPS_DYNAMIC;
-                       break;
-               case HT_CAP_INFO_SMPS_STATIC:
-                       wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - static");
-                       smps_mode = NL80211_SMPS_STATIC;
-                       break;
-               default:
-                       /* invalid - fallback to smps off */
-               case HT_CAP_INFO_SMPS_DISABLED:
-                       wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - off");
-                       smps_mode = NL80211_SMPS_OFF;
-                       break;
-               }
-               if (nla_put_u8(msg, NL80211_ATTR_SMPS_MODE, smps_mode))
-                       goto fail;
-       }
-
        if (params->beacon_ies) {
                wpa_hexdump_buf(MSG_DEBUG, "nl80211: beacon_ies",
                                params->beacon_ies);
index 6968e8e2a2aa72857feeca22c5d7e682caaa667b..a0f6e52ea7ef5c62bfd622a4ece2d1068e2ea5ad 100644 (file)
@@ -491,12 +491,6 @@ static void wiphy_info_feature_flags(struct wiphy_info_data *info,
        if (flags & NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR)
                info->mac_addr_rand_sched_scan_supported = 1;
 
-       if (flags & NL80211_FEATURE_STATIC_SMPS)
-               capa->smps_modes |= WPA_DRIVER_SMPS_MODE_STATIC;
-
-       if (flags & NL80211_FEATURE_DYNAMIC_SMPS)
-               capa->smps_modes |= WPA_DRIVER_SMPS_MODE_DYNAMIC;
-
        if (flags & NL80211_FEATURE_SUPPORTS_WMM_ADMISSION)
                info->wmm_ac_supported = 1;
 
index e552306d74cf62060591b32801837d4fc157ee83..76607e1219d354bb601fb931f63f0ade57f4cfda 100644 (file)
@@ -839,7 +839,6 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
                return -1;
        hapd_iface->owner = wpa_s;
        hapd_iface->drv_flags = wpa_s->drv_flags;
-       hapd_iface->smps_modes = wpa_s->drv_smps_modes;
        hapd_iface->probe_resp_offloads = wpa_s->probe_resp_offloads;
        hapd_iface->extended_capa = wpa_s->extended_capa;
        hapd_iface->extended_capa_mask = wpa_s->extended_capa_mask;
index 24a7a28e262da91d7b9ab524a8f4a256d22b6ead..e4449d4da2a983cd365203d31c338deada7ede0d 100644 (file)
@@ -6137,7 +6137,6 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
                wpa_s->drv_capa_known = 1;
                wpa_s->drv_flags = capa.flags;
                wpa_s->drv_enc = capa.enc;
-               wpa_s->drv_smps_modes = capa.smps_modes;
                wpa_s->drv_rrm_flags = capa.rrm_flags;
                wpa_s->probe_resp_offloads = capa.probe_resp_offloads;
                wpa_s->max_scan_ssids = capa.max_scan_ssids;
index ac4a1ba4e322ee07c5344cb487c1285e76ec6493..219568a7f25315049138d53d89c7607ca5fbaf25 100644 (file)
@@ -724,7 +724,6 @@ struct wpa_supplicant {
 
        u64 drv_flags;
        unsigned int drv_enc;
-       unsigned int drv_smps_modes;
        unsigned int drv_rrm_flags;
 
        /*