- mark global variables as const. This allows the linker to mark the variable as read only.
- for nm_utils_wifi_ghz_freqs(), don't generate a list based on bg_table/a_table. Instead, keep static array of frequencies. Since we have unit tests that check the consistency, this has little maintenance effort.
- add unit tests
5f202414d libnm: refactor wifi frequency handling in libnm
libnm-core/nm-utils.c | 190 ++++++++++++++++++++++++++--------------
libnm-core/tests/test-general.c | 50 +++++++++++
2 files changed, 176 insertions(+), 64 deletions(-)