Skip to content

crda: reglib enhancements

Luis R. Rodriguez linux-wireless wireless-regdb 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest40 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/40crda: make reg_rules_intersect() style match Linuxintersect.c+4 -40 replies
2/40crda: port over Linux is_valid_reg_rule() change bd05f28eintersect.c+2 -10 replies
3/40crda: remove verbose errors out of regdom_intersect()intersect.c+3 -100 replies
4/40crda: constify usage of struct ieee80211_regdomaincrda.c intersect.c print-regdom.c +3 more+38 -350 replies
5/40crda: remove unused BUG_ON() from intersect.cintersect.c+0 -70 replies
6/40crda: move regdom_intersect() to reglibintersect.c reglib.c reglib.h+162 -1570 replies
7/40crda: fix regression when using reglib_for_each_country()intersect.c regdbdump.c+13 -00 replies
8/40crda: move intersection if first attempt failedintersect.c+1 -20 replies
9/40crda: do not double count on reglib_for_each_country()intersect.c reglib.h+4 -90 replies
10/40crda: annotate intersection worst case sceneriointersect.c+8 -10 replies
11/40crda: fix intersect.c memory managementintersect.c+13 -210 replies
12/40crda: explicitly munmap() on reglib_get_rd_alpha2()reglib.c+1 -00 replies
13/40crda: explicitly close file descriptor and munmap() on failuresreglib.c+10 -60 replies
14/40crda: separate crda_verify_db_signature() implementationsreglib.c+21 -60 replies
15/40crda: use gcry_sexp_release() on crda_verify_db_signature()reglib.c+6 -20 replies
16/40crda: explicitly use close() and munmap() on reglib_get_rd_alpha2()reglib.c+15 -80 replies
17/40crda: use gcry_mpi_release() when using gcry_mpi_scan()reglib.c+4 -00 replies
18/40crda: rename world and prev_world on intersect.cintersect.c+22 -220 replies
19/40crda: remove verbosity out of intersect.cintersect.c+3 -300 replies
20/40crda: rename regdom_intersect() to reglib_intersect_rds()intersect.c reglib.c reglib.h+7 -70 replies
21/40crda: rename crda_get_file_ptr() to reglib_get_file_ptr()reglib.c reglib.h+11 -110 replies
22/40crda: rename crda_verify_db_signature() to reglib_verify_db_signature()reglib.c reglib.h+7 -70 replies
23/40crda: rename print_regdom() to reglib_print_regdom()intersect.c print-regdom.c regdbdump.c +1 more+4 -40 replies
24/40crda: add regdb_dfs_regionsregdb.h+22 -20 replies
25/40crda: make print-regdom use internal flagsprint-regdom.c+15 -160 replies
26/40crda: move reg print helpers to reglibMakefile print-regdom.c reglib.c+75 -820 replies
27/40crda: rename is_world_regdom() to reglib_is_world_regdom()intersect.c reglib.h+3 -30 replies
28/40crda: rename isalpha_upper() to reglib_isalpha_upper()reglib.h+2 -20 replies
29/40crda: rename is_alpha2() to reglib_is_alpha2()reglib.h+2 -20 replies
30/40crda: rename is_valid_regdom() to reglib_is_valid_regdom()crda.c reglib.h+2 -20 replies
31/40crda: rename max() to reglib_max()reglib.c reglib.h+2 -20 replies
32/40crda: rename min() to reglib_min()reglib.c reglib.h+5 -50 replies
33/40crda: fix spacing on reglib_for_each_country()reglib.h+2 -20 replies
34/40crda: clarify intersect.c only computes an intersectionintersect.c+2 -20 replies
35/40crda: separate intersecting a full db into a helperintersect.c+37 -210 replies
36/40crda: move reglib_intersect_regdb() to reglibintersect.c reglib.c reglib.h+65 -630 replies
37/40crda: move regdbprint to its own helperregdbdump.c+17 -80 replies
38/40crda: add reglib regdb context helpers: reglib_(malloc|free)_regdb_ctx()reglib.c reglib.h+167 -1040 replies
39/40crda: pass struct reglib_regdb_ctx to country2rd()reglib.c+7 -70 replies
40/40crda: make reglib_for_each_country() use the reglib contextintersect.c regdbdump.c reglib.c +1 more+42 -350 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/40] crda: reglib enhancements

From: "Luis R. Rodriguez" <[email protected]>

I've hinted I've been working towards a regdb regulatory library. This pushes that idea further as I was inclined recently to develop a union algorithm and saw we still had quite a bit of work to be able to share more consistently.

I'll likely be using the intersection code as basis for this and as such I've cleaned that up and also ran valgrind over most of the code. I believe I've fixed all reglib memory related issues the rest of things valgrind bitches about are due to netlink.

mcgrof@frijol ~ $ cat .valgrindrc
--memcheck:leak-check=full
--memcheck:leak-resolution=high
--memcheck:show-reachable=yes
--memcheck:num-callers=50

If this looks OK I'll next start working towards the union code. The purpose of this is two fold:

Help build regulatory domains out of arbitrary custom regulatory definitions and to also allow us to build more thorough world regulatory domains that have passive scan flags on regulatory rules that are do not fit the intersection.

Luis R. Rodriguez (40):
crda: make reg_rules_intersect() style match Linux
crda: port over Linux is_valid_reg_rule() change bd05f28e
crda: remove verbose errors out of regdom_intersect()
crda: constify usage of struct ieee80211_regdomain
crda: remove unused BUG_ON() from intersect.c
crda: move regdom_intersect() to reglib
crda: fix regression when using reglib_for_each_country()
crda: move intersection if first attempt failed
crda: do not double count on reglib_for_each_country()
crda: annotate intersection worst case scenerio
crda: fix intersect.c memory management
crda: explicitly munmap() on reglib_get_rd_alpha2()
crda: explicitly close file descriptor and munmap() on failures
crda: separate crda_verify_db_signature() implementations
crda: use gcry_sexp_release() on crda_verify_db_signature()
crda: explicitly use close() and munmap() on reglib_get_rd_alpha2()
crda: use gcry_mpi_release() when using gcry_mpi_scan()
crda: rename world and prev_world on intersect.c
crda: remove verbosity out of intersect.c
crda: rename regdom_intersect() to reglib_intersect_rds()
crda: rename crda_get_file_ptr() to reglib_get_file_ptr()
crda: rename crda_verify_db_signature() to
reglib_verify_db_signature()
crda: rename print_regdom() to reglib_print_regdom()
crda: add regdb_dfs_regions
crda: make print-regdom use internal flags
crda: move reg print helpers to reglib
crda: rename is_world_regdom() to reglib_is_world_regdom()
crda: rename isalpha_upper() to reglib_isalpha_upper()
crda: rename is_alpha2() to reglib_is_alpha2()
crda: rename is_valid_regdom() to reglib_is_valid_regdom()
crda: rename max() to reglib_max()
crda: rename min() to reglib_min()
crda: fix spacing on reglib_for_each_country()
crda: clarify intersect.c only computes an intersection
crda: separate intersecting a full db into a helper
crda: move reglib_intersect_regdb() to reglib
crda: move regdbprint to its own helper
crda: add reglib regdb context helpers:
reglib_(malloc|free)_regdb_ctx()
crda: pass struct reglib_regdb_ctx to country2rd()
crda: make reglib_for_each_country() use the reglib context

 Makefile       |    4 +-
 crda.c         |   14 +-
 intersect.c    |  264 ++---------------------------
 print-regdom.c |   81 ---------
 regdb.h        |   24 ++-
 regdbdump.c    |   30 +++-
 reglib.c       |  518 +++++++++++++++++++++++++++++++++++++++++++++-----------
 reglib.h       |  125 +++++++++++---
 8 files changed, 589 insertions(+), 471 deletions(-)
 delete mode 100644 print-regdom.c
Signature · 1 line
1.7.10.4