HT: Remove SMPS in AP mode

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:
04ee647d58 ("HT: Let the driver advertise its supported SMPS modes for AP mode")
8f461b50cf ("HT: Pass the smps_mode in AP parameters")
da1080d721 ("nl80211: Advertise and configure SMPS modes")

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2020-02-16 13:58:54 +02:00
parent 91ea29a79e
commit 466e48dcd7
12 changed files with 0 additions and 78 deletions

View 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]"))

View 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)

View 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

View 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);

View 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

View 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 "

View 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;

View 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);

View 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;

View 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;

View 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;

View 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;
/*