From 0b9c9832b7be9c40abc9dc06bedf3cbf30f31e7f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 14 Mar 2023 08:26:48 +0100 Subject: [PATCH] libnm: mark unused properties "wifi.{rate,tx-power}" as deprecated They were never implemented nor used. --- ...gen-metadata-nm-settings-libnm-core.xml.in | 2 ++ src/libnm-core-impl/nm-setting-wireless.c | 27 +++++++++++-------- src/libnm-core-public/nm-setting-wireless.h | 9 +++++-- src/libnmc-setting/settings-docs.h.in | 4 +-- .../gen-metadata-nm-settings-nmcli.xml.in | 4 +-- 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in index c4133243f..237c5bb1e 100644 --- a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in +++ b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in @@ -124,6 +124,7 @@ gprop-type="guint" /> @@ -140,6 +141,7 @@ gprop-type="GBytes" /> diff --git a/src/libnm-core-impl/nm-setting-wireless.c b/src/libnm-core-impl/nm-setting-wireless.c index 33e16d4b8..5c20604d0 100644 --- a/src/libnm-core-impl/nm-setting-wireless.c +++ b/src/libnm-core-impl/nm-setting-wireless.c @@ -392,6 +392,8 @@ nm_setting_wireless_get_bssid(NMSettingWireless *setting) * @setting: the #NMSettingWireless * * Returns: the #NMSettingWireless:rate property of the setting + * + * Deprecated: 1.44: This setting is not implemented and has no effect. **/ guint32 nm_setting_wireless_get_rate(NMSettingWireless *setting) @@ -406,6 +408,8 @@ nm_setting_wireless_get_rate(NMSettingWireless *setting) * @setting: the #NMSettingWireless * * Returns: the #NMSettingWireless:tx-power property of the setting + * + * Deprecated: 1.44: This setting is not implemented and has no effect. **/ guint32 nm_setting_wireless_get_tx_power(NMSettingWireless *setting) @@ -1434,15 +1438,14 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) /** * NMSettingWireless:rate: * - * If non-zero, directs the device to only use the specified bitrate for - * communication with the access point. Units are in Kb/s, ie 5500 = 5.5 - * Mbit/s. This property is highly driver dependent and not all devices - * support setting a static bitrate. + * This property is not implemented and has no effect. + * + * Deprecated: 1.44: This property is not implemented and has no effect. **/ /* ---ifcfg-rh--- * property: rate * variable: (none) - * description: This property is not handled by ifcfg-rh plugin. + * description: This property is deprecated and not handled by ifcfg-rh plugin. * ---end--- */ _nm_setting_property_define_direct_uint32(properties_override, @@ -1454,19 +1457,20 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) 0, NM_SETTING_PARAM_FUZZY_IGNORE, NMSettingWirelessPrivate, - rate); + rate, + .is_deprecated = TRUE, ); /** * NMSettingWireless:tx-power: * - * If non-zero, directs the device to use the specified transmit power. - * Units are dBm. This property is highly driver dependent and not all - * devices support setting a static transmit power. + * This property is not implemented and has no effect. + * + * Deprecated: 1.44: This property is not implemented and has no effect. **/ /* ---ifcfg-rh--- * property: tx-power * variable: (none) - * description: This property is not handled by ifcfg-rh plugin. + * description: This property is deprecated and not handled by ifcfg-rh plugin. * ---end--- */ _nm_setting_property_define_direct_uint32(properties_override, @@ -1478,7 +1482,8 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) 0, NM_SETTING_PARAM_FUZZY_IGNORE, NMSettingWirelessPrivate, - tx_power); + tx_power, + .is_deprecated = TRUE, ); /** * NMSettingWireless:mac-address: diff --git a/src/libnm-core-public/nm-setting-wireless.h b/src/libnm-core-public/nm-setting-wireless.h index bb1581120..5f8d09c56 100644 --- a/src/libnm-core-public/nm-setting-wireless.h +++ b/src/libnm-core-public/nm-setting-wireless.h @@ -155,8 +155,13 @@ const char *nm_setting_wireless_get_mode(NMSettingWireless *setting); const char *nm_setting_wireless_get_band(NMSettingWireless *setting); guint32 nm_setting_wireless_get_channel(NMSettingWireless *setting); const char *nm_setting_wireless_get_bssid(NMSettingWireless *setting); -guint32 nm_setting_wireless_get_rate(NMSettingWireless *setting); -guint32 nm_setting_wireless_get_tx_power(NMSettingWireless *setting); + +NM_DEPRECATED_IN_1_44 +guint32 nm_setting_wireless_get_rate(NMSettingWireless *setting); + +NM_DEPRECATED_IN_1_44 +guint32 nm_setting_wireless_get_tx_power(NMSettingWireless *setting); + const char *nm_setting_wireless_get_mac_address(NMSettingWireless *setting); const char *nm_setting_wireless_get_cloned_mac_address(NMSettingWireless *setting); diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in index 4e4fb455c..70e70d584 100644 --- a/src/libnmc-setting/settings-docs.h.in +++ b/src/libnmc-setting/settings-docs.h.in @@ -408,10 +408,10 @@ #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MODE N_("Wi-Fi network mode; one of \"infrastructure\", \"mesh\", \"adhoc\" or \"ap\". If blank, infrastructure is assumed.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MTU N_("If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_POWERSAVE N_("One of NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2) (disable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3) (enable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1) (don't touch currently configure setting) or NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0) (use the globally configured value). All other values are reserved.") -#define DESCRIBE_DOC_NM_SETTING_WIRELESS_RATE N_("If non-zero, directs the device to only use the specified bitrate for communication with the access point. Units are in Kb/s, ie 5500 = 5.5 Mbit/s. This property is highly driver dependent and not all devices support setting a static bitrate.") +#define DESCRIBE_DOC_NM_SETTING_WIRELESS_RATE N_("This property is not implemented and has no effect.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_SEEN_BSSIDS N_("A list of BSSIDs (each BSSID formatted as a MAC address like \"00:11:22:33:44:55\") that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_SSID N_("SSID of the Wi-Fi network. Must be specified.") -#define DESCRIBE_DOC_NM_SETTING_WIRELESS_TX_POWER N_("If non-zero, directs the device to use the specified transmit power. Units are dBm. This property is highly driver dependent and not all devices support setting a static transmit power.") +#define DESCRIBE_DOC_NM_SETTING_WIRELESS_TX_POWER N_("This property is not implemented and has no effect.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_WAKE_ON_WLAN N_("The NMSettingWirelessWakeOnWLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY (0x2), NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT (0x4), NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC (0x8), NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE (0x10), NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST (0x20), NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE (0x40), NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE (0x80), NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP (0x100) or the special values NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager).") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_SECURITY_AUTH_ALG N_("When WEP is used (ie, key-mgmt = \"none\" or \"ieee8021x\") indicate the 802.11 authentication algorithm required by the AP here. One of \"open\" for Open System, \"shared\" for Shared Key, or \"leap\" for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = \"ieee8021x\" and auth-alg = \"leap\") the \"leap-username\" and \"leap-password\" properties must be specified.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_SECURITY_FILS N_("Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection. One of NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) (use global default value), NM_SETTING_WIRELESS_SECURITY_FILS_DISABLE (1) (disable FILS), NM_SETTING_WIRELESS_SECURITY_FILS_OPTIONAL (2) (enable FILS if the supplicant and the access point support it) or NM_SETTING_WIRELESS_SECURITY_FILS_REQUIRED (3) (enable FILS and fail if not supported). When set to NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) and no global default is set, FILS will be optionally enabled.") diff --git a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in index 79a7959b8..8ac924c82 100644 --- a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in +++ b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in @@ -31,9 +31,9 @@ + description="This property is not implemented and has no effect." /> + description="This property is not implemented and has no effect." />