6 GHz regulatory domains introduces different modes for 6 GHz AP operation - Low Power Indoor(LPI), Standard Power(SP) and Very Low Power(VLP). 6 GHz STAs could be operated as either Regular or Subordinate clients. We have separate definitions of AP and client. However, IEEE80211_REG_UNSET_* is not a defined power type. Hence, remove IEEE80211_REG_UNSET_* from both AP and client power mode enums. To demonstrate unset or invalid type, (IEEE80211_REG_*_POWER_MAX + 1) value can be used instead. Signed-off-by: Aditya Kumar Singh <quic_adisi@xxxxxxxxxxx> --- include/linux/ieee80211.h | 10 ++++------ net/mac80211/util.c | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index f386f9ed41f3..606b5ba8b161 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -2132,18 +2132,17 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, /** * enum ieee80211_ap_reg_power - regulatory power for a Access Point * - * @IEEE80211_REG_UNSET_AP: Access Point has no regulatory power mode * @IEEE80211_REG_LPI: Indoor Access Point * @IEEE80211_REG_SP: Standard power Access Point * @IEEE80211_REG_VLP: Very low power Access Point - * @IEEE80211_REG_AP_POWER_AFTER_LAST: internal + * @IEEE80211_REG_AP_POWER_AFTER_LAST: internal use * @IEEE80211_REG_AP_POWER_MAX: maximum value */ enum ieee80211_ap_reg_power { - IEEE80211_REG_UNSET_AP, IEEE80211_REG_LPI_AP, IEEE80211_REG_SP_AP, IEEE80211_REG_VLP_AP, + /* keep last */ IEEE80211_REG_AP_POWER_AFTER_LAST, IEEE80211_REG_AP_POWER_MAX = IEEE80211_REG_AP_POWER_AFTER_LAST - 1, @@ -2152,16 +2151,15 @@ enum ieee80211_ap_reg_power { /** * enum ieee80211_client_reg_power - regulatory power for a client * - * @IEEE80211_REG_UNSET_CLIENT: Client has no regulatory power mode * @IEEE80211_REG_DEFAULT_CLIENT: Default Client * @IEEE80211_REG_SUBORDINATE_CLIENT: Subordinate Client - * @IEEE80211_REG_CLIENT_POWER_AFTER_LAST: internal + * @IEEE80211_REG_CLIENT_POWER_AFTER_LAST: internal use * @IEEE80211_REG_CLIENT_POWER_MAX: maximum value */ enum ieee80211_client_reg_power { - IEEE80211_REG_UNSET_CLIENT, IEEE80211_REG_DEFAULT_CLIENT, IEEE80211_REG_SUBORDINATE_CLIENT, + /* keep last */ IEEE80211_REG_CLIENT_POWER_AFTER_LAST, IEEE80211_REG_CLIENT_POWER_MAX = IEEE80211_REG_CLIENT_POWER_AFTER_LAST - 1, diff --git a/net/mac80211/util.c b/net/mac80211/util.c index bccc3a309ed0..efdea5c2f2db 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -3524,7 +3524,7 @@ bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata, bss_conf->power_type = IEEE80211_REG_SP_AP; break; default: - bss_conf->power_type = IEEE80211_REG_UNSET_AP; + bss_conf->power_type = IEEE80211_REG_AP_POWER_MAX + 1; break; } -- 2.17.1