NetworkManager/src/libnm-platform
Beniamino Galvani 5abb113386 wifi: ignore disabled frequencies
Frequencies with the 'disabled' flag are supported by the driver but
disabled in the current regulatory domain. Don't add them to the list
of supported frequencies since they are not usable.

This is especially needed since commit f18bf17dea ('wifi: cleanup
ensure_hotspot_frequency()'), as now NetworkManager explicitly sets a
random, stable channel for Wi-Fi hotspots. If the choosen channel is
disabled, the hotspot fails to start.

Disabled channels are displayed in the 'iw phy' output as '(disabled)':

                [...]
                Frequencies:
                        * 2412 MHz [1] (30.0 dBm)
                        * 2417 MHz [2] (30.0 dBm)
                        * 2422 MHz [3] (30.0 dBm)
                        * 2427 MHz [4] (30.0 dBm)
                        * 2432 MHz [5] (30.0 dBm)
                        * 2437 MHz [6] (30.0 dBm)
                        * 2442 MHz [7] (30.0 dBm)
                        * 2447 MHz [8] (30.0 dBm)
                        * 2452 MHz [9] (30.0 dBm)
                        * 2457 MHz [10] (30.0 dBm)
                        * 2462 MHz [11] (30.0 dBm)
                        * 2467 MHz [12] (disabled)
                        * 2472 MHz [13] (disabled)
                        * 2484 MHz [14] (disabled)

Note that currently NM loads the list only at startup and therefore,
in case of a change of regulatory domain, a restart of the daemon is
needed to have the list updated. This needs to be improved.

https://bugzilla.redhat.com/show_bug.cgi?id=2062785

Fixes: f18bf17dea ('wifi: cleanup ensure_hotspot_frequency()')
2022-03-14 08:50:28 +01:00
..
tests all: suppress wrong gcc-12 warning "-Wdangling-pointer" 2022-02-21 19:50:52 +01:00
wifi wifi: ignore disabled frequencies 2022-03-14 08:50:28 +01:00
wpan format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
meson.build platform: rename "nmp-route-manager.h" to "nmp-rules-manager.h" 2022-02-09 19:13:03 +01:00
nm-linux-platform.c all: prefer nm wrappers to automatically attach GSource to default context 2022-03-13 11:59:42 +01:00
nm-linux-platform.h platform: allow disabling caching of tc objects 2021-09-20 13:27:16 +02:00
nm-netlink.c platform: no need to initialize nla sockaddr parameter to nl_recv() 2022-02-03 13:11:17 +01:00
nm-netlink.h platform/netlink: accept pre-allocated receive buffer for nl_recv() 2022-02-03 13:08:47 +01:00
nm-platform-private.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-platform-utils.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-platform-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-platform.c platform: add Intel vendor command to get the device from CSME 2022-03-07 14:10:19 +02:00
nm-platform.h platform: add Intel vendor command to get the device from CSME 2022-03-07 14:10:19 +02:00
nmp-base.h ethtool: Introducing PAUSE support 2021-05-12 18:04:46 +02:00
nmp-netns.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmp-netns.h build: move "shared/nm-platform" to "src/libnm-platform" 2021-02-24 12:48:17 +01:00
nmp-object.c platform: add support for blackhole,unreachable,prohibit route type 2022-02-09 19:13:03 +01:00
nmp-object.h all: drop /*<skip>*/ annotations for enums 2022-02-08 11:14:01 +01:00
nmp-route-manager.c platform: improve way to prune dirty route-manager entries 2022-02-09 19:13:05 +01:00
nmp-route-manager.h platform: improve way to prune dirty route-manager entries 2022-02-09 19:13:05 +01:00
README.md platform: support IPv6 mulitpath routes and fix cache inconsistency 2022-02-16 09:59:49 +01:00

libnm-platform

A static helper library that provides NMPlatform and other utils. This is NetworkManager's internal netlink library, but also contains helpers for sysfs, ethtool and other kernel APIs.

NMPlaform is also a cache of objects of the netlink API: NMPCache and NMPObject. These objects are used throughout NetworkManager also for generally tracking information about these types. For example, NMPlatformIP4Address (the public part of a certain type of NMPObject) is not only used to track platform addresses from netlink in the cache, but to track information about IPv4 addresses in general.

This depends on the following helper libraries